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/ip_reassembly/main.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
index 321a50b1f6..6df7a395c6 100644
--- a/examples/ip_reassembly/main.c
+++ b/examples/ip_reassembly/main.c
@@ -827,8 +827,8 @@ setup_port_tbl(struct lcore_queue_conf *qconf, uint32_t 
lcore, int socket,
        n = RTE_MAX(max_flow_num, 2UL * MAX_PKT_BURST);
        sz = sizeof (*mtb) + sizeof (mtb->m_table[0]) *  n;
 
-       if ((mtb = rte_zmalloc_socket(__func__, sz, RTE_CACHE_LINE_SIZE,
-                       socket)) == NULL) {
+       mtb = rte_zmalloc_numa(__func__, sz, RTE_CACHE_LINE_SIZE, socket);
+       if (mtb == NULL) {
                RTE_LOG(ERR, IP_RSMBL, "%s() for lcore: %u, port: %u "
                        "failed to allocate %zu bytes\n",
                        __func__, lcore, port, sz);
@@ -849,8 +849,8 @@ setup_queue_tbl(struct rx_queue *rxq, uint32_t lcore, 
uint32_t queue)
        uint64_t frag_cycles;
        char buf[RTE_MEMPOOL_NAMESIZE];
 
-       socket = rte_lcore_to_socket_id(lcore);
-       if (socket == SOCKET_ID_ANY)
+       socket = rte_lcore_to_numa_id(lcore);
+       if (socket == RTE_NUMA_ID_ANY)
                socket = 0;
 
        /* Each table entry holds information about packet fragmentation. 8< */
@@ -920,9 +920,9 @@ init_mem(void)
                if (rte_lcore_is_enabled(lcore_id) == 0)
                        continue;
 
-               socket = rte_lcore_to_socket_id(lcore_id);
+               socket = rte_lcore_to_numa_id(lcore_id);
 
-               if (socket == SOCKET_ID_ANY)
+               if (socket == RTE_NUMA_ID_ANY)
                        socket = 0;
 
                if (socket_lpm[socket] == NULL) {
@@ -1070,8 +1070,8 @@ main(int argc, char **argv)
                        qconf = &lcore_queue_conf[rx_lcore_id];
                }
 
-               socket = rte_lcore_to_socket_id(portid);
-               if (socket == SOCKET_ID_ANY)
+               socket = rte_lcore_to_numa_id(portid);
+               if (socket == RTE_NUMA_ID_ANY)
                        socket = 0;
 
                queueid = qconf->n_rx_queue;
@@ -1152,7 +1152,7 @@ main(int argc, char **argv)
                        if (rte_lcore_is_enabled(lcore_id) == 0)
                                continue;
 
-                       socket = (int) rte_lcore_to_socket_id(lcore_id);
+                       socket = (int) rte_lcore_to_numa_id(lcore_id);
 
                        printf("txq=%u,%d,%d ", lcore_id, queueid, socket);
                        fflush(stdout);
-- 
2.55.0

Reply via email to