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/thunderx/nicvf_ethdev.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/net/thunderx/nicvf_ethdev.c 
b/drivers/net/thunderx/nicvf_ethdev.c
index 2ed4390522..0671de6691 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -705,7 +705,7 @@ nicvf_qset_rbdr_alloc(struct rte_eth_dev *dev, struct nicvf 
*nic,
        uint32_t ring_size;
 
        assert(nic->rbdr == NULL);
-       rbdr = rte_zmalloc_socket("rbdr", sizeof(struct nicvf_rbdr),
+       rbdr = rte_zmalloc_numa("rbdr", sizeof(struct nicvf_rbdr),
                                  RTE_CACHE_LINE_SIZE, nic->node);
        if (rbdr == NULL) {
                PMD_INIT_LOG(ERR, "Failed to allocate mem for rbdr");
@@ -1012,7 +1012,7 @@ nicvf_set_rx_function(struct rte_eth_dev *dev)
 
 static int
 nicvf_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t qidx,
-                        uint16_t nb_desc, unsigned int socket_id,
+                        uint16_t nb_desc, unsigned int numa_id,
                         const struct rte_eth_txconf *tx_conf)
 {
        uint16_t tx_free_thresh;
@@ -1029,9 +1029,9 @@ nicvf_dev_tx_queue_setup(struct rte_eth_dev *dev, 
uint16_t qidx,
        qidx = qidx % MAX_SND_QUEUES_PER_QS;
 
        /* Socket id check */
-       if (socket_id != (unsigned int)SOCKET_ID_ANY && socket_id != nic->node)
-               PMD_DRV_LOG(WARNING, "socket_id expected %d, configured %d",
-               socket_id, nic->node);
+       if (numa_id != (unsigned int)RTE_NUMA_ID_ANY && numa_id != nic->node)
+               PMD_DRV_LOG(WARNING, "numa_id expected %d, configured %d",
+               numa_id, nic->node);
 
        /* Tx deferred start is not supported */
        if (tx_conf->tx_deferred_start) {
@@ -1070,7 +1070,7 @@ nicvf_dev_tx_queue_setup(struct rte_eth_dev *dev, 
uint16_t qidx,
        }
 
        /* Allocating tx queue data structure */
-       txq = rte_zmalloc_socket("ethdev TX queue", sizeof(struct nicvf_txq),
+       txq = rte_zmalloc_numa("ethdev TX queue", sizeof(struct nicvf_txq),
                                        RTE_CACHE_LINE_SIZE, nic->node);
        if (txq == NULL) {
                PMD_INIT_LOG(ERR, "Failed to allocate txq=%d",
@@ -1102,7 +1102,7 @@ nicvf_dev_tx_queue_setup(struct rte_eth_dev *dev, 
uint16_t qidx,
        dev->data->tx_queues[nicvf_netdev_qidx(nic, qidx)] = txq;
 
        /* Allocate software ring */
-       txq->txbuffs = rte_zmalloc_socket("txq->txbuffs",
+       txq->txbuffs = rte_zmalloc_numa("txq->txbuffs",
                                nb_desc * sizeof(struct rte_mbuf *),
                                RTE_CACHE_LINE_SIZE, nic->node);
 
@@ -1343,7 +1343,7 @@ nicvf_rxq_mbuf_setup(struct nicvf_rxq *rxq)
 
 static int
 nicvf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t qidx,
-                        uint16_t nb_desc, unsigned int socket_id,
+                        uint16_t nb_desc, unsigned int numa_id,
                         const struct rte_eth_rxconf *rx_conf,
                         struct rte_mempool *mp)
 {
@@ -1370,9 +1370,9 @@ nicvf_dev_rx_queue_setup(struct rte_eth_dev *dev, 
uint16_t qidx,
        qidx = qidx % MAX_RCV_QUEUES_PER_QS;
 
        /* Socket id check */
-       if (socket_id != (unsigned int)SOCKET_ID_ANY && socket_id != nic->node)
-               PMD_DRV_LOG(WARNING, "socket_id expected %d, configured %d",
-               socket_id, nic->node);
+       if (numa_id != (unsigned int)RTE_NUMA_ID_ANY && numa_id != nic->node)
+               PMD_DRV_LOG(WARNING, "numa_id expected %d, configured %d",
+               numa_id, nic->node);
 
        /* Mempool memory must be contiguous, so must be one memory segment*/
        if (mp->nb_mem_chunks != 1) {
@@ -1420,7 +1420,7 @@ nicvf_dev_rx_queue_setup(struct rte_eth_dev *dev, 
uint16_t qidx,
        }
 
        /* Allocate rxq memory */
-       rxq = rte_zmalloc_socket("ethdev rx queue", sizeof(struct nicvf_rxq),
+       rxq = rte_zmalloc_numa("ethdev rx queue", sizeof(struct nicvf_rxq),
                                        RTE_CACHE_LINE_SIZE, nic->node);
        if (rxq == NULL) {
                PMD_INIT_LOG(ERR, "Failed to allocate rxq=%d",
-- 
2.55.0

Reply via email to