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 392351B494 for ; Thu, 22 Nov 2018 17:52:45 +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 9E10E22D; Thu, 22 Nov 2018 16:52:44 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id BA9C660E3F; Thu, 22 Nov 2018 16:52:42 +0000 (UTC) From: Kevin Traynor To: Phil Yang Cc: Ferruh Yigit , dpdk stable Date: Thu, 22 Nov 2018 16:49:34 +0000 Message-Id: <20181122164957.13003-42-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.28]); Thu, 22 Nov 2018 16:52:44 +0000 (UTC) Subject: [dpdk-stable] patch 'app/testpmd: reserve NUMA node per port and per ring' 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:52:45 -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 096df3753aa04483a6d2690561681bf5a6a818eb Mon Sep 17 00:00:00 2001 From: Phil Yang Date: Thu, 18 Oct 2018 18:39:25 +0800 Subject: [PATCH] app/testpmd: reserve NUMA node per port and per ring [ upstream commit a569af2481cd3bd29e5c6d49f2d2f95586d750a8 ] If user explicitly requested memory to be allocated from a socket via `port-numa-config` and `ring-numa-config`, and if that socket is valid, add that socket into socket_ids[] so that mempool allocated for that socket. Fixes: dbfb8ec7094c ("app/testpmd: optimize mbuf pool allocation") Suggested-by: Ferruh Yigit Signed-off-by: Phil Yang Reviewed-by: Ferruh Yigit --- app/test-pmd/parameters.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index 962fad789..95aa29677 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -406,6 +406,9 @@ parse_portnuma_config(const char *q_arg) socket_id = (uint8_t)int_fld[FLD_SOCKET]; if (new_socket_id(socket_id)) { - print_invalid_socket_id_error(); - return -1; + if (num_sockets >= RTE_MAX_NUMA_NODES) { + print_invalid_socket_id_error(); + return -1; + } + socket_ids[num_sockets++] = socket_id; } port_numa[port_id] = socket_id; @@ -463,6 +466,9 @@ parse_ringnuma_config(const char *q_arg) socket_id = (uint8_t)int_fld[FLD_SOCKET]; if (new_socket_id(socket_id)) { - print_invalid_socket_id_error(); - return -1; + if (num_sockets >= RTE_MAX_NUMA_NODES) { + print_invalid_socket_id_error(); + return -1; + } + socket_ids[num_sockets++] = socket_id; } ring_flag = (uint8_t)int_fld[FLD_FLAG]; -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-22 16:47:33.348713898 +0000 +++ 0042-app-testpmd-reserve-NUMA-node-per-port-and-per-ring.patch 2018-11-22 16:47:32.000000000 +0000 @@ -1,15 +1,16 @@ -From a569af2481cd3bd29e5c6d49f2d2f95586d750a8 Mon Sep 17 00:00:00 2001 +From 096df3753aa04483a6d2690561681bf5a6a818eb Mon Sep 17 00:00:00 2001 From: Phil Yang Date: Thu, 18 Oct 2018 18:39:25 +0800 Subject: [PATCH] app/testpmd: reserve NUMA node per port and per ring +[ upstream commit a569af2481cd3bd29e5c6d49f2d2f95586d750a8 ] + If user explicitly requested memory to be allocated from a socket via `port-numa-config` and `ring-numa-config`, and if that socket is valid, add that socket into socket_ids[] so that mempool allocated for that socket. Fixes: dbfb8ec7094c ("app/testpmd: optimize mbuf pool allocation") -Cc: stable@dpdk.org Suggested-by: Ferruh Yigit Signed-off-by: Phil Yang @@ -19,10 +20,10 @@ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c -index 4a4debb8d..38b419767 100644 +index 962fad789..95aa29677 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c -@@ -417,6 +417,9 @@ parse_portnuma_config(const char *q_arg) +@@ -406,6 +406,9 @@ parse_portnuma_config(const char *q_arg) socket_id = (uint8_t)int_fld[FLD_SOCKET]; if (new_socket_id(socket_id)) { - print_invalid_socket_id_error(); @@ -34,7 +35,7 @@ + socket_ids[num_sockets++] = socket_id; } port_numa[port_id] = socket_id; -@@ -474,6 +477,9 @@ parse_ringnuma_config(const char *q_arg) +@@ -463,6 +466,9 @@ parse_ringnuma_config(const char *q_arg) socket_id = (uint8_t)int_fld[FLD_SOCKET]; if (new_socket_id(socket_id)) { - print_invalid_socket_id_error();