[PATCH 111/227] net/cnxk: use NUMA node terminology
Chengwen Feng
chengwen.feng at linux.dev
Tue Nov 3 15:51:09 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/cnxk/cnxk_eswitch.c | 2 +-
drivers/net/cnxk/cnxk_ethdev_sec.c | 6 +++---
drivers/net/cnxk/cnxk_lookup.c | 2 +-
drivers/net/cnxk/cnxk_rep.h | 4 ++--
drivers/net/cnxk/cnxk_rep_ops.c | 8 ++++----
5 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/net/cnxk/cnxk_eswitch.c b/drivers/net/cnxk/cnxk_eswitch.c
index 57e2c490df..741621959e 100644
--- a/drivers/net/cnxk/cnxk_eswitch.c
+++ b/drivers/net/cnxk/cnxk_eswitch.c
@@ -722,7 +722,7 @@ cnxk_eswitch_dev_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pc
return 0;
mz = rte_memzone_reserve_aligned(CNXK_REP_ESWITCH_DEV_MZ, sizeof(*eswitch_dev),
- SOCKET_ID_ANY, 0, RTE_CACHE_LINE_SIZE);
+ RTE_NUMA_ID_ANY, 0, RTE_CACHE_LINE_SIZE);
if (mz == NULL) {
plt_err("Failed to reserve a memzone");
goto fail;
diff --git a/drivers/net/cnxk/cnxk_ethdev_sec.c b/drivers/net/cnxk/cnxk_ethdev_sec.c
index d208569168..4c41151bdc 100644
--- a/drivers/net/cnxk/cnxk_ethdev_sec.c
+++ b/drivers/net/cnxk/cnxk_ethdev_sec.c
@@ -87,7 +87,7 @@ cnxk_nix_inl_meta_pool_cb(uint64_t *aura_handle, uintptr_t *mpool, uint32_t buf_
*/
mp = rte_mempool_create_empty(mp_name, nb_bufs, buf_sz, 0,
sizeof(struct rte_pktmbuf_pool_private),
- SOCKET_ID_ANY, 0);
+ RTE_NUMA_ID_ANY, 0);
if (!mp) {
plt_err("Failed to create inline meta pool");
return -EIO;
@@ -157,7 +157,7 @@ cnxk_nix_inl_custom_meta_pool_cb(uintptr_t pmpool, uintptr_t *mpool, const char
*/
hp = rte_mempool_create_empty(mempool_name, nb_bufs, buf_sz, 0,
sizeof(struct rte_pktmbuf_pool_private),
- SOCKET_ID_ANY, 0);
+ RTE_NUMA_ID_ANY, 0);
if (!hp) {
plt_err("Failed to create inline meta pool");
return -EIO;
@@ -865,7 +865,7 @@ cnxk_nix_inl_dev_probe(struct rte_pci_driver *pci_drv,
return 0;
mz = rte_memzone_reserve_aligned(nix_inl_dev_to_name(pci_dev, name),
- sizeof(*inl_dev), SOCKET_ID_ANY, 0,
+ sizeof(*inl_dev), RTE_NUMA_ID_ANY, 0,
RTE_CACHE_LINE_SIZE);
if (mz == NULL)
return rc;
diff --git a/drivers/net/cnxk/cnxk_lookup.c b/drivers/net/cnxk/cnxk_lookup.c
index 7af9cb111e..9504327e58 100644
--- a/drivers/net/cnxk/cnxk_lookup.c
+++ b/drivers/net/cnxk/cnxk_lookup.c
@@ -316,7 +316,7 @@ cnxk_nix_fastpath_lookup_mem_get(void)
return mz->addr;
/* Request for the first time */
- mz = rte_memzone_reserve_aligned(name, LOOKUP_ARRAY_SZ, SOCKET_ID_ANY,
+ mz = rte_memzone_reserve_aligned(name, LOOKUP_ARRAY_SZ, RTE_NUMA_ID_ANY,
0, ROC_ALIGN);
if (mz != NULL) {
mem = mz->addr;
diff --git a/drivers/net/cnxk/cnxk_rep.h b/drivers/net/cnxk/cnxk_rep.h
index 9ede1e6dad..b891856bb7 100644
--- a/drivers/net/cnxk/cnxk_rep.h
+++ b/drivers/net/cnxk/cnxk_rep.h
@@ -122,10 +122,10 @@ int cnxk_rep_dev_configure(struct rte_eth_dev *eth_dev);
int cnxk_rep_link_update(struct rte_eth_dev *eth_dev, int wait_to_compl);
int cnxk_rep_dev_start(struct rte_eth_dev *eth_dev);
int cnxk_rep_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t queue_idx, uint16_t nb_desc,
- unsigned int socket_id, const struct rte_eth_rxconf *rx_conf,
+ unsigned int numa_id, const struct rte_eth_rxconf *rx_conf,
struct rte_mempool *mp);
int cnxk_rep_tx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t queue_idx, uint16_t nb_desc,
- unsigned int socket_id, const struct rte_eth_txconf *tx_conf);
+ unsigned int numa_id, const struct rte_eth_txconf *tx_conf);
void cnxk_rep_rx_queue_release(struct rte_eth_dev *dev, uint16_t queue_idx);
void cnxk_rep_tx_queue_release(struct rte_eth_dev *dev, uint16_t queue_idx);
int cnxk_rep_dev_stop(struct rte_eth_dev *eth_dev);
diff --git a/drivers/net/cnxk/cnxk_rep_ops.c b/drivers/net/cnxk/cnxk_rep_ops.c
index d4f260af20..792de73bba 100644
--- a/drivers/net/cnxk/cnxk_rep_ops.c
+++ b/drivers/net/cnxk/cnxk_rep_ops.c
@@ -288,7 +288,7 @@ cnxk_rep_dev_stop(struct rte_eth_dev *ethdev)
int
cnxk_rep_rx_queue_setup(struct rte_eth_dev *ethdev, uint16_t rx_queue_id, uint16_t nb_rx_desc,
- unsigned int socket_id, const struct rte_eth_rxconf *rx_conf,
+ unsigned int numa_id, const struct rte_eth_rxconf *rx_conf,
struct rte_mempool *mb_pool)
{
struct cnxk_rep_dev *rep_dev = cnxk_rep_pmd_priv(ethdev);
@@ -296,7 +296,7 @@ cnxk_rep_rx_queue_setup(struct rte_eth_dev *ethdev, uint16_t rx_queue_id, uint16
uint16_t qid = 0;
int rc;
- PLT_SET_USED(socket_id);
+ PLT_SET_USED(numa_id);
/* If no representee assigned, store the respective rxq parameters */
if (!rep_dev->is_vf_active && !rep_dev->rxq) {
rxq = plt_zmalloc(sizeof(*rxq), RTE_CACHE_LINE_SIZE);
@@ -384,13 +384,13 @@ cnxk_rep_rx_queue_release(struct rte_eth_dev *ethdev, uint16_t queue_id)
int
cnxk_rep_tx_queue_setup(struct rte_eth_dev *ethdev, uint16_t tx_queue_id, uint16_t nb_tx_desc,
- unsigned int socket_id, const struct rte_eth_txconf *tx_conf)
+ unsigned int numa_id, const struct rte_eth_txconf *tx_conf)
{
struct cnxk_rep_dev *rep_dev = cnxk_rep_pmd_priv(ethdev);
struct cnxk_rep_txq *txq = NULL;
int rc = 0, qid = 0;
- PLT_SET_USED(socket_id);
+ PLT_SET_USED(numa_id);
/* If no representee assigned, store the respective rxq parameters */
if (!rep_dev->is_vf_active && !rep_dev->txq) {
txq = plt_zmalloc(sizeof(*txq), RTE_CACHE_LINE_SIZE);
--
2.55.0
More information about the dev
mailing list