From: Min Hu (Connor) Date: Thu, 29 Apr 2021 00:50:47 +0000 (+0800) Subject: examples/l2fwd-cat: fix NUMA check of port and core X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=59a50c6a9ace0dc736d71e75267a1cc2127e7938;p=dpdk.git examples/l2fwd-cat: 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: f6baccbc2b3b ("examples/l2fwd-cat: add sample application for PQoS CAT and CDP") Cc: stable@dpdk.org Signed-off-by: Min Hu (Connor) Reviewed-by: Ferruh Yigit --- diff --git a/examples/l2fwd-cat/l2fwd-cat.c b/examples/l2fwd-cat/l2fwd-cat.c index 02288a3824..8e7eb32485 100644 --- a/examples/l2fwd-cat/l2fwd-cat.c +++ b/examples/l2fwd-cat/l2fwd-cat.c @@ -107,7 +107,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 "