[PATCH 220/227] examples/vm_power_manager: use NUMA node terminology
Chengwen Feng
chengwen.feng at linux.dev
Tue Nov 3 15:52:58 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/vm_power_manager/main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
index d6f18187a7..47e9c2abbb 100644
--- a/examples/vm_power_manager/main.c
+++ b/examples/vm_power_manager/main.c
@@ -84,7 +84,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
/* Allocate and set up 1 RX queue per Ethernet port. */
for (q = 0; q < rx_rings; q++) {
retval = rte_eth_rx_queue_setup(port, q, RX_RING_SIZE,
- rte_eth_dev_socket_id(port), NULL, mbuf_pool);
+ rte_eth_dev_numa_id(port), NULL, mbuf_pool);
if (retval < 0)
return retval;
}
@@ -94,7 +94,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
/* Allocate and set up 1 TX queue per Ethernet port. */
for (q = 0; q < tx_rings; q++) {
retval = rte_eth_tx_queue_setup(port, q, TX_RING_SIZE,
- rte_eth_dev_socket_id(port), &txq_conf);
+ rte_eth_dev_numa_id(port), &txq_conf);
if (retval < 0)
return retval;
}
@@ -360,7 +360,7 @@ main(int argc, char **argv)
if (nb_ports > 0) {
mbuf_pool = rte_pktmbuf_pool_create("MBUF_POOL",
NUM_MBUFS * nb_ports, MBUF_CACHE_SIZE, 0,
- RTE_MBUF_DEFAULT_BUF_SIZE, rte_socket_id());
+ RTE_MBUF_DEFAULT_BUF_SIZE, rte_numa_id());
if (mbuf_pool == NULL)
rte_exit(EXIT_FAILURE, "Cannot create mbuf pool\n");
--
2.55.0
More information about the dev
mailing list