From: Chengwen Feng Date: Thu, 6 May 2021 03:46:07 +0000 (+0800) Subject: examples/ethtool: enhance Rx/Tx queue NUMA affinity X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=4199ce15789fdad0a3b835d1c93abc6b63227914 examples/ethtool: enhance Rx/Tx queue NUMA affinity In DPDK, 'rte_socket_id' means the running socket while 'rte_eth_dev_socket_id' is the device socket. For better performance, memory which queue setup used and device should be in the same socket. This patch make sure it calls rte_eth_dev_socket_id API to get device socket_id when setting ringparam. Signed-off-by: Chengwen Feng Signed-off-by: Min Hu (Connor) --- diff --git a/examples/ethtool/lib/rte_ethtool.c b/examples/ethtool/lib/rte_ethtool.c index e7cdf8d577..86286d38a6 100644 --- a/examples/ethtool/lib/rte_ethtool.c +++ b/examples/ethtool/lib/rte_ethtool.c @@ -465,12 +465,12 @@ rte_ethtool_set_ringparam(uint16_t port_id, return stat; stat = rte_eth_tx_queue_setup(port_id, 0, ring_param->tx_pending, - rte_socket_id(), NULL); + rte_eth_dev_socket_id(port_id), NULL); if (stat != 0) return stat; stat = rte_eth_rx_queue_setup(port_id, 0, ring_param->rx_pending, - rte_socket_id(), NULL, rx_qinfo.mp); + rte_eth_dev_socket_id(port_id), NULL, rx_qinfo.mp); if (stat != 0) return stat;