From: Chengwen Feng <[email protected]>

Rename socket_id parameters, internal variables and comments to
the NUMA node terminology, and switch internal calls to
rte_zmalloc_numa(), rte_numa_id() and RTE_NUMA_ID_ANY.

Signed-off-by: Chengwen Feng <[email protected]>
---
 lib/ip_frag/rte_ip_frag.h        |  8 ++++----
 lib/ip_frag/rte_ip_frag_common.c | 12 ++++++------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/lib/ip_frag/rte_ip_frag.h b/lib/ip_frag/rte_ip_frag.h
index 84fd717953..483930a2d6 100644
--- a/lib/ip_frag/rte_ip_frag.h
+++ b/lib/ip_frag/rte_ip_frag.h
@@ -54,15 +54,15 @@ struct rte_ip_frag_death_row {
  *   The value should be less or equal then bucket_num * bucket_entries.
  * @param max_cycles
  *   Maximum TTL in cycles for each fragmented packet.
- * @param socket_id
- *   The *socket_id* argument is the socket identifier in the case of
- *   NUMA. The value can be *SOCKET_ID_ANY* if there is no NUMA constraints.
+ * @param numa_id
+ *   The *numa_id* argument is the NUMA node ID in the case of
+ *   NUMA. The value can be *RTE_NUMA_ID_ANY* if there is no NUMA constraints.
  * @return
  *   The pointer to the new allocated fragmentation table, on success. NULL on 
error.
  */
 struct rte_ip_frag_tbl * rte_ip_frag_table_create(uint32_t bucket_num,
                uint32_t bucket_entries,  uint32_t max_entries,
-               uint64_t max_cycles, int socket_id);
+               uint64_t max_cycles, int numa_id);
 
 /**
  * Free allocated IP fragmentation table.
diff --git a/lib/ip_frag/rte_ip_frag_common.c b/lib/ip_frag/rte_ip_frag_common.c
index 00bf9476de..d675de4338 100644
--- a/lib/ip_frag/rte_ip_frag_common.c
+++ b/lib/ip_frag/rte_ip_frag_common.c
@@ -43,7 +43,7 @@ rte_ip_frag_free_death_row(struct rte_ip_frag_death_row *dr,
 RTE_EXPORT_SYMBOL(rte_ip_frag_table_create)
 struct rte_ip_frag_tbl *
 rte_ip_frag_table_create(uint32_t bucket_num, uint32_t bucket_entries,
-       uint32_t max_entries, uint64_t max_cycles, int socket_id)
+       uint32_t max_entries, uint64_t max_cycles, int numa_id)
 {
        struct rte_ip_frag_tbl *tbl;
        size_t sz;
@@ -62,16 +62,16 @@ rte_ip_frag_table_create(uint32_t bucket_num, uint32_t 
bucket_entries,
        }
 
        sz = sizeof (*tbl) + nb_entries * sizeof (tbl->pkt[0]);
-       if ((tbl = rte_zmalloc_socket(__func__, sz, RTE_CACHE_LINE_SIZE,
-                       socket_id)) == NULL) {
+       tbl = rte_zmalloc_numa(__func__, sz, RTE_CACHE_LINE_SIZE, numa_id);
+       if (tbl == NULL) {
                IP_FRAG_LOG_LINE(ERR,
-                       "%s: allocation of %zu bytes at socket %d failed do",
-                       __func__, sz, socket_id);
+                       "%s: allocation of %zu bytes at NUMA node %d failed do",
+                       __func__, sz, numa_id);
                return NULL;
        }
 
        IP_FRAG_LOG_LINE(INFO, "%s: allocated of %zu bytes at socket %d",
-               __func__, sz, socket_id);
+               __func__, sz, numa_id);
 
        tbl->max_cycles = max_cycles;
        tbl->max_entries = max_entries;
-- 
2.55.0

Reply via email to