From: Chengwen Feng <[email protected]>

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 <[email protected]>
---
 drivers/net/ngbe/ngbe_ethdev.c |  2 +-
 drivers/net/ngbe/ngbe_ethdev.h |  4 ++--
 drivers/net/ngbe/ngbe_rxtx.c   | 28 ++++++++++++++--------------
 3 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index dc8e65ecc2..2ad76e7a3c 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -388,7 +388,7 @@ eth_ngbe_dev_init(struct rte_eth_dev *eth_dev, void 
*init_params __rte_unused)
 
        /* Reserve memory for interrupt status block */
        mz = rte_eth_dma_zone_reserve(eth_dev, "ngbe_driver", -1,
-               NGBE_ISB_SIZE, NGBE_ALIGN, SOCKET_ID_ANY);
+               NGBE_ISB_SIZE, NGBE_ALIGN, RTE_NUMA_ID_ANY);
        if (mz == NULL)
                return -ENOMEM;
 
diff --git a/drivers/net/ngbe/ngbe_ethdev.h b/drivers/net/ngbe/ngbe_ethdev.h
index 12ee884ce1..6e6bee6391 100644
--- a/drivers/net/ngbe/ngbe_ethdev.h
+++ b/drivers/net/ngbe/ngbe_ethdev.h
@@ -186,12 +186,12 @@ void ngbe_dev_rx_queue_release(struct rte_eth_dev *dev, 
uint16_t qid);
 void ngbe_dev_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid);
 
 int  ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,
-               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  ngbe_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id,
-               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 ngbe_dev_rx_queue_count(void *rx_queue);
diff --git a/drivers/net/ngbe/ngbe_rxtx.c b/drivers/net/ngbe/ngbe_rxtx.c
index a1389de9c0..e4be3edc95 100644
--- a/drivers/net/ngbe/ngbe_rxtx.c
+++ b/drivers/net/ngbe/ngbe_rxtx.c
@@ -2007,7 +2007,7 @@ int
 ngbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
                         uint16_t queue_idx,
                         uint16_t nb_desc,
-                        unsigned int socket_id,
+                        unsigned int numa_id,
                         const struct rte_eth_txconf *tx_conf)
 {
        const struct rte_memzone *tz;
@@ -2055,16 +2055,16 @@ ngbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
        }
 
        /* First allocate the Tx queue data structure */
-       txq = rte_zmalloc_socket("ethdev Tx queue",
+       txq = rte_zmalloc_numa("ethdev Tx queue",
                                 sizeof(struct ngbe_tx_queue),
-                                RTE_CACHE_LINE_SIZE, socket_id);
+                                RTE_CACHE_LINE_SIZE, numa_id);
        if (txq == NULL)
                return -ENOMEM;
 
        /* Allocate Tx ring hardware descriptors. */
        tz = rte_eth_dma_zone_reserve(dev, "tx_ring", queue_idx,
                        sizeof(struct ngbe_tx_desc) * nb_desc,
-                       NGBE_ALIGN, socket_id);
+                       NGBE_ALIGN, numa_id);
        if (tz == NULL) {
                ngbe_tx_queue_release(txq);
                return -ENOMEM;
@@ -2091,9 +2091,9 @@ ngbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
        txq->tx_ring = (struct ngbe_tx_desc *)TMZ_VADDR(tz);
 
        /* Allocate software ring */
-       txq->sw_ring = rte_zmalloc_socket("txq->sw_ring",
+       txq->sw_ring = rte_zmalloc_numa("txq->sw_ring",
                                sizeof(struct ngbe_tx_entry) * nb_desc,
-                               RTE_CACHE_LINE_SIZE, socket_id);
+                               RTE_CACHE_LINE_SIZE, numa_id);
        if (txq->sw_ring == NULL) {
                ngbe_tx_queue_release(txq);
                return -ENOMEM;
@@ -2313,7 +2313,7 @@ int
 ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
                         uint16_t queue_idx,
                         uint16_t nb_desc,
-                        unsigned int socket_id,
+                        unsigned int numa_id,
                         const struct rte_eth_rxconf *rx_conf,
                         struct rte_mempool *mp)
 {
@@ -2337,9 +2337,9 @@ ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
        }
 
        /* First allocate the Rx queue data structure */
-       rxq = rte_zmalloc_socket("ethdev RX queue",
+       rxq = rte_zmalloc_numa("ethdev RX queue",
                                 sizeof(struct ngbe_rx_queue),
-                                RTE_CACHE_LINE_SIZE, socket_id);
+                                RTE_CACHE_LINE_SIZE, numa_id);
        if (rxq == NULL)
                return -ENOMEM;
        rxq->mb_pool = mp;
@@ -2360,7 +2360,7 @@ ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
        /* Allocate Rx ring hardware descriptors. */
        size = (nb_desc + RTE_PMD_NGBE_RX_MAX_BURST) * sizeof(struct 
ngbe_rx_desc);
        rz = rte_eth_dma_zone_reserve(dev, "rx_ring", queue_idx,
-                                     size, NGBE_ALIGN, socket_id);
+                                     size, NGBE_ALIGN, numa_id);
        if (rz == NULL) {
                ngbe_rx_queue_release(rxq);
                return -ENOMEM;
@@ -2399,9 +2399,9 @@ ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
        if (adapter->rx_bulk_alloc_allowed)
                len += RTE_PMD_NGBE_RX_MAX_BURST;
 
-       rxq->sw_ring = rte_zmalloc_socket("rxq->sw_ring",
+       rxq->sw_ring = rte_zmalloc_numa("rxq->sw_ring",
                                          sizeof(struct ngbe_rx_entry) * len,
-                                         RTE_CACHE_LINE_SIZE, socket_id);
+                                         RTE_CACHE_LINE_SIZE, numa_id);
        if (rxq->sw_ring == NULL) {
                ngbe_rx_queue_release(rxq);
                return -ENOMEM;
@@ -2416,9 +2416,9 @@ ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
         * dev_start() flow.
         */
        rxq->sw_sc_ring =
-               rte_zmalloc_socket("rxq->sw_sc_ring",
+               rte_zmalloc_numa("rxq->sw_sc_ring",
                                  sizeof(struct ngbe_scattered_rx_entry) * len,
-                                 RTE_CACHE_LINE_SIZE, socket_id);
+                                 RTE_CACHE_LINE_SIZE, numa_id);
        if (rxq->sw_sc_ring == NULL) {
                ngbe_rx_queue_release(rxq);
                return -ENOMEM;
-- 
2.55.0

Reply via email to