summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorPhil Yang <phil.yang@arm.com>2018-09-12 09:54:26 +0800
committerThomas Monjalon <thomas@monjalon.net>2018-09-19 15:21:36 +0200
commitdbfb8ec7094c7115c6d620929de2aedfc9e440aa (patch)
tree22e4e014c966e65c6b3f8bf1f961b89a7df6506d /app
parentc127be93f619a8d006e1449cabe904340ddee139 (diff)
downloaddpdk-dbfb8ec7094c7115c6d620929de2aedfc9e440aa.zip
dpdk-dbfb8ec7094c7115c6d620929de2aedfc9e440aa.tar.gz
dpdk-dbfb8ec7094c7115c6d620929de2aedfc9e440aa.tar.xz
app/testpmd: optimize mbuf pool allocation
By default, testpmd will create membuf pool for all NUMA nodes and ignore EAL configuration. Count the number of available NUMA according to EAL core mask or core list configuration. Optimized by only creating membuf pool for those nodes. Fixes: c9cafcc82de8 ("app/testpmd: fix mempool creation by socket id") Cc: stable@dpdk.org Signed-off-by: Phil Yang <phil.yang@arm.com> Acked-by: Gavin Hu <gavin.hu@arm.com> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Diffstat (limited to 'app')
-rw-r--r--app/test-pmd/testpmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 571ecb4..001f0e5 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -475,6 +475,8 @@ set_default_fwd_lcores_config(void)
nb_lc = 0;
for (i = 0; i < RTE_MAX_LCORE; i++) {
+ if (!rte_lcore_is_enabled(i))
+ continue;
sock_num = rte_lcore_to_socket_id(i);
if (new_socket_id(sock_num)) {
if (num_sockets >= RTE_MAX_NUMA_NODES) {
@@ -484,8 +486,6 @@ set_default_fwd_lcores_config(void)
}
socket_ids[num_sockets++] = sock_num;
}
- if (!rte_lcore_is_enabled(i))
- continue;
if (i == rte_get_master_lcore())
continue;
fwd_lcores_cpuids[nb_lc++] = i;