From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 379EE1B517 for ; Fri, 30 Nov 2018 00:14:46 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 30 Nov 2018 01:20:35 +0200 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id wATNCW8F032075; Fri, 30 Nov 2018 01:14:39 +0200 From: Yongseok Koh To: Phil Yang Cc: Ferruh Yigit , dpdk stable Date: Thu, 29 Nov 2018 15:11:09 -0800 Message-Id: <20181129231202.30436-75-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181129231202.30436-1-yskoh@mellanox.com> References: <20181129231202.30436-1-yskoh@mellanox.com> Subject: [dpdk-stable] patch 'app/testpmd: reserve NUMA node per port and per ring' has been queued to LTS release 17.11.5 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, 29 Nov 2018 23:14:46 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/01/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. Yongseok --- >>From c58c45cbdeb845d4b308d9a489e8454fc08744c2 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 5d51808f5..1dfbcc4f9 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -431,8 +431,11 @@ 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; } @@ -488,8 +491,11 @@ 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]; if ((ring_flag < RX_RING_ONLY) || (ring_flag > RXTX_RING)) { -- 2.11.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-29 15:01:48.525663110 -0800 +++ 0075-app-testpmd-reserve-NUMA-node-per-port-and-per-ring.patch 2018-11-29 15:01:45.191963000 -0800 @@ -1,15 +1,16 @@ -From a569af2481cd3bd29e5c6d49f2d2f95586d750a8 Mon Sep 17 00:00:00 2001 +From c58c45cbdeb845d4b308d9a489e8454fc08744c2 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 5d51808f5..1dfbcc4f9 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c -@@ -416,8 +416,11 @@ parse_portnuma_config(const char *q_arg) +@@ -431,8 +431,11 @@ parse_portnuma_config(const char *q_arg) } socket_id = (uint8_t)int_fld[FLD_SOCKET]; if (new_socket_id(socket_id)) { @@ -36,7 +37,7 @@ } port_numa[port_id] = socket_id; } -@@ -473,8 +476,11 @@ parse_ringnuma_config(const char *q_arg) +@@ -488,8 +491,11 @@ parse_ringnuma_config(const char *q_arg) } socket_id = (uint8_t)int_fld[FLD_SOCKET]; if (new_socket_id(socket_id)) {