Skip to contentSkip to conversation

testpmd: fix crash in txonly mode and when using tx_first

PATCH In review David Marchand 2 participants 2 messages Sep 1, 2014 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 testpmd: fix crash in txonly mode and when using tx_first

From: Adrien Mazarguil <[email protected]>

This crash was believed fixed by commit 5886ae07d211e4b5e49806dd183812beb31c67ad, 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[].

---
 app/test-pmd/testpmd.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
app/test-pmd/testpmd.c +3 -1
index a112559..8f5f9ad 100644
@@ -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;
Signature · 1 line
1.7.10.4

A message that is not in the archive (sent off-list or not yet received): 1409567471-18978-1-git-send-email-david.marchand-pdR9zngts4EAvxtiuMwx3w@public.gmane.org

#2 lore raw

2014-09-01 12:31, David Marchand:

Quoted 8 lines

From: Adrien Mazarguil <[email protected]>

This crash was believed fixed by commit 5886ae07d211e4b5e49806dd183812beb31c67ad, 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[].

Applied for version 1.7.1.

Thanks

Signature · 1 line
Thomas