[PATCH 214/227] examples/qos_sched: use NUMA node terminology

Chengwen Feng chengwen.feng at linux.dev
Tue Nov 3 15:52:52 CET 2026


From: Chengwen Feng <fengchengwen at huawei.com>

Rename socket_id parameters, local variables and comments to the
NUMA node terminology, and switch calls to the NUMA-named APIs.

Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
---
 examples/qos_sched/args.c | 4 ++--
 examples/qos_sched/init.c | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c
index 04e2a0e03c..739cc5dab9 100644
--- a/examples/qos_sched/args.c
+++ b/examples/qos_sched/args.c
@@ -394,8 +394,8 @@ app_parse_args(int argc, char **argv)
 					qos_conf[i].wt_core);
 			return -1;
 		}
-		uint32_t rx_sock = rte_lcore_to_socket_id(qos_conf[i].rx_core);
-		uint32_t wt_sock = rte_lcore_to_socket_id(qos_conf[i].wt_core);
+		uint32_t rx_sock = rte_lcore_to_numa_id(qos_conf[i].rx_core);
+		uint32_t wt_sock = rte_lcore_to_numa_id(qos_conf[i].wt_core);
 		if (rx_sock != wt_sock) {
 			RTE_LOG(ERR, APP, "pfc %u: RX and WT must be on the same socket\n", i + 1);
 			return -1;
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index 9f4b2e0082..40dece4146 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -127,7 +127,7 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
 	fflush(stdout);
 	rx_conf.offloads = local_port_conf.rxmode.offloads;
 	ret = rte_eth_rx_queue_setup(portid, 0, (uint16_t)ring_conf.rx_size,
-		rte_eth_dev_socket_id(portid), &rx_conf, mp);
+		rte_eth_dev_numa_id(portid), &rx_conf, mp);
 	if (ret < 0)
 		rte_exit(EXIT_FAILURE,
 			 "rte_eth_tx_queue_setup: err=%d, port=%u\n",
@@ -137,7 +137,7 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
 	fflush(stdout);
 	tx_conf.offloads = local_port_conf.txmode.offloads;
 	ret = rte_eth_tx_queue_setup(portid, 0,
-		(uint16_t)ring_conf.tx_size, rte_eth_dev_socket_id(portid), &tx_conf);
+		(uint16_t)ring_conf.tx_size, rte_eth_dev_numa_id(portid), &tx_conf);
 	if (ret < 0)
 		rte_exit(EXIT_FAILURE,
 			 "rte_eth_tx_queue_setup: err=%d, port=%u queue=%d\n",
@@ -333,7 +333,7 @@ int app_init(void)
 
 	/* Initialize each active flow */
 	for(i = 0; i < nb_pfc; i++) {
-		uint32_t socket = rte_lcore_to_socket_id(qos_conf[i].rx_core);
+		uint32_t socket = rte_lcore_to_numa_id(qos_conf[i].rx_core);
 		struct rte_ring *ring;
 		struct rte_eth_link link;
 		int retry_count = 100, retry_delay = 100; /* try every 100ms for 10 sec */
@@ -360,7 +360,7 @@ int app_init(void)
 		qos_conf[i].mbuf_pool = rte_pktmbuf_pool_create(pool_name,
 			mp_size, burst_conf.rx_burst * 4, 0,
 			RTE_MBUF_DEFAULT_BUF_SIZE,
-			rte_eth_dev_socket_id(qos_conf[i].rx_port));
+			rte_eth_dev_numa_id(qos_conf[i].rx_port));
 		if (qos_conf[i].mbuf_pool == NULL)
 			rte_exit(EXIT_FAILURE, "Cannot init mbuf pool for socket %u\n", i);
 
-- 
2.55.0



More information about the dev mailing list