From: Adrien Mazarguil Date: Mon, 1 Sep 2014 10:31:11 +0000 (+0200) Subject: app/testpmd: fix crash in txonly mode and with tx_first X-Git-Tag: spdx-start~10447 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8fd8bebc051704d7caecfed8d8a065a79c022329;p=dpdk.git app/testpmd: fix crash in txonly mode and with tx_first This crash was believed fixed by commit 5886ae07d211e4b5e49806dd183812, but the actual issue is that the core ID provided to rte_lcore_to_socket_id() is wrong. It must be looked up in fwd_lcores_cpuids[]. Signed-off-by: Adrien Mazarguil Signed-off-by: David Marchand --- diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index a112559d8d..8f5f9adf47 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -614,7 +614,9 @@ init_config(void) * Records which Mbuf pool to use by each logical core, if needed. */ for (lc_id = 0; lc_id < nb_lcores; lc_id++) { - mbp = mbuf_pool_find(rte_lcore_to_socket_id(lc_id)); + mbp = mbuf_pool_find( + rte_lcore_to_socket_id(fwd_lcores_cpuids[lc_id])); + if (mbp == NULL) mbp = mbuf_pool_find(0); fwd_lcores[lc_id]->mbp = mbp;