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/l3fwd-power/main.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index 5b4cb9f210..4017722122 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -1414,7 +1414,7 @@ check_lcore_params(void) "mask\n", lcore); return -1; } - socketid = rte_lcore_to_socket_id(lcore); + socketid = rte_lcore_to_numa_id(lcore); if (socketid != 0 && numa_on == 0) { printf("warning: lcore %u is on socket %d with numa " "off\n", lcore, socketid); @@ -1944,7 +1944,7 @@ setup_hash(int socketid) /* create ipv4 hash */ snprintf(s, sizeof(s), "ipv4_l3fwd_hash_%d", socketid); ipv4_l3fwd_hash_params.name = s; - ipv4_l3fwd_hash_params.socket_id = socketid; + ipv4_l3fwd_hash_params.numa_id = socketid; ipv4_l3fwd_lookup_struct[socketid] = rte_hash_create(&ipv4_l3fwd_hash_params); if (ipv4_l3fwd_lookup_struct[socketid] == NULL) @@ -1954,7 +1954,7 @@ setup_hash(int socketid) /* create ipv6 hash */ snprintf(s, sizeof(s), "ipv6_l3fwd_hash_%d", socketid); ipv6_l3fwd_hash_params.name = s; - ipv6_l3fwd_hash_params.socket_id = socketid; + ipv6_l3fwd_hash_params.numa_id = socketid; ipv6_l3fwd_lookup_struct[socketid] = rte_hash_create(&ipv6_l3fwd_hash_params); if (ipv6_l3fwd_lookup_struct[socketid] == NULL) @@ -2046,7 +2046,7 @@ init_mem(unsigned nb_mbuf) continue; if (numa_on) - socketid = rte_lcore_to_socket_id(lcore_id); + socketid = rte_lcore_to_numa_id(lcore_id); else socketid = 0; @@ -2738,9 +2738,9 @@ main(int argc, char **argv) /* Initialize TX buffers */ qconf = &lcore_conf[lcore_id]; - qconf->tx_buffer[portid] = rte_zmalloc_socket("tx_buffer", + qconf->tx_buffer[portid] = rte_zmalloc_numa("tx_buffer", RTE_ETH_TX_BUFFER_SIZE(MAX_PKT_BURST), 0, - rte_eth_dev_socket_id(portid)); + rte_eth_dev_numa_id(portid)); if (qconf->tx_buffer[portid] == NULL) rte_exit(EXIT_FAILURE, "Can't allocate tx buffer for port %u\n", portid); @@ -2759,7 +2759,7 @@ main(int argc, char **argv) if (numa_on) socketid = \ - (uint8_t)rte_lcore_to_socket_id(lcore_id); + (uint8_t)rte_lcore_to_numa_id(lcore_id); else socketid = 0; @@ -2811,7 +2811,7 @@ main(int argc, char **argv) if (numa_on) socketid = \ - (uint8_t)rte_lcore_to_socket_id(lcore_id); + (uint8_t)rte_lcore_to_numa_id(lcore_id); else socketid = 0; @@ -2918,7 +2918,7 @@ main(int argc, char **argv) unsigned int i; /* Init metrics library */ - rte_metrics_init(rte_socket_id()); + rte_metrics_init(rte_numa_id()); /** Register stats with metrics library */ for (i = 0; i < NUM_TELSTATS; i++) ptr_strings[i] = telstats_strings[i].name; -- 2.55.0

