From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1F43FA0A02 for ; Mon, 17 May 2021 18:17:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 18AEF410EA; Mon, 17 May 2021 18:17:49 +0200 (CEST) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by mails.dpdk.org (Postfix) with ESMTP id 4AF6D40041 for ; Mon, 17 May 2021 18:17:47 +0200 (CEST) Received: from 2.general.paelzer.uk.vpn ([10.172.196.173] helo=Keschdeichel.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lifw8-00006T-Bh; Mon, 17 May 2021 16:17:44 +0000 From: Christian Ehrhardt To: Huisong Li Cc: Lijun Ou , Xiaoyun Li , dpdk stable Date: Mon, 17 May 2021 18:10:11 +0200 Message-Id: <20210517161039.3132619-182-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517161039.3132619-1-christian.ehrhardt@canonical.com> References: <20210517161039.3132619-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'app/testpmd: verify DCB config during forward config' has been queued to stable release 19.11.9 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.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 05/19/21. 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. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/43210e3a86a2d1dda0ca0a8b632383c8620ec6bf Thanks. Christian Ehrhardt --- >From 43210e3a86a2d1dda0ca0a8b632383c8620ec6bf Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Wed, 28 Apr 2021 14:40:44 +0800 Subject: [PATCH] app/testpmd: verify DCB config during forward config [ upstream commit 43f1f8261136852357057b78aa49d354beaf3931 ] Currently, the check for doing DCB test is assigned to start_packet_forwarding(), which will be called when run "start" cmd. But fwd_config_setup() is used in many scenarios, such as, "port config all rxq". This patch moves the check from start_packet_forwarding() to fwd_config_setup(). Fixes: 7741e4cf16c0 ("app/testpmd: VMDq and DCB updates") Signed-off-by: Huisong Li Signed-off-by: Lijun Ou Acked-by: Xiaoyun Li --- app/test-pmd/config.c | 23 +++++++++++++++++++++-- app/test-pmd/testpmd.c | 19 ------------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index bee9fa6dcf..f1f4c0eea6 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -2568,6 +2568,10 @@ softnic_fwd_config_setup(void) void fwd_config_setup(void) { + struct rte_port *port; + portid_t pt_id; + unsigned int i; + cur_fwd_config.fwd_eng = cur_fwd_eng; if (strcmp(cur_fwd_eng->fwd_mode_name, "icmpecho") == 0) { icmp_echo_config_setup(); @@ -2582,9 +2586,24 @@ fwd_config_setup(void) #endif if ((nb_rxq > 1) && (nb_txq > 1)){ - if (dcb_config) + if (dcb_config) { + for (i = 0; i < nb_fwd_ports; i++) { + pt_id = fwd_ports_ids[i]; + port = &ports[pt_id]; + if (!port->dcb_flag) { + printf("In DCB mode, all forwarding ports must " + "be configured in this mode.\n"); + return; + } + } + if (nb_fwd_lcores == 1) { + printf("In DCB mode,the nb forwarding cores " + "should be larger than 1.\n"); + return; + } + dcb_fwd_config_setup(); - else + } else rss_fwd_config_setup(); } else diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 9485953aba..512b681377 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2076,9 +2076,7 @@ start_packet_forwarding(int with_tx_first) { port_fwd_begin_t port_fwd_begin; port_fwd_end_t port_fwd_end; - struct rte_port *port; unsigned int i; - portid_t pt_id; if (strcmp(cur_fwd_eng->fwd_mode_name, "rxonly") == 0 && !nb_rxq) rte_exit(EXIT_FAILURE, "rxq are 0, cannot use rxonly fwd mode\n"); @@ -2101,23 +2099,6 @@ start_packet_forwarding(int with_tx_first) printf("Packet forwarding already started\n"); return; } - - if (dcb_config) { - for (i = 0; i < nb_fwd_ports; i++) { - pt_id = fwd_ports_ids[i]; - port = &ports[pt_id]; - if (!port->dcb_flag) { - printf("In DCB mode, all forwarding ports must " - "be configured in this mode.\n"); - return; - } - } - if (nb_fwd_lcores == 1) { - printf("In DCB mode,the nb forwarding cores " - "should be larger than 1.\n"); - return; - } - } test_done = 0; fwd_config_setup(); -- 2.31.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-17 17:40:36.509762039 +0200 +++ 0182-app-testpmd-verify-DCB-config-during-forward-config.patch 2021-05-17 17:40:29.527812280 +0200 @@ -1 +1 @@ -From 43f1f8261136852357057b78aa49d354beaf3931 Mon Sep 17 00:00:00 2001 +From 43210e3a86a2d1dda0ca0a8b632383c8620ec6bf Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 43f1f8261136852357057b78aa49d354beaf3931 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ -index bbf039de76..fc057e5687 100644 +index bee9fa6dcf..f1f4c0eea6 100644 @@ -29 +30 @@ -@@ -3199,6 +3199,10 @@ icmp_echo_config_setup(void) +@@ -2568,6 +2568,10 @@ softnic_fwd_config_setup(void) @@ -40,2 +41,2 @@ -@@ -3206,9 +3210,24 @@ fwd_config_setup(void) - } +@@ -2582,9 +2586,24 @@ fwd_config_setup(void) + #endif @@ -68 +69 @@ -index a076b1dcde..abcbdaa6e1 100644 +index 9485953aba..512b681377 100644 @@ -71 +72 @@ -@@ -2138,9 +2138,7 @@ start_packet_forwarding(int with_tx_first) +@@ -2076,9 +2076,7 @@ start_packet_forwarding(int with_tx_first) @@ -81 +82 @@ -@@ -2163,23 +2161,6 @@ start_packet_forwarding(int with_tx_first) +@@ -2101,23 +2099,6 @@ start_packet_forwarding(int with_tx_first)