From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by dpdk.org (Postfix) with ESMTP id 22801B3A7 for ; Mon, 1 Sep 2014 12:26:53 +0200 (CEST) Received: by mail-wi0-f177.google.com with SMTP id cc10so5811804wib.10 for ; Mon, 01 Sep 2014 03:31:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=QVq5dntyWaD3DHsHUyW9VjGhCi2JeWvUkGndTBRfgsw=; b=I1S71L5IcP+g+K2swbfDM/Ad69kXKD13yonsbjI9cxB3EUdgymOvPjCJORMg0W7c6+ opp01wAYKOb7wYv6XpfBlRPfpsjyfBppd4piAQmm4Mq2LCRTPWrmdtgjFos1GYILP52D ZjmPJnx7+T5xXBCSJTwqaxDSOGZdcX1S7Qd9O5TD5MZR7sLfnmXccdkmM1wkQpyLLVo/ 5rEr3GHJlWQs9dl57td+9r0VbBrgTdqJB7fRQixAUeuWM+2La65hkoOeZhGRt2ke1wH0 l8XWOmQlGOmGGal5kqAxUAf6dtYKOz7cOWNr0YG5vfR+t1JYEuaqkHfu8vwbDjnzbVjW 8UeQ== X-Gm-Message-State: ALoCoQlHSxQlHVaML4SU8I2fieQpa0IqpQKIFQuPkgIt9fvegBuPg4gbNbiG1l62bEnPEIUXLZYZ X-Received: by 10.194.7.136 with SMTP id j8mr30552257wja.62.1409567480032; Mon, 01 Sep 2014 03:31:20 -0700 (PDT) Received: from alcyon.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id gk17sm24370533wic.16.2014.09.01.03.31.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Sep 2014 03:31:19 -0700 (PDT) From: David Marchand To: dev@dpdk.org Date: Mon, 1 Sep 2014 12:31:11 +0200 Message-Id: <1409567471-18978-1-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.7.10.4 Subject: [dpdk-dev] [PATCH] testpmd: fix crash in txonly mode and when using tx_first X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 10:26:53 -0000 From: Adrien Mazarguil 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[]. Signed-off-by: Adrien Mazarguil Signed-off-by: David Marchand --- app/test-pmd/testpmd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index a112559..8f5f9ad 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; -- 1.7.10.4