From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id AD3951B110 for ; Thu, 27 Sep 2018 10:44:25 +0200 (CEST) Received: by mail-wm1-f68.google.com with SMTP id b19-v6so5002761wme.3 for ; Thu, 27 Sep 2018 01:44:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wqSn4jwdTrDE9jp9jqP3pTHrhxzBtfgVGPYPJ7J83vk=; b=GTUN9OUAVonLAt2bOGwvwCR2vM6iybk01jK6DSINOHde9rHGEhjx+fgdkcMh5M6GP7 ZlHhltWau5qR5poyMqh8pfG5/oAOiDlhuJZUaxeXRzgWjf90nWdSPIkwytO/iJTZqz7t I3X82dDLe1oL0R7Gj+NKEmLqU+bCpjaREIZ4iHOwcndNcObqPxSAksNxDtSlj4ibitH/ Y3cCBqybA7x8HB4Qtf7hQdZmfa0SKzB3+4rKXtzZuooPNxo56iXVKj3QgI2mu0lehYXw f3vgtR6a7fJ+kuZldpfw6CDlAcGIGNf5QepyUSVHyir0UoNoHX71gwNlL0VESg1rFpHF M71Q== X-Gm-Message-State: ABuFfog/epMs0c59tqn5b24lVzRl+JepSKvv06i3+5PdsMWXjUgSAQpB +whduo5CsJGXzv0t6F5sfJo= X-Google-Smtp-Source: ACcGV60ytFfiElZ1oUrJuqAEh1Pnb45k6r1WurNWqalVj1wblM8GmS48Kzk7zlacEnDNbAh79vu27A== X-Received: by 2002:a1c:ba05:: with SMTP id k5-v6mr7612947wmf.4.1538037865288; Thu, 27 Sep 2018 01:44:25 -0700 (PDT) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id e127-v6sm1815355wmg.45.2018.09.27.01.44.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Sep 2018 01:44:24 -0700 (PDT) From: Luca Boccassi To: Phil Yang Cc: Gavin Hu , Bernard Iremonger , dpdk stable Date: Thu, 27 Sep 2018 09:44:03 +0100 Message-Id: <20180927084403.19646-8-bluca@debian.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180927084403.19646-1-bluca@debian.org> References: <20180927084403.19646-1-bluca@debian.org> Subject: [dpdk-stable] patch 'app/testpmd: optimize mbuf pool allocation' has been queued to LTS release 16.11.9 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, 27 Sep 2018 08:44:25 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 09/27/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. Luca Boccassi --- >>From b2e58e851630e7fd9b2959909e33773812e5f983 Mon Sep 17 00:00:00 2001 From: Phil Yang Date: Wed, 12 Sep 2018 09:54:26 +0800 Subject: [PATCH] app/testpmd: optimize mbuf pool allocation [ upstream commit dbfb8ec7094c7115c6d620929de2aedfc9e440aa ] By default, testpmd will create membuf pool for all NUMA nodes and ignore EAL configuration. Count the number of available NUMA according to EAL core mask or core list configuration. Optimized by only creating membuf pool for those nodes. Fixes: c9cafcc82de8 ("app/testpmd: fix mempool creation by socket id") Signed-off-by: Phil Yang Acked-by: Gavin Hu Acked-by: Bernard Iremonger --- app/test-pmd/testpmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index e48cf8a1ab..a6d80f35ca 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -358,14 +358,14 @@ set_default_fwd_lcores_config(void) nb_lc = 0; for (i = 0; i < RTE_MAX_LCORE; i++) { + if (!rte_lcore_is_enabled(i)) + continue; sock_num = rte_lcore_to_socket_id(i) + 1; if (sock_num > max_socket) { if (sock_num > RTE_MAX_NUMA_NODES) rte_exit(EXIT_FAILURE, "Total sockets greater than %u\n", RTE_MAX_NUMA_NODES); max_socket = sock_num; } - if (!rte_lcore_is_enabled(i)) - continue; if (i == rte_get_master_lcore()) continue; fwd_lcores_cpuids[nb_lc++] = i; -- 2.18.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-09-25 13:26:56.945792405 +0100 +++ 0008-app-testpmd-optimize-mbuf-pool-allocation.patch 2018-09-25 13:26:56.787424707 +0100 @@ -1,8 +1,10 @@ -From dbfb8ec7094c7115c6d620929de2aedfc9e440aa Mon Sep 17 00:00:00 2001 +From b2e58e851630e7fd9b2959909e33773812e5f983 Mon Sep 17 00:00:00 2001 From: Phil Yang Date: Wed, 12 Sep 2018 09:54:26 +0800 Subject: [PATCH] app/testpmd: optimize mbuf pool allocation +[ upstream commit dbfb8ec7094c7115c6d620929de2aedfc9e440aa ] + By default, testpmd will create membuf pool for all NUMA nodes and ignore EAL configuration. @@ -11,7 +13,6 @@ nodes. Fixes: c9cafcc82de8 ("app/testpmd: fix mempool creation by socket id") -Cc: stable@dpdk.org Signed-off-by: Phil Yang Acked-by: Gavin Hu @@ -21,21 +22,20 @@ 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c -index 571ecb4ac8..001f0e5529 100644 +index e48cf8a1ab..a6d80f35ca 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c -@@ -475,6 +475,8 @@ set_default_fwd_lcores_config(void) +@@ -358,14 +358,14 @@ set_default_fwd_lcores_config(void) nb_lc = 0; for (i = 0; i < RTE_MAX_LCORE; i++) { + if (!rte_lcore_is_enabled(i)) + continue; - sock_num = rte_lcore_to_socket_id(i); - if (new_socket_id(sock_num)) { - if (num_sockets >= RTE_MAX_NUMA_NODES) { -@@ -484,8 +486,6 @@ set_default_fwd_lcores_config(void) - } - socket_ids[num_sockets++] = sock_num; + sock_num = rte_lcore_to_socket_id(i) + 1; + if (sock_num > max_socket) { + if (sock_num > RTE_MAX_NUMA_NODES) + rte_exit(EXIT_FAILURE, "Total sockets greater than %u\n", RTE_MAX_NUMA_NODES); + max_socket = sock_num; } - if (!rte_lcore_is_enabled(i)) - continue;