From: Chengwen Feng <[email protected]> Rename socket_id parameters and comments to numa_id, and update telemetry keys to the NUMA node terminology.
No functional change. Signed-off-by: Chengwen Feng <[email protected]> --- lib/ring/rte_ring.c | 12 ++++++------ lib/ring/rte_ring.h | 8 ++++---- lib/ring/rte_ring_elem.h | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/ring/rte_ring.c b/lib/ring/rte_ring.c index 10b52dc679..c566592027 100644 --- a/lib/ring/rte_ring.c +++ b/lib/ring/rte_ring.c @@ -256,7 +256,7 @@ rte_ring_init(struct rte_ring *r, const char *name, unsigned int count, RTE_EXPORT_SYMBOL(rte_ring_create_elem) struct rte_ring * rte_ring_create_elem(const char *name, unsigned int esize, unsigned int count, - int socket_id, unsigned int flags) + int numa_id, unsigned int flags) { char mz_name[RTE_MEMZONE_NAMESIZE]; struct rte_ring *r; @@ -300,7 +300,7 @@ rte_ring_create_elem(const char *name, unsigned int esize, unsigned int count, * we are secondary process, the memzone_reserve function will set * rte_errno for us appropriately - hence no check in this function */ - mz = rte_memzone_reserve_aligned(mz_name, ring_size, socket_id, + mz = rte_memzone_reserve_aligned(mz_name, ring_size, numa_id, mz_flags, alignof(typeof(*r))); if (mz != NULL) { r = mz->addr; @@ -325,10 +325,10 @@ rte_ring_create_elem(const char *name, unsigned int esize, unsigned int count, /* create the ring */ RTE_EXPORT_SYMBOL(rte_ring_create) struct rte_ring * -rte_ring_create(const char *name, unsigned int count, int socket_id, +rte_ring_create(const char *name, unsigned int count, int numa_id, unsigned int flags) { - return rte_ring_create_elem(name, sizeof(void *), count, socket_id, + return rte_ring_create_elem(name, sizeof(void *), count, numa_id, flags); } @@ -605,7 +605,7 @@ ring_info_cb(struct rte_ring *r, void *arg) return; rte_tel_data_add_dict_string(d, "name", r->name); - rte_tel_data_add_dict_int(d, "socket", r->memzone->socket_id); + rte_tel_data_add_dict_int(d, "numa_id", r->memzone->socket_id); rte_tel_data_add_dict_int(d, "flags", r->flags); rte_tel_data_add_dict_string(d, "producer_type", ring_prod_sync_type_to_name(r)); @@ -622,7 +622,7 @@ ring_info_cb(struct rte_ring *r, void *arg) rte_tel_data_add_dict_string(d, "mz_name", mz->name); rte_tel_data_add_dict_uint(d, "mz_len", mz->len); rte_tel_data_add_dict_uint(d, "mz_hugepage_sz", mz->hugepage_sz); - rte_tel_data_add_dict_int(d, "mz_socket_id", mz->socket_id); + rte_tel_data_add_dict_int(d, "mz_numa_id", mz->socket_id); rte_tel_data_add_dict_uint_hex(d, "mz_flags", mz->flags, 0); } diff --git a/lib/ring/rte_ring.h b/lib/ring/rte_ring.h index 3382a8e2f2..ff1f4ae90a 100644 --- a/lib/ring/rte_ring.h +++ b/lib/ring/rte_ring.h @@ -146,9 +146,9 @@ void rte_ring_free(struct rte_ring *r); * @param count * The size of the ring (must be a power of 2, * unless RING_F_EXACT_SZ is set in flags). - * @param socket_id - * The *socket_id* argument is the socket identifier in case of - * NUMA. The value can be *SOCKET_ID_ANY* if there is no NUMA + * @param numa_id + * The *numa_id* argument is the NUMA node ID in case of + * NUMA. The value can be *RTE_NUMA_ID_ANY* if there is no NUMA * constraint for the reserved zone. * @param flags * An OR of the following: @@ -193,7 +193,7 @@ void rte_ring_free(struct rte_ring *r); * - ENOMEM - no appropriate memory area found in which to create memzone */ struct rte_ring *rte_ring_create(const char *name, unsigned int count, - int socket_id, unsigned int flags) + int numa_id, unsigned int flags) __rte_malloc __rte_dealloc(rte_ring_free, 1); /** diff --git a/lib/ring/rte_ring_elem.h b/lib/ring/rte_ring_elem.h index b96bfc003f..9397183538 100644 --- a/lib/ring/rte_ring_elem.h +++ b/lib/ring/rte_ring_elem.h @@ -58,9 +58,9 @@ ssize_t rte_ring_get_memsize_elem(unsigned int esize, unsigned int count); * The size of ring element, in bytes. It must be a multiple of 4. * @param count * The number of elements in the ring (must be a power of 2). - * @param socket_id - * The *socket_id* argument is the socket identifier in case of - * NUMA. The value can be *SOCKET_ID_ANY* if there is no NUMA + * @param numa_id + * The *numa_id* argument is the NUMA node ID in case of + * NUMA. The value can be *RTE_NUMA_ID_ANY* if there is no NUMA * constraint for the reserved zone. * @param flags * An OR of the following: @@ -99,7 +99,7 @@ ssize_t rte_ring_get_memsize_elem(unsigned int esize, unsigned int count); * - ENOMEM - no appropriate memory area found in which to create memzone */ struct rte_ring *rte_ring_create_elem(const char *name, unsigned int esize, - unsigned int count, int socket_id, unsigned int flags); + unsigned int count, int numa_id, unsigned int flags); /** * Enqueue several objects on the ring (multi-producers safe). -- 2.55.0

