examples/ip_frag: fix socket detection
Make everything NUMA-related depend on lcore sockets, not device sockets. This is because the init_mem() function allocates all data structures based on NUMA nodes of the lcores in the coremask. Therefore, when no cores are on socket 0, but there are devices on socket 0, it may lead to segmentation faults. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
This commit is contained in:
parent
eaa8d3bf6d
commit
324bcf45e5
@ -911,7 +911,7 @@ MAIN(int argc, char **argv)
|
||||
qconf = &lcore_queue_conf[rx_lcore_id];
|
||||
}
|
||||
|
||||
socket = rte_eth_dev_socket_id(portid);
|
||||
socket = (int) rte_lcore_to_socket_id(rx_lcore_id);
|
||||
if (socket == SOCKET_ID_ANY)
|
||||
socket = 0;
|
||||
|
||||
|
@ -1118,7 +1118,7 @@ MAIN(int argc, char **argv)
|
||||
qconf = &lcore_queue_conf[rx_lcore_id];
|
||||
}
|
||||
|
||||
socket = rte_eth_dev_socket_id(portid);
|
||||
socket = rte_lcore_to_socket_id(portid);
|
||||
if (socket == SOCKET_ID_ANY)
|
||||
socket = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user