From: Chengwen Feng <[email protected]> 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 <[email protected]> --- examples/rxtx_callbacks/main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/rxtx_callbacks/main.c b/examples/rxtx_callbacks/main.c index 4682921285..02c5c69cd7 100644 --- a/examples/rxtx_callbacks/main.c +++ b/examples/rxtx_callbacks/main.c @@ -173,7 +173,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool) for (q = 0; q < rx_rings; q++) { retval = rte_eth_rx_queue_setup(port, q, nb_rxd, - rte_eth_dev_socket_id(port), &rxconf, mbuf_pool); + rte_eth_dev_numa_id(port), &rxconf, mbuf_pool); if (retval < 0) return retval; } @@ -182,7 +182,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool) txconf.offloads = port_conf.txmode.offloads; for (q = 0; q < tx_rings; q++) { retval = rte_eth_tx_queue_setup(port, q, nb_txd, - rte_eth_dev_socket_id(port), &txconf); + rte_eth_dev_numa_id(port), &txconf); if (retval < 0) return retval; } @@ -250,9 +250,9 @@ lcore_main(void) uint16_t port; RTE_ETH_FOREACH_DEV(port) - if (rte_eth_dev_socket_id(port) >= 0 && - rte_eth_dev_socket_id(port) != - (int)rte_socket_id()) + if (rte_eth_dev_numa_id(port) >= 0 && + rte_eth_dev_numa_id(port) != + (int)rte_numa_id()) printf("WARNING, port %u is on remote NUMA node to " "polling thread.\n\tPerformance will " "not be optimal.\n", port); @@ -322,7 +322,7 @@ main(int argc, char *argv[]) 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

