examples/skeleton: fix NUMA check of port and core
According to the comments and logging, the author just hope user to use the core and device which are in the same numa node for optimal performance. If not, A warning gives out. This patch fixes the check for a device on the node 0. Fixes: 7107e471a6c7 ("examples/skeleton: very simple code for packet forwarding") Cc: stable@dpdk.org Signed-off-by: Min Hu (Connor) <humin29@huawei.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
parent
59a50c6a9a
commit
5ffa60cd77
@ -122,7 +122,7 @@ lcore_main(void)
|
||||
* for best performance.
|
||||
*/
|
||||
RTE_ETH_FOREACH_DEV(port)
|
||||
if (rte_eth_dev_socket_id(port) > 0 &&
|
||||
if (rte_eth_dev_socket_id(port) >= 0 &&
|
||||
rte_eth_dev_socket_id(port) !=
|
||||
(int)rte_socket_id())
|
||||
printf("WARNING, port %u is on remote NUMA node to "
|
||||
|
Loading…
x
Reference in New Issue
Block a user