From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id EA339A046B for ; Fri, 23 Aug 2019 11:45:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DD5AD1BF9C; Fri, 23 Aug 2019 11:45:34 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 5BB801BFA4 for ; Fri, 23 Aug 2019 11:45:33 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B15868AC6FD; Fri, 23 Aug 2019 09:45:32 +0000 (UTC) Received: from rh.redhat.com (ovpn-116-48.ams2.redhat.com [10.36.116.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id B80C15C226; Fri, 23 Aug 2019 09:45:30 +0000 (UTC) From: Kevin Traynor To: Wei Zhao Cc: Peng Yuan , Ferruh Yigit , Wenzhuo Lu , Jingjing Wu , Bernard Iremonger , dpdk stable Date: Fri, 23 Aug 2019 10:43:36 +0100 Message-Id: <20190823094336.12078-46-ktraynor@redhat.com> In-Reply-To: <20190823094336.12078-1-ktraynor@redhat.com> References: <20190823094336.12078-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.69]); Fri, 23 Aug 2019 09:45:32 +0000 (UTC) Subject: [dpdk-stable] patch 'app/testpmd: fix offloads config' has been queued to LTS release 18.11.3 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/28/19. 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/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/df34973221d9e24d74b5381e540e95561ae69458 Thanks. Kevin Traynor --- >From df34973221d9e24d74b5381e540e95561ae69458 Mon Sep 17 00:00:00 2001 From: Wei Zhao Date: Thu, 9 May 2019 15:20:47 +0800 Subject: [PATCH] app/testpmd: fix offloads config [ upstream commit 5e91aeef218c452c370aacf74265c7a42b67dffa ] [ upstream commit 575e0fd1a0b33b5b6c977f743fd4ba27b3523517 ] This is a squashed commit of the above upstream master commits. 5e91aeef218c was previously applied to stable as: c14f54bd7fea ("app/testpmd: fix offload flags after port config") but had to be reverted in: 4d1815fe6a73 ("Revert "app/testpmd: fix offload flags after port config"") as it caused a regression. Now that 575e0fd1a0b3 is available in upstream master to fix that regression, squashing those two commits and applying to stable. Original upstream master commit messages: commit 5e91aeef218c452c370aacf74265c7a42b67dffa Author: Wei Zhao Date: Thu May 9 15:20:47 2019 +0800 app/testpmd: fix offload flags after port config There is an error in function rxtx_port_config(), which may overwrite offloads configuration get from function launch_args_parse() when run testpmd app. So rxtx_port_config() should do "or" for port offloads. Fixes: d44f8a485f5d ("app/testpmd: enable per queue configure") Cc: stable@dpdk.org Signed-off-by: Wei Zhao Tested-by: Peng Yuan commit 575e0fd1a0b33b5b6c977f743fd4ba27b3523517 Author: Wei Zhao Date: Mon Jun 10 14:45:10 2019 +0800 app/testpmd: fix offloads config There is no need to use default offloads configuration if offloads configuration has been pass down from upper layer. The default offloads are overwritten if not zero. Fixes: 5e91aeef218c ("app/testpmd: fix offload flags after port config") Cc: stable@dpdk.org Signed-off-by: Wei Zhao Reviewed-by: Ferruh Yigit Cc: Wenzhuo Lu Cc: Jingjing Wu Cc: Bernard Iremonger --- app/test-pmd/testpmd.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index b4215c75d..41283b481 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2736,7 +2736,11 @@ rxtx_port_config(struct rte_port *port) { uint16_t qid; + uint64_t offloads; for (qid = 0; qid < nb_rxq; qid++) { + offloads = port->rx_conf[qid].offloads; port->rx_conf[qid] = port->dev_info.default_rxconf; + if (offloads != 0) + port->rx_conf[qid].offloads = offloads; /* Check if any Rx parameters have been passed */ @@ -2760,5 +2764,8 @@ rxtx_port_config(struct rte_port *port) for (qid = 0; qid < nb_txq; qid++) { + offloads = port->tx_conf[qid].offloads; port->tx_conf[qid] = port->dev_info.default_txconf; + if (offloads != 0) + port->tx_conf[qid].offloads = offloads; /* Check if any Tx parameters have been passed */ -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-08-22 19:38:23.416326314 +0100 +++ 0046-app-testpmd-fix-offloads-config.patch 2019-08-22 19:38:20.480025854 +0100 @@ -1 +1 @@ -From 575e0fd1a0b33b5b6c977f743fd4ba27b3523517 Mon Sep 17 00:00:00 2001 +From df34973221d9e24d74b5381e540e95561ae69458 Mon Sep 17 00:00:00 2001 @@ -3 +3 @@ -Date: Mon, 10 Jun 2019 14:45:10 +0800 +Date: Thu, 9 May 2019 15:20:47 +0800 @@ -6,3 +6,2 @@ -There is no need to use default offloads configuration -if offloads configuration has been pass down from upper layer. -The default offloads are overwritten if not zero. +[ upstream commit 5e91aeef218c452c370aacf74265c7a42b67dffa ] +[ upstream commit 575e0fd1a0b33b5b6c977f743fd4ba27b3523517 ] @@ -10,2 +9 @@ -Fixes: 5e91aeef218c ("app/testpmd: fix offload flags after port config") -Cc: stable@dpdk.org +This is a squashed commit of the above upstream master commits. @@ -13,2 +11,46 @@ -Signed-off-by: Wei Zhao -Reviewed-by: Ferruh Yigit +5e91aeef218c was previously applied to stable as: +c14f54bd7fea ("app/testpmd: fix offload flags after port config") +but had to be reverted in: +4d1815fe6a73 ("Revert "app/testpmd: fix offload flags after port config"") +as it caused a regression. + +Now that 575e0fd1a0b3 is available in upstream master to fix that +regression, squashing those two commits and applying to stable. + +Original upstream master commit messages: + +commit 5e91aeef218c452c370aacf74265c7a42b67dffa +Author: Wei Zhao +Date: Thu May 9 15:20:47 2019 +0800 + + app/testpmd: fix offload flags after port config + + There is an error in function rxtx_port_config(), which may overwrite + offloads configuration get from function launch_args_parse() when run + testpmd app. So rxtx_port_config() should do "or" for port offloads. + + Fixes: d44f8a485f5d ("app/testpmd: enable per queue configure") + Cc: stable@dpdk.org + + Signed-off-by: Wei Zhao + Tested-by: Peng Yuan + +commit 575e0fd1a0b33b5b6c977f743fd4ba27b3523517 +Author: Wei Zhao +Date: Mon Jun 10 14:45:10 2019 +0800 + + app/testpmd: fix offloads config + + There is no need to use default offloads configuration + if offloads configuration has been pass down from upper layer. + The default offloads are overwritten if not zero. + + Fixes: 5e91aeef218c ("app/testpmd: fix offload flags after port config") + Cc: stable@dpdk.org + + Signed-off-by: Wei Zhao + Reviewed-by: Ferruh Yigit + +Cc: Wenzhuo Lu +Cc: Jingjing Wu +Cc: Bernard Iremonger @@ -16,2 +58,2 @@ - app/test-pmd/testpmd.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) + app/test-pmd/testpmd.c | 7 +++++++ + 1 file changed, 7 insertions(+) @@ -20 +62 @@ -index c578f75e7..3ed3523b7 100644 +index b4215c75d..41283b481 100644 @@ -23,2 +65,7 @@ -@@ -2825,5 +2825,6 @@ rxtx_port_config(struct rte_port *port) - offloads = port->rx_conf[qid].offloads; +@@ -2736,7 +2736,11 @@ rxtx_port_config(struct rte_port *port) + { + uint16_t qid; ++ uint64_t offloads; + + for (qid = 0; qid < nb_rxq; qid++) { ++ offloads = port->rx_conf[qid].offloads; @@ -26 +72,0 @@ -- port->rx_conf[qid].offloads |= offloads; @@ -31,2 +77,4 @@ -@@ -2849,5 +2850,6 @@ rxtx_port_config(struct rte_port *port) - offloads = port->tx_conf[qid].offloads; +@@ -2760,5 +2764,8 @@ rxtx_port_config(struct rte_port *port) + + for (qid = 0; qid < nb_txq; qid++) { ++ offloads = port->tx_conf[qid].offloads; @@ -34 +81,0 @@ -- port->tx_conf[qid].offloads |= offloads;