[PATCH 137/227] net/null: use NUMA node terminology
Chengwen Feng
chengwen.feng at linux.dev
Tue Nov 3 15:51:35 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/net/null/rte_eth_null.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index a2f70fee79..dd90d51e9b 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -223,7 +223,7 @@ eth_dev_stop(struct rte_eth_dev *dev)
static int
eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,
uint16_t nb_rx_desc __rte_unused,
- unsigned int socket_id __rte_unused,
+ unsigned int numa_id __rte_unused,
const struct rte_eth_rxconf *rx_conf __rte_unused,
struct rte_mempool *mb_pool)
{
@@ -244,7 +244,7 @@ eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,
internals->rx_null_queues[rx_queue_id].mb_pool = mb_pool;
dev->data->rx_queues[rx_queue_id] =
&internals->rx_null_queues[rx_queue_id];
- dummy_packet = rte_zmalloc_socket(NULL,
+ dummy_packet = rte_zmalloc_numa(NULL,
packet_size, 0, dev->data->numa_node);
if (dummy_packet == NULL)
return -ENOMEM;
@@ -258,7 +258,7 @@ eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,
static int
eth_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id,
uint16_t nb_tx_desc __rte_unused,
- unsigned int socket_id __rte_unused,
+ unsigned int numa_id __rte_unused,
const struct rte_eth_txconf *tx_conf __rte_unused)
{
struct rte_mbuf *dummy_packet;
@@ -277,7 +277,7 @@ eth_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id,
dev->data->tx_queues[tx_queue_id] =
&internals->tx_null_queues[tx_queue_id];
- dummy_packet = rte_zmalloc_socket(NULL,
+ dummy_packet = rte_zmalloc_numa(NULL,
packet_size, 0, dev->data->numa_node);
if (dummy_packet == NULL)
return -ENOMEM;
@@ -500,7 +500,7 @@ static int
eth_dev_close(struct rte_eth_dev *dev)
{
PMD_LOG(INFO, "Closing null ethdev on NUMA socket %u",
- rte_socket_id());
+ rte_numa_id());
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
@@ -548,8 +548,8 @@ eth_dev_null_create(struct rte_vdev_device *dev, struct pmd_options *args)
0xBE, 0xAC, 0x01, 0xFA
};
- if (dev->device.numa_node == SOCKET_ID_ANY)
- dev->device.numa_node = rte_socket_id();
+ if (dev->device.numa_node == RTE_NUMA_ID_ANY)
+ dev->device.numa_node = rte_numa_id();
PMD_LOG(INFO, "Creating null ethdev on numa socket %u",
dev->device.numa_node);
--
2.55.0
More information about the dev
mailing list