[dpdk-stable] patch 'app/testpmd: retain all original dev conf when config DCB' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Wed Nov 10 07:30:21 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.4

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/12/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/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/07c572ba8224a09e5a696cb7a0e4535c4d4a7579

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 07c572ba8224a09e5a696cb7a0e4535c4d4a7579 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong at huawei.com>
Date: Mon, 11 Oct 2021 17:12:46 +0800
Subject: [PATCH] app/testpmd: retain all original dev conf when config DCB
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit c1ba6c325c4c7c8e0f32d9e96bc25ab172a222ee ]

When configuring DCB, testpmd retains the rx_mode/tx_mode configuration in
rte_port->dev_conf. But some configurations, such as the link_speed, were
not saved if they were set before configuring DCB.

Fixes: 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic class")

Signed-off-by: Huisong Li <lihuisong at huawei.com>
Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
Acked-by: Xiaoyun Li <xiaoyun.li at intel.com>
---
 app/test-pmd/testpmd.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 75714ff648..466df37a2a 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -3574,10 +3574,8 @@ init_port_dcb_config(portid_t pid,
 
 	rte_port = &ports[pid];
 
-	memset(&port_conf, 0, sizeof(struct rte_eth_conf));
-
-	port_conf.rxmode = rte_port->dev_conf.rxmode;
-	port_conf.txmode = rte_port->dev_conf.txmode;
+	/* retain the original device configuration. */
+	memcpy(&port_conf, &rte_port->dev_conf, sizeof(struct rte_eth_conf));
 
 	/*set configuration of DCB in vt mode and DCB in non-vt mode*/
 	retval = get_eth_dcb_conf(pid, &port_conf, dcb_mode, num_tcs, pfc_en);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:08.026653589 +0800
+++ 0137-app-testpmd-retain-all-original-dev-conf-when-config.patch	2021-11-10 14:17:01.900745845 +0800
@@ -1 +1 @@
-From c1ba6c325c4c7c8e0f32d9e96bc25ab172a222ee Mon Sep 17 00:00:00 2001
+From 07c572ba8224a09e5a696cb7a0e4535c4d4a7579 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit c1ba6c325c4c7c8e0f32d9e96bc25ab172a222ee ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -21 +23 @@
-index eec4f1b81d..12a0db8796 100644
+index 75714ff648..466df37a2a 100644
@@ -24,2 +26,2 @@
-@@ -3729,10 +3729,8 @@ init_port_dcb_config(portid_t pid,
- 	}
+@@ -3574,10 +3574,8 @@ init_port_dcb_config(portid_t pid,
+ 


More information about the stable mailing list