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/pcap/pcap_ethdev.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c
index 1e114e0008..5307979da2 100644
--- a/drivers/net/pcap/pcap_ethdev.c
+++ b/drivers/net/pcap/pcap_ethdev.c
@@ -1150,7 +1150,7 @@ eth_dev_close(struct rte_eth_dev *dev)
        struct pmd_internals *internals = dev->data->dev_private;
 
        PMD_LOG(INFO, "Closing pcap ethdev on NUMA socket %d",
-                       rte_socket_id());
+                       rte_numa_id());
 
        eth_dev_stop(dev);
 
@@ -1212,7 +1212,7 @@ 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)
 {
@@ -1335,7 +1335,7 @@ 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,
+               unsigned int numa_id,
                const struct rte_eth_txconf *tx_conf __rte_unused)
 {
        struct pmd_internals *internals = dev->data->dev_private;
@@ -1343,8 +1343,8 @@ eth_tx_queue_setup(struct rte_eth_dev *dev,
 
        pcap_q->port_id = dev->data->port_id;
        pcap_q->queue_id = tx_queue_id;
-       pcap_q->bounce_buf = rte_malloc_socket(NULL, internals->snapshot_len,
-                                              RTE_CACHE_LINE_SIZE, socket_id);
+       pcap_q->bounce_buf = rte_malloc_numa(NULL, internals->snapshot_len,
+                                              RTE_CACHE_LINE_SIZE, numa_id);
        if (pcap_q->bounce_buf == NULL)
                return -ENOMEM;
 
@@ -1641,7 +1641,7 @@ pmd_init_internals(struct rte_vdev_device *vdev,
        PMD_LOG(INFO, "Creating pcap-backed ethdev on numa socket %u",
                numa_node);
 
-       pp = rte_zmalloc_socket("pcap_private", sizeof(struct 
pmd_process_private),
+       pp = rte_zmalloc_numa("pcap_private", sizeof(struct 
pmd_process_private),
                RTE_CACHE_LINE_SIZE, numa_node);
        if (pp == NULL) {
                PMD_LOG(ERR,
@@ -1709,7 +1709,7 @@ eth_pcap_update_mac(const char *if_name, struct 
rte_eth_dev *eth_dev,
        if (osdep_iface_mac_get(if_name, &mac) < 0)
                return -1;
 
-       mac_addrs = rte_zmalloc_socket("pcap_mac", RTE_ETHER_ADDR_LEN, 0, 
numa_node);
+       mac_addrs = rte_zmalloc_numa("pcap_mac", RTE_ETHER_ADDR_LEN, 0, 
numa_node);
        if (mac_addrs == NULL)
                return -1;
 
-- 
2.55.0

Reply via email to