[PATCH 143/227] net/r8169: use NUMA node terminology

Chengwen Feng chengwen.feng at linux.dev
Tue Nov 3 15:51:41 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/r8169/r8169_ethdev.h |  4 ++--
 drivers/net/r8169/r8169_hw.c     |  2 +-
 drivers/net/r8169/r8169_rxtx.c   | 16 ++++++++--------
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/net/r8169/r8169_ethdev.h b/drivers/net/r8169/r8169_ethdev.h
index d3676ee7d2..d73c96e5cf 100644
--- a/drivers/net/r8169/r8169_ethdev.h
+++ b/drivers/net/r8169/r8169_ethdev.h
@@ -289,11 +289,11 @@ uint64_t rtl_get_rx_port_offloads(struct rtl_hw *hw);
 uint64_t rtl_get_tx_port_offloads(void);
 
 int rtl_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
-		       uint16_t nb_rx_desc, unsigned int socket_id,
+		       uint16_t nb_rx_desc, unsigned int numa_id,
 		       const struct rte_eth_rxconf *rx_conf,
 		       struct rte_mempool *mb_pool);
 int rtl_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
-		       uint16_t nb_tx_desc, unsigned int socket_id,
+		       uint16_t nb_tx_desc, unsigned int numa_id,
 		       const struct rte_eth_txconf *tx_conf);
 
 int rtl_tx_done_cleanup(void *tx_queue, uint32_t free_cnt);
diff --git a/drivers/net/r8169/r8169_hw.c b/drivers/net/r8169/r8169_hw.c
index f15bd579fd..4de7aa4ac1 100644
--- a/drivers/net/r8169/r8169_hw.c
+++ b/drivers/net/r8169/r8169_hw.c
@@ -2597,7 +2597,7 @@ rtl_tally_init(struct rte_eth_dev *dev)
 	const struct rte_memzone *mz;
 
 	mz = rte_eth_dma_zone_reserve(dev, "tally_counters", 0,
-				      sizeof(struct rtl_counters), 64, rte_socket_id());
+				      sizeof(struct rtl_counters), 64, rte_numa_id());
 	if (mz == NULL)
 		return -ENOMEM;
 
diff --git a/drivers/net/r8169/r8169_rxtx.c b/drivers/net/r8169/r8169_rxtx.c
index 00de0471f4..7d39e56b8c 100644
--- a/drivers/net/r8169/r8169_rxtx.c
+++ b/drivers/net/r8169/r8169_rxtx.c
@@ -328,7 +328,7 @@ rtl_get_rx_port_offloads(struct rtl_hw *hw)
 
 int
 rtl_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
-		   uint16_t nb_rx_desc, unsigned int socket_id,
+		   uint16_t nb_rx_desc, unsigned int numa_id,
 		   const struct rte_eth_rxconf *rx_conf,
 		   struct rte_mempool *mb_pool)
 {
@@ -351,8 +351,8 @@ rtl_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	}
 
 	/* First allocate the rx queue data structure */
-	rxq = rte_zmalloc_socket("r8169 RX queue", sizeof(struct rtl_rx_queue),
-				 RTE_CACHE_LINE_SIZE, socket_id);
+	rxq = rte_zmalloc_numa("r8169 RX queue", sizeof(struct rtl_rx_queue),
+				 RTE_CACHE_LINE_SIZE, numa_id);
 
 	if (rxq == NULL) {
 		PMD_INIT_LOG(ERR, "Cannot allocate Rx queue structure");
@@ -385,7 +385,7 @@ rtl_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	 */
 	size = hw->RxDescLength * (nb_rx_desc + 1);
 	mz = rte_eth_dma_zone_reserve(dev, "rx_ring", queue_idx, size,
-				      RTL_RING_ALIGN, socket_id);
+				      RTL_RING_ALIGN, numa_id);
 	if (mz == NULL) {
 		PMD_INIT_LOG(ERR,
 			     "Port %d: Cannot allocate software ring for queue %d",
@@ -1258,7 +1258,7 @@ rtl_get_tx_port_offloads(void)
 
 int
 rtl_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
-		   uint16_t nb_tx_desc, unsigned int socket_id,
+		   uint16_t nb_tx_desc, unsigned int numa_id,
 		   const struct rte_eth_txconf *tx_conf)
 {
 	struct rtl_tx_queue *txq;
@@ -1279,8 +1279,8 @@ rtl_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 		dev->data->tx_queues[queue_idx] = NULL;
 	}
 
-	txq = rte_zmalloc_socket("r8169 TX queue", sizeof(struct rtl_tx_queue),
-				 RTE_CACHE_LINE_SIZE, socket_id);
+	txq = rte_zmalloc_numa("r8169 TX queue", sizeof(struct rtl_tx_queue),
+				 RTE_CACHE_LINE_SIZE, numa_id);
 
 	if (!txq) {
 		PMD_INIT_LOG(ERR, "Cannot allocate Tx queue structure");
@@ -1312,7 +1312,7 @@ rtl_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	 */
 	size = sizeof(struct rtl_tx_desc) * (nb_tx_desc + 1);
 	mz = rte_eth_dma_zone_reserve(dev, "tx_ring", queue_idx, size,
-				      RTL_RING_ALIGN, socket_id);
+				      RTL_RING_ALIGN, numa_id);
 	if (mz == NULL) {
 		PMD_INIT_LOG(ERR,
 			     "Port %d: Cannot allocate hardware ring for queue %d",
-- 
2.55.0



More information about the dev mailing list