From: Chengwen Feng <[email protected]> Rename socket_id parameters, local variables and comments to the NUMA node terminology, and switch calls to the NUMA-named APIs.
Signed-off-by: Chengwen Feng <[email protected]> --- examples/ntb/ntb_fwd.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/ntb/ntb_fwd.c b/examples/ntb/ntb_fwd.c index a53e8aae24..ac9cb2f71b 100644 --- a/examples/ntb/ntb_fwd.c +++ b/examples/ntb/ntb_fwd.c @@ -1098,7 +1098,7 @@ static struct rte_mempool * ntb_mbuf_pool_create(uint16_t mbuf_seg_size, uint32_t nb_mbuf, struct ntb_dev_info ntb_info, struct ntb_dev_config *ntb_conf, - unsigned int socket_id) + unsigned int numa_id) { size_t mz_len, total_elt_sz, max_mz_len, left_sz; struct rte_pktmbuf_pool_private mbp_priv; @@ -1110,12 +1110,12 @@ ntb_mbuf_pool_create(uint16_t mbuf_seg_size, uint32_t nb_mbuf, uint32_t mz_id; int ret; - snprintf(pool_name, sizeof(pool_name), "ntb_mbuf_pool_%u", socket_id); + snprintf(pool_name, sizeof(pool_name), "ntb_mbuf_pool_%u", numa_id); mp = rte_mempool_create_empty(pool_name, nb_mbuf, (mbuf_seg_size + sizeof(struct rte_mbuf)), MEMPOOL_CACHE_SIZE, sizeof(struct rte_pktmbuf_pool_private), - socket_id, 0); + numa_id, 0); if (mp == NULL) return NULL; @@ -1161,7 +1161,7 @@ ntb_mbuf_pool_create(uint16_t mbuf_seg_size, uint32_t nb_mbuf, * for a memory window of this length. */ align = rte_pmd_ntb_get_mem_align(dev_id, mz_id, mz_len); - mz = rte_memzone_reserve_aligned(mz_name, mz_len, socket_id, + mz = rte_memzone_reserve_aligned(mz_name, mz_len, numa_id, RTE_MEMZONE_IOVA_CONTIG, align); if (mz == NULL) { printf("Cannot allocate %" PRIu64 " aligned memzone" @@ -1258,7 +1258,7 @@ main(int argc, char **argv) nb_mbuf = nb_desc * num_queues * 2 * 2 + rte_lcore_count() * MEMPOOL_CACHE_SIZE; mbuf_pool = ntb_mbuf_pool_create(ntb_buf_size, nb_mbuf, ntb_info, - &ntb_conf, rte_socket_id()); + &ntb_conf, rte_numa_id()); if (mbuf_pool == NULL) rte_exit(EXIT_FAILURE, "Cannot create mbuf pool.\n"); @@ -1327,13 +1327,13 @@ main(int argc, char **argv) /* Setup ethdev queue if ethdev exists */ for (i = 0; i < num_queues; i++) { ret = rte_eth_rx_queue_setup(eth_port_id, i, nb_desc, - rte_eth_dev_socket_id(eth_port_id), + rte_eth_dev_numa_id(eth_port_id), ð_rx_conf, mbuf_pool); if (ret < 0) rte_exit(EXIT_FAILURE, "Failed to setup eth rxq %u.\n", i); ret = rte_eth_tx_queue_setup(eth_port_id, i, nb_desc, - rte_eth_dev_socket_id(eth_port_id), + rte_eth_dev_numa_id(eth_port_id), ð_tx_conf); if (ret < 0) rte_exit(EXIT_FAILURE, -- 2.55.0

