Re: [PATCH v2] app/testpmd Fix max_socket detection
From: De Lara Guarch, Pablo <hidden>
Date: 2016-03-02 11:04:39
quoted hunk ↗ jump to hunk
-----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Stephen Hurd Sent: Wednesday, January 13, 2016 10:24 PM To: dev@dpdk.org Subject: [dpdk-dev] [PATCH v2] app/testpmd Fix max_socket detection Previously, max_socket was set to the highest numbered socket with an enabled lcore. The intent is to set it to the highest socket regardless of it being enabled. Change-Id: I6306af0f90aa3c1fc5ffed75d1eed8297d29e132 Signed-off-by: Stephen Hurd <redacted> v2: Forgot to commit before sending email... sorry for the nouse. --- app/test-pmd/testpmd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 6129c26..a4088f9 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c@@ -359,17 +359,17 @@ set_default_fwd_lcores_config(void) nb_lc = 0; for (i = 0; i < RTE_MAX_LCORE; i++) { - if (! rte_lcore_is_enabled(i)) - continue; - if (i == rte_get_master_lcore()) - continue; - fwd_lcores_cpuids[nb_lc++] = i; sock_num = rte_lcore_to_socket_id(i) + 1; if (sock_num > max_socket) { if (sock_num > RTE_MAX_NUMA_NODES) rte_exit(EXIT_FAILURE, "Total sockets greaterthan %u\n", RTE_MAX_NUMA_NODES); max_socket = sock_num; } + if (! rte_lcore_is_enabled(i)) + continue; + if (i == rte_get_master_lcore()) + continue; + fwd_lcores_cpuids[nb_lc++] = i; } nb_lcores = (lcoreid_t) nb_lc; nb_cfg_lcores = nb_lcores; -- 1.9.1
Acked-by: Pablo de Lara <redacted>