[PATCH 096/227] event/opdl: use NUMA node terminology

Chengwen Feng chengwen.feng at linux.dev
Tue Nov 3 15:50:54 CET 2026


From: Chengwen Feng <fengchengwen at huawei.com>

Rename socket_id parameters, internal structure fields, variables
and comments to the NUMA node terminology, and switch calls to
the NUMA-named APIs.

Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
---
 drivers/event/opdl/opdl_evdev.c | 16 ++++++++--------
 drivers/event/opdl/opdl_ring.c  |  6 +++---
 drivers/event/opdl/opdl_ring.h  |  2 +-
 drivers/event/opdl/opdl_test.c  |  2 +-
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/event/opdl/opdl_evdev.c b/drivers/event/opdl/opdl_evdev.c
index 44a648a11a..d5396fda4f 100644
--- a/drivers/event/opdl/opdl_evdev.c
+++ b/drivers/event/opdl/opdl_evdev.c
@@ -581,9 +581,9 @@ opdl_close(struct rte_eventdev *dev)
 static int
 assign_numa_node(const char *key __rte_unused, const char *value, void *opaque)
 {
-	int *socket_id = opaque;
-	*socket_id = atoi(value);
-	if (*socket_id >= RTE_MAX_NUMA_NODES)
+	int *numa_id = opaque;
+	*numa_id = atoi(value);
+	if (*numa_id >= RTE_MAX_NUMA_NODES)
 		return -1;
 	return 0;
 }
@@ -647,7 +647,7 @@ opdl_probe(struct rte_vdev_device *vdev)
 	const char *params;
 	struct rte_eventdev *dev;
 	struct opdl_evdev *opdl;
-	int socket_id = rte_socket_id();
+	int numa_id = rte_numa_id();
 	int do_validation = 0;
 	int do_test = 0;
 	int str_len;
@@ -664,7 +664,7 @@ opdl_probe(struct rte_vdev_device *vdev)
 					name);
 		} else {
 			int ret = rte_kvargs_process(kvlist, NUMA_NODE_ARG,
-					assign_numa_node, &socket_id);
+					assign_numa_node, &numa_id);
 			if (ret != 0) {
 				PMD_DRV_LOG(ERR,
 						"%s: Error parsing numa node parameter",
@@ -698,7 +698,7 @@ opdl_probe(struct rte_vdev_device *vdev)
 		}
 	}
 	dev = rte_event_pmd_vdev_init(name,
-			sizeof(struct opdl_evdev), socket_id, vdev);
+			sizeof(struct opdl_evdev), numa_id, vdev);
 
 	if (dev == NULL) {
 		PMD_DRV_LOG(ERR, "eventdev vdev init() failed");
@@ -710,7 +710,7 @@ opdl_probe(struct rte_vdev_device *vdev)
 			  " , self_test:[%s]",
 		      dev->data->dev_id,
 		      name,
-		      socket_id,
+		      numa_id,
 		      (do_validation ? "true" : "false"),
 			  (do_test ? "true" : "false"));
 
@@ -726,7 +726,7 @@ opdl_probe(struct rte_vdev_device *vdev)
 
 	opdl = dev->data->dev_private;
 	opdl->data = dev->data;
-	opdl->socket = socket_id;
+	opdl->socket = numa_id;
 	opdl->do_validation = do_validation;
 	opdl->do_test = do_test;
 	str_len = strlen(name);
diff --git a/drivers/event/opdl/opdl_ring.c b/drivers/event/opdl/opdl_ring.c
index 60991c4b03..d1e8cdb048 100644
--- a/drivers/event/opdl/opdl_ring.c
+++ b/drivers/event/opdl/opdl_ring.c
@@ -805,13 +805,13 @@ init_stage(struct opdl_ring *t, struct opdl_stage *s, bool threadsafe,
 	s->shared.stage = s;
 
 	/* Alloc memory for deps */
-	s->dep_tracking = rte_zmalloc_socket(LIB_NAME,
+	s->dep_tracking = rte_zmalloc_numa(LIB_NAME,
 			t->max_num_stages * sizeof(enum dep_type),
 			0, t->socket);
 	if (s->dep_tracking == NULL)
 		return -ENOMEM;
 
-	s->deps = rte_zmalloc_socket(LIB_NAME,
+	s->deps = rte_zmalloc_numa(LIB_NAME,
 			t->max_num_stages * sizeof(struct shared_state *),
 			0, t->socket);
 	if (s->deps == NULL) {
@@ -923,7 +923,7 @@ opdl_ring_create(const char *name, uint32_t num_slots, uint32_t slot_size,
 	}
 
 	/* Alloc memory for stages */
-	st = rte_zmalloc_socket(LIB_NAME,
+	st = rte_zmalloc_numa(LIB_NAME,
 		max_num_stages * sizeof(struct opdl_stage),
 		RTE_CACHE_LINE_SIZE, socket);
 	if (st == NULL)
diff --git a/drivers/event/opdl/opdl_ring.h b/drivers/event/opdl/opdl_ring.h
index 14ababe0bb..c055dd4f7d 100644
--- a/drivers/event/opdl/opdl_ring.h
+++ b/drivers/event/opdl/opdl_ring.h
@@ -69,7 +69,7 @@ struct opdl_stage;
  * @param max_num_stages
  *   Maximum number of stages.
  * @param socket
- *   The NUMA socket (or SOCKET_ID_ANY) to allocate the memory used for this
+ *   The NUMA socket (or RTE_NUMA_ID_ANY) to allocate the memory used for this
  *   opdl_ring instance.
  * @param threadsafe
  *   Whether to support multiple threads inputting to the opdl_ring or not.
diff --git a/drivers/event/opdl/opdl_test.c b/drivers/event/opdl/opdl_test.c
index 9b0c4db5ce..daa07f52e2 100644
--- a/drivers/event/opdl/opdl_test.c
+++ b/drivers/event/opdl/opdl_test.c
@@ -1017,7 +1017,7 @@ opdl_selftest(void)
 				32 /*MBUF_CACHE_SIZE*/,
 				0,
 				512, /* use very small mbufs */
-				rte_socket_id());
+				rte_numa_id());
 		if (!eventdev_func_mempool) {
 			PMD_DRV_LOG(ERR, "ERROR creating mempool");
 			free(t);
-- 
2.55.0



More information about the dev mailing list