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/qos_meter/main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/qos_meter/main.c b/examples/qos_meter/main.c index 59759355cd..efe6d3b63c 100644 --- a/examples/qos_meter/main.c +++ b/examples/qos_meter/main.c @@ -319,7 +319,7 @@ main(int argc, char **argv) /* Buffer pool init */ pool = rte_pktmbuf_pool_create("pool", NB_MBUF, MEMPOOL_CACHE_SIZE, - 0, RTE_MBUF_DEFAULT_BUF_SIZE, rte_socket_id()); + 0, RTE_MBUF_DEFAULT_BUF_SIZE, rte_numa_id()); if (pool == NULL) rte_exit(EXIT_FAILURE, "Buffer pool creation error\n"); @@ -359,7 +359,7 @@ main(int argc, char **argv) rxq_conf = dev_info.default_rxconf; rxq_conf.offloads = conf.rxmode.offloads; ret = rte_eth_rx_queue_setup(port_rx, NIC_RX_QUEUE, nb_rxd, - rte_eth_dev_socket_id(port_rx), + rte_eth_dev_numa_id(port_rx), &rxq_conf, pool); if (ret < 0) rte_exit(EXIT_FAILURE, "Port %d RX queue setup error (%d)\n", port_rx, ret); @@ -367,7 +367,7 @@ main(int argc, char **argv) txq_conf = dev_info.default_txconf; txq_conf.offloads = conf.txmode.offloads; ret = rte_eth_tx_queue_setup(port_rx, NIC_TX_QUEUE, nb_txd, - rte_eth_dev_socket_id(port_rx), + rte_eth_dev_numa_id(port_rx), &txq_conf); if (ret < 0) rte_exit(EXIT_FAILURE, "Port %d TX queue setup error (%d)\n", port_rx, ret); @@ -409,7 +409,7 @@ main(int argc, char **argv) rxq_conf = dev_info.default_rxconf; rxq_conf.offloads = conf.rxmode.offloads; ret = rte_eth_rx_queue_setup(port_tx, NIC_RX_QUEUE, nb_rxd, - rte_eth_dev_socket_id(port_tx), + rte_eth_dev_numa_id(port_tx), NULL, pool); if (ret < 0) rte_exit(EXIT_FAILURE, "Port %d RX queue setup error (%d)\n", port_tx, ret); @@ -417,14 +417,14 @@ main(int argc, char **argv) txq_conf = dev_info.default_txconf; txq_conf.offloads = conf.txmode.offloads; ret = rte_eth_tx_queue_setup(port_tx, NIC_TX_QUEUE, nb_txd, - rte_eth_dev_socket_id(port_tx), + rte_eth_dev_numa_id(port_tx), NULL); if (ret < 0) rte_exit(EXIT_FAILURE, "Port %d TX queue setup error (%d)\n", port_tx, ret); - tx_buffer = rte_zmalloc_socket("tx_buffer", + tx_buffer = rte_zmalloc_numa("tx_buffer", RTE_ETH_TX_BUFFER_SIZE(RTE_MBUF_F_TX_BURST_MAX), 0, - rte_eth_dev_socket_id(port_tx)); + rte_eth_dev_numa_id(port_tx)); if (tx_buffer == NULL) rte_exit(EXIT_FAILURE, "Port %d TX buffer allocation error\n", port_tx); -- 2.55.0

