| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -232,19 +232,6 @@ static int GetNumaNode(void)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    return node;
 | 
					 | 
					 | 
					 | 
					    return node;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					static int GetCPU(void)
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					{
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    int cpu = -1;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					#if defined(__linux__)
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    cpu = sched_getcpu();
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					#else
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    SCLogWarning(SC_ERR_TM_THREADS_ERROR, "CPU id retrieval is not supported on this OS.");
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					#endif
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    return cpu;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					/**
 | 
					 | 
					 | 
					 | 
					/**
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 * \brief Registration Function for ReceiveDPDK.
 | 
					 | 
					 | 
					 | 
					 * \brief Registration Function for ReceiveDPDK.
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 * \todo Unit tests are needed for this module.
 | 
					 | 
					 | 
					 | 
					 * \todo Unit tests are needed for this module.
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -471,8 +458,8 @@ static TmEcode ReceiveDPDKThreadInit(ThreadVars *tv, const void *initdata, void
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    thread_numa = GetNumaNode();
 | 
					 | 
					 | 
					 | 
					    thread_numa = GetNumaNode();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    if (thread_numa >= 0 && thread_numa != rte_eth_dev_socket_id(ptv->port_id)) {
 | 
					 | 
					 | 
					 | 
					    if (thread_numa >= 0 && thread_numa != rte_eth_dev_socket_id(ptv->port_id)) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        SC_ATOMIC_ADD(dpdk_config->inconsitent_numa_cnt, 1);
 | 
					 | 
					 | 
					 | 
					        SC_ATOMIC_ADD(dpdk_config->inconsitent_numa_cnt, 1);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        SCLogInfo("NIC on NUMA %d but thread id %d on NUMA %d. Decreased performance expected",
 | 
					 | 
					 | 
					 | 
					        SCLogPerf("%s: NIC is on NUMA %d, thread on NUMA %d", dpdk_config->iface,
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                rte_eth_dev_socket_id(ptv->port_id), GetCPU(), thread_numa);
 | 
					 | 
					 | 
					 | 
					                rte_eth_dev_socket_id(ptv->port_id), thread_numa);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    }
 | 
					 | 
					 | 
					 | 
					    }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    uint16_t queue_id = SC_ATOMIC_ADD(dpdk_config->queue_id, 1);
 | 
					 | 
					 | 
					 | 
					    uint16_t queue_id = SC_ATOMIC_ADD(dpdk_config->queue_id, 1);
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -498,13 +485,11 @@ static TmEcode ReceiveDPDKThreadInit(ThreadVars *tv, const void *initdata, void
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        // some PMDs requires additional actions only after the device has started
 | 
					 | 
					 | 
					 | 
					        // some PMDs requires additional actions only after the device has started
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        DevicePostStartPMDSpecificActions(ptv, dev_info.driver_name);
 | 
					 | 
					 | 
					 | 
					        DevicePostStartPMDSpecificActions(ptv, dev_info.driver_name);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        uint16_t inconsist_numa_map = SC_ATOMIC_GET(dpdk_config->inconsitent_numa_cnt);
 | 
					 | 
					 | 
					 | 
					        uint16_t inconsist_numa_cnt = SC_ATOMIC_GET(dpdk_config->inconsitent_numa_cnt);
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (inconsist_numa_map > 0) {
 | 
					 | 
					 | 
					 | 
					        if (inconsist_numa_cnt > 0) {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            SCLogWarning(SC_WARN_DPDK_CONF,
 | 
					 | 
					 | 
					 | 
					            SCLogWarning(SC_WARN_DPDK_CONF,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    "Expect decreased performance due to interface (%s) being on NUMA node %d "
 | 
					 | 
					 | 
					 | 
					                    "%s: NIC is on NUMA %d, %u threads on different NUMA node(s)",
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    "but is used by %d threads on distinct NUMA nodes. "
 | 
					 | 
					 | 
					 | 
					                    dpdk_config->iface, rte_eth_dev_socket_id(ptv->port_id), inconsist_numa_cnt);
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    "Run with verbose logging to determine individual thread ids",
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    dpdk_config->iface, rte_eth_dev_socket_id(ptv->port_id), inconsist_numa_map);
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    }
 | 
					 | 
					 | 
					 | 
					    }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |