[PATCH 149/227] net/tap: use NUMA node terminology
Chengwen Feng
chengwen.feng at linux.dev
Tue Nov 3 15:51:47 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/tap/rte_eth_tap.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 1d2b71675a..c6a998cbd5 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -1155,7 +1155,7 @@ tap_dev_close(struct rte_eth_dev *dev)
internals = dev->data->dev_private;
TAP_LOG(DEBUG, "Closing %s Ethernet device on numa %u",
- tuntap_types[internals->type], rte_socket_id());
+ tuntap_types[internals->type], rte_numa_id());
rte_intr_instance_free(internals->intr_handle);
@@ -1503,7 +1503,7 @@ tap_gso_ctx_setup(struct rte_gso_ctx *gso_ctx, struct rte_eth_dev *dev)
pmd->gso_ctx_mp = rte_pktmbuf_pool_create(pool_name,
TAP_GSO_MBUFS_NUM, TAP_GSO_MBUF_CACHE_SIZE, 0,
RTE_PKTMBUF_HEADROOM + TAP_GSO_MBUF_SEG_SIZE,
- SOCKET_ID_ANY);
+ RTE_NUMA_ID_ANY);
if (!pmd->gso_ctx_mp) {
TAP_LOG(ERR,
"%s: failed to create mbuf pool for device %s",
@@ -1569,7 +1569,7 @@ static int
tap_rx_queue_setup(struct rte_eth_dev *dev,
uint16_t rx_queue_id,
uint16_t nb_rx_desc __rte_unused,
- unsigned int socket_id,
+ unsigned int numa_id,
const struct rte_eth_rxconf *rx_conf __rte_unused,
struct rte_mempool *mp)
{
@@ -1619,9 +1619,9 @@ tap_rx_queue_setup(struct rte_eth_dev *dev,
dev->device->name, dev->data->mtu, max_rx_segs);
}
- rxq = rte_zmalloc_socket(dev->device->name,
+ rxq = rte_zmalloc_numa(dev->device->name,
sizeof(*rxq) + (max_rx_segs + 1) * sizeof(struct iovec),
- RTE_CACHE_LINE_SIZE, socket_id);
+ RTE_CACHE_LINE_SIZE, numa_id);
if (!rxq) {
TAP_LOG(ERR,
"%s: Couldn't allocate rx queue structure",
@@ -1687,7 +1687,7 @@ static int
tap_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)
{
struct pmd_internals *internals = dev->data->dev_private;
@@ -1699,8 +1699,8 @@ tap_tx_queue_setup(struct rte_eth_dev *dev,
if (tx_queue_id >= dev->data->nb_tx_queues)
return -1;
- txq = rte_zmalloc_socket(dev->device->name, sizeof(*txq),
- RTE_CACHE_LINE_SIZE, socket_id);
+ txq = rte_zmalloc_numa(dev->device->name, sizeof(*txq),
+ RTE_CACHE_LINE_SIZE, numa_id);
if (!txq) {
TAP_LOG(ERR,
"%s: Couldn't allocate tx queue structure",
@@ -2150,7 +2150,7 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, const char *tap_name,
const char *remote_iface, struct rte_ether_addr *mac_addr,
enum rte_tuntap_type type, bool persist)
{
- int numa_node = rte_socket_id();
+ int numa_node = rte_numa_id();
struct rte_eth_dev *dev;
struct pmd_internals *pmd;
struct pmd_process_private *process_private;
@@ -2158,7 +2158,7 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, const char *tap_name,
struct rte_eth_dev_data *data;
int i;
- TAP_LOG(DEBUG, "%s device on numa %u", tuntap_name, rte_socket_id());
+ TAP_LOG(DEBUG, "%s device on numa %u", tuntap_name, rte_numa_id());
dev = rte_eth_vdev_allocate(vdev, sizeof(*pmd));
if (!dev) {
@@ -2198,7 +2198,7 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, const char *tap_name,
data->numa_node = numa_node;
data->dev_link = pmd_link;
- data->mac_addrs = rte_calloc_socket(rte_vdev_device_name(vdev),
+ data->mac_addrs = rte_calloc_numa(rte_vdev_device_name(vdev),
TAP_MAX_MAC_ADDRS,
sizeof(*data->mac_addrs),
0, numa_node);
--
2.55.0
More information about the dev
mailing list