Skip to content

Commit

Permalink
examples/l2fwd-cat: fix NUMA check of port and core
Browse files Browse the repository at this point in the history
[ upstream commit 59a50c6 ]

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: f6baccb ("examples/l2fwd-cat: add sample application for PQoS CAT and CDP")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
  • Loading branch information
hushenggitcount authored and steevenlee committed Jun 8, 2021
1 parent 110a220 commit 12822e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/l2fwd-cat/l2fwd-cat.c
Expand Up @@ -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 "
Expand Down

0 comments on commit 12822e5

Please sign in to comment.