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/l2fwd-event/l2fwd_common.c | 4 ++--
 examples/l2fwd-event/l2fwd_poll.c   | 4 ++--
 examples/l2fwd-event/main.c         | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/examples/l2fwd-event/l2fwd_common.c 
b/examples/l2fwd-event/l2fwd_common.c
index caacf6cd63..9b636724b7 100644
--- a/examples/l2fwd-event/l2fwd_common.c
+++ b/examples/l2fwd-event/l2fwd_common.c
@@ -83,7 +83,7 @@ l2fwd_event_init_ports(struct l2fwd_resources *rsrc)
                rxq_conf.offloads = local_port_conf.rxmode.offloads;
                /* Using lcore to poll one or several ports. 8< */
                ret = rte_eth_rx_queue_setup(port_id, 0, nb_rxd,
-                                            rte_eth_dev_socket_id(port_id),
+                                            rte_eth_dev_numa_id(port_id),
                                             &rxq_conf,
                                             rsrc->pktmbuf_pool);
                if (ret < 0)
@@ -97,7 +97,7 @@ l2fwd_event_init_ports(struct l2fwd_resources *rsrc)
                txq_conf = dev_info.default_txconf;
                txq_conf.offloads = local_port_conf.txmode.offloads;
                ret = rte_eth_tx_queue_setup(port_id, 0, nb_txd,
-                               rte_eth_dev_socket_id(port_id),
+                               rte_eth_dev_numa_id(port_id),
                                &txq_conf);
                if (ret < 0)
                        rte_panic("rte_eth_tx_queue_setup:err=%d, port=%u\n",
diff --git a/examples/l2fwd-event/l2fwd_poll.c 
b/examples/l2fwd-event/l2fwd_poll.c
index 73fefac67b..432d80e311 100644
--- a/examples/l2fwd-event/l2fwd_poll.c
+++ b/examples/l2fwd-event/l2fwd_poll.c
@@ -147,9 +147,9 @@ l2fwd_poll_init_tx_buffers(struct l2fwd_resources *rsrc)
 
        RTE_ETH_FOREACH_DEV(port_id) {
                /* Initialize TX buffers */
-               poll_rsrc->tx_buffer[port_id] = rte_zmalloc_socket("tx_buffer",
+               poll_rsrc->tx_buffer[port_id] = rte_zmalloc_numa("tx_buffer",
                                RTE_ETH_TX_BUFFER_SIZE(MAX_PKT_BURST), 0,
-                               rte_eth_dev_socket_id(port_id));
+                               rte_eth_dev_numa_id(port_id));
                if (poll_rsrc->tx_buffer[port_id] == NULL)
                        rte_panic("Cannot allocate buffer for tx on port %u\n",
                                  port_id);
diff --git a/examples/l2fwd-event/main.c b/examples/l2fwd-event/main.c
index 6ab59eb4ef..c011ec61db 100644
--- a/examples/l2fwd-event/main.c
+++ b/examples/l2fwd-event/main.c
@@ -664,7 +664,7 @@ main(int argc, char **argv)
        /* Create the mbuf pool. 8< */
        rsrc->pktmbuf_pool = rte_pktmbuf_pool_create("mbuf_pool",
                        nb_mbufs, MEMPOOL_CACHE_SIZE, 0,
-                       RTE_MBUF_DEFAULT_BUF_SIZE, rte_socket_id());
+                       RTE_MBUF_DEFAULT_BUF_SIZE, rte_numa_id());
        if (rsrc->pktmbuf_pool == NULL)
                rte_panic("Cannot init mbuf pool\n");
        /* >8 End of creation of mbuf pool. */
@@ -677,7 +677,7 @@ main(int argc, char **argv)
                nb_vec = RTE_MAX(512U, nb_vec);
                nb_vec += rte_lcore_count() * 32;
                rsrc->evt_vec_pool = rte_event_vector_pool_create(
-                       "vector_pool", nb_vec, 32, vec_size, rte_socket_id());
+                       "vector_pool", nb_vec, 32, vec_size, rte_numa_id());
                if (rsrc->evt_vec_pool == NULL)
                        rte_panic("Cannot init event vector pool\n");
        }
-- 
2.55.0

Reply via email to