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/distributor/rte_distributor.c | 6 +++--- lib/distributor/rte_distributor.h | 4 ++-- lib/distributor/rte_distributor_single.c | 4 ++-- lib/distributor/rte_distributor_single.h | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/distributor/rte_distributor.c b/lib/distributor/rte_distributor.c index dde7ce2677..d34a7934fd 100644 --- a/lib/distributor/rte_distributor.c +++ b/lib/distributor/rte_distributor.c @@ -720,7 +720,7 @@ rte_distributor_clear_returns(struct rte_distributor *d) RTE_EXPORT_SYMBOL(rte_distributor_create) struct rte_distributor * rte_distributor_create(const char *name, - unsigned int socket_id, + unsigned int numa_id, unsigned int num_workers, unsigned int alg_type) { @@ -749,7 +749,7 @@ rte_distributor_create(const char *name, return NULL; } d->d_single = rte_distributor_create_single(name, - socket_id, num_workers); + numa_id, num_workers); if (d->d_single == NULL) { free(d); /* rte_errno will have been set */ @@ -760,7 +760,7 @@ rte_distributor_create(const char *name, } snprintf(mz_name, sizeof(mz_name), RTE_DISTRIB_PREFIX"%s", name); - mz = rte_memzone_reserve(mz_name, sizeof(*d), socket_id, NO_FLAGS); + mz = rte_memzone_reserve(mz_name, sizeof(*d), numa_id, NO_FLAGS); if (mz == NULL) { rte_errno = ENOMEM; return NULL; diff --git a/lib/distributor/rte_distributor.h b/lib/distributor/rte_distributor.h index a073e64612..0c72300252 100644 --- a/lib/distributor/rte_distributor.h +++ b/lib/distributor/rte_distributor.h @@ -35,7 +35,7 @@ struct rte_mbuf; * * @param name * The name to be given to the distributor instance. - * @param socket_id + * @param numa_id * The NUMA node on which the memory is to be allocated * @param num_workers * The maximum number of workers that will request packets from this @@ -48,7 +48,7 @@ struct rte_mbuf; * The newly created distributor instance */ struct rte_distributor * -rte_distributor_create(const char *name, unsigned int socket_id, +rte_distributor_create(const char *name, unsigned int numa_id, unsigned int num_workers, unsigned int alg_type); diff --git a/lib/distributor/rte_distributor_single.c b/lib/distributor/rte_distributor_single.c index d4b3e12648..a018a04cea 100644 --- a/lib/distributor/rte_distributor_single.c +++ b/lib/distributor/rte_distributor_single.c @@ -375,7 +375,7 @@ rte_distributor_clear_returns_single(struct rte_distributor_single *d) /* creates a distributor instance */ struct rte_distributor_single * rte_distributor_create_single(const char *name, - unsigned socket_id, + unsigned int numa_id, unsigned num_workers) { struct rte_distributor_single *d; @@ -395,7 +395,7 @@ rte_distributor_create_single(const char *name, } snprintf(mz_name, sizeof(mz_name), RTE_DISTRIB_PREFIX"%s", name); - mz = rte_memzone_reserve(mz_name, sizeof(*d), socket_id, NO_FLAGS); + mz = rte_memzone_reserve(mz_name, sizeof(*d), numa_id, NO_FLAGS); if (mz == NULL) { rte_errno = ENOMEM; return NULL; diff --git a/lib/distributor/rte_distributor_single.h b/lib/distributor/rte_distributor_single.h index 2f80aa43d1..289703601d 100644 --- a/lib/distributor/rte_distributor_single.h +++ b/lib/distributor/rte_distributor_single.h @@ -30,7 +30,7 @@ struct rte_mbuf; * * @param name * The name to be given to the distributor instance. - * @param socket_id + * @param numa_id * The NUMA node on which the memory is to be allocated * @param num_workers * The maximum number of workers that will request packets from this @@ -39,7 +39,7 @@ struct rte_mbuf; * The newly created distributor instance */ struct rte_distributor_single * -rte_distributor_create_single(const char *name, unsigned int socket_id, +rte_distributor_create_single(const char *name, unsigned int numa_id, unsigned int num_workers); /* *** APIS to be called on the distributor lcore *** */ -- 2.55.0

