From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 7F8C91B494 for ; Thu, 22 Nov 2018 17:51:53 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D927CC058CA0; Thu, 22 Nov 2018 16:51:52 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 58F7860E3F; Thu, 22 Nov 2018 16:51:50 +0000 (UTC) From: Kevin Traynor To: Phil Yang Cc: Gavin Hu , Konstantin Ananyev , dpdk stable Date: Thu, 22 Nov 2018 16:49:09 +0000 Message-Id: <20181122164957.13003-17-ktraynor@redhat.com> In-Reply-To: <20181122164957.13003-1-ktraynor@redhat.com> References: <20181122164957.13003-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 22 Nov 2018 16:51:52 +0000 (UTC) Subject: [dpdk-stable] patch 'app/testpmd: fix physical port socket initialization' has been queued to stable release 18.08.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Nov 2018 16:51:53 -0000 Hi, FYI, your patch has been queued to stable release 18.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/28/18. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Kevin Traynor --- >>From c14e9b0d8894c9e8ad6bdf2928f73329ca8724b7 Mon Sep 17 00:00:00 2001 From: Phil Yang Date: Wed, 17 Oct 2018 09:36:30 +0800 Subject: [PATCH] app/testpmd: fix physical port socket initialization [ upstream commit effdb8bbb018bd8a611b2ac86a15739f67ea7cbc ] Once the lcore list setting excluded the socket which physical device attached, it will cause failure. Meanwhile, it will disable Testpmd cross NUMA scenario. Fixes: dbfb8ec7094c ("app/testpmd: optimize mbuf pool allocation") Signed-off-by: Phil Yang Reviewed-by: Gavin Hu Acked-by: Konstantin Ananyev --- app/test-pmd/testpmd.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 6808415f3..b64c8f270 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -514,7 +514,19 @@ set_default_fwd_ports_config(void) int i = 0; - RTE_ETH_FOREACH_DEV(pt_id) + RTE_ETH_FOREACH_DEV(pt_id) { fwd_ports_ids[i++] = pt_id; + /* Update sockets info according to the attached device */ + int socket_id = rte_eth_dev_socket_id(pt_id); + if (socket_id >= 0 && new_socket_id(socket_id)) { + if (num_sockets >= RTE_MAX_NUMA_NODES) { + rte_exit(EXIT_FAILURE, + "Total sockets greater than %u\n", + RTE_MAX_NUMA_NODES); + } + socket_ids[num_sockets++] = socket_id; + } + } + nb_cfg_ports = nb_ports; nb_fwd_ports = nb_ports; -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-22 16:47:32.714567236 +0000 +++ 0017-app-testpmd-fix-physical-port-socket-initialization.patch 2018-11-22 16:47:32.000000000 +0000 @@ -1,14 +1,15 @@ -From effdb8bbb018bd8a611b2ac86a15739f67ea7cbc Mon Sep 17 00:00:00 2001 +From c14e9b0d8894c9e8ad6bdf2928f73329ca8724b7 Mon Sep 17 00:00:00 2001 From: Phil Yang Date: Wed, 17 Oct 2018 09:36:30 +0800 Subject: [PATCH] app/testpmd: fix physical port socket initialization +[ upstream commit effdb8bbb018bd8a611b2ac86a15739f67ea7cbc ] + Once the lcore list setting excluded the socket which physical device attached, it will cause failure. Meanwhile, it will disable Testpmd cross NUMA scenario. Fixes: dbfb8ec7094c ("app/testpmd: optimize mbuf pool allocation") -Cc: stable@dpdk.org Signed-off-by: Phil Yang Reviewed-by: Gavin Hu @@ -18,10 +19,10 @@ 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c -index cce5a9773..404d8fe93 100644 +index 6808415f3..b64c8f270 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c -@@ -566,7 +566,19 @@ set_default_fwd_ports_config(void) +@@ -514,7 +514,19 @@ set_default_fwd_ports_config(void) int i = 0; - RTE_ETH_FOREACH_DEV(pt_id)