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-macsec/main.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/examples/l2fwd-macsec/main.c b/examples/l2fwd-macsec/main.c
index 33113cb0f5..aee0d8e06b 100644
--- a/examples/l2fwd-macsec/main.c
+++ b/examples/l2fwd-macsec/main.c
@@ -1379,7 +1379,7 @@ main(int argc, char **argv)
        /* Create the mbuf pool. 8< */
        l2fwd_pktmbuf_pool = rte_pktmbuf_pool_create("mbuf_pool", nb_mbufs,
                MEMPOOL_CACHE_SIZE, 0, RTE_MBUF_DEFAULT_BUF_SIZE,
-               rte_socket_id());
+               rte_numa_id());
        if (l2fwd_pktmbuf_pool == NULL)
                rte_exit(EXIT_FAILURE, "Cannot init mbuf pool\n");
        /* >8 End of create the mbuf pool. */
@@ -1438,7 +1438,7 @@ main(int argc, char **argv)
                rxq_conf.offloads = local_port_conf.rxmode.offloads;
                /* RX queue setup. 8< */
                ret = rte_eth_rx_queue_setup(portid, 0, nb_rxd,
-                                            rte_eth_dev_socket_id(portid),
+                                            rte_eth_dev_numa_id(portid),
                                             &rxq_conf,
                                             l2fwd_pktmbuf_pool);
                if (ret < 0)
@@ -1451,7 +1451,7 @@ main(int argc, char **argv)
                txq_conf = dev_info.default_txconf;
                txq_conf.offloads = local_port_conf.txmode.offloads;
                ret = rte_eth_tx_queue_setup(portid, 0, nb_txd,
-                               rte_eth_dev_socket_id(portid),
+                               rte_eth_dev_numa_id(portid),
                                &txq_conf);
                if (ret < 0)
                        rte_exit(EXIT_FAILURE, "rte_eth_tx_queue_setup:err=%d, 
port=%u\n",
@@ -1459,9 +1459,9 @@ main(int argc, char **argv)
                /* >8 End of init one TX queue on each port. */
 
                /* Initialize TX buffers */
-               tx_buffer[portid] = rte_zmalloc_socket("tx_buffer",
+               tx_buffer[portid] = rte_zmalloc_numa("tx_buffer",
                                RTE_ETH_TX_BUFFER_SIZE(MAX_PKT_BURST), 0,
-                               rte_eth_dev_socket_id(portid));
+                               rte_eth_dev_numa_id(portid));
                if (tx_buffer[portid] == NULL)
                        rte_exit(EXIT_FAILURE, "Cannot allocate buffer for tx 
on port %u\n",
                                        portid);
@@ -1514,7 +1514,7 @@ main(int argc, char **argv)
                                                        nb_sess, sess_sz,
                                                        
SESSION_POOL_CACHE_SIZE, 0,
                                                        NULL, NULL, NULL, NULL,
-                                                       SOCKET_ID_ANY, 0);
+                                                       RTE_NUMA_ID_ANY, 0);
                        if (mcs_port_params[portid].sess_pool == NULL)
                                rte_exit(EXIT_FAILURE, "Cannot init sess 
pool\n");
 
-- 
2.55.0

Reply via email to