[dpdk-stable] patch 'app/testpmd: fix MAC address after port reset' has been queued to stable release 20.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Jul 26 15:53:22 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.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 07/28/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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2f39890f4a7707e2a02c536fc40bb173bbf95da8

Thanks.

Luca Boccassi

---
>From 2f39890f4a7707e2a02c536fc40bb173bbf95da8 Mon Sep 17 00:00:00 2001
From: Yuying Zhang <yuying.zhang at intel.com>
Date: Wed, 14 Jul 2021 02:20:27 +0000
Subject: [PATCH] app/testpmd: fix MAC address after port reset

[ upstream commit 5ffc4a2acadad427f2f9ddf8e072632764ad2d47 ]

MAC address of each port in global variable ports hasn't been updated
after resetting. It was the initial one after resetting VF MAC address.
This patch gets correct port MAC address when starting port.

Fixes: a5279d25616d ("app/testpmd: check status of getting MAC address")

Signed-off-by: Yuying Zhang <yuying.zhang at intel.com>
Acked-by: Aman Deep Singh <aman.deep.singh at intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li at intel.com>
---
 app/test-pmd/testpmd.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index c442bcc5ff..5288c04ab6 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2414,7 +2414,6 @@ start_port(portid_t pid)
 	int peer_pi;
 	queueid_t qi;
 	struct rte_port *port;
-	struct rte_ether_addr mac_addr;
 	struct rte_eth_hairpin_cap cap;
 
 	if (port_id_is_invalid(pid, ENABLED_WARN))
@@ -2583,11 +2582,14 @@ start_port(portid_t pid)
 			RTE_PORT_HANDLING, RTE_PORT_STARTED) == 0)
 			printf("Port %d can not be set into started\n", pi);
 
-		if (eth_macaddr_get_print_err(pi, &mac_addr) == 0)
+		if (eth_macaddr_get_print_err(pi, &port->eth_addr) == 0)
 			printf("Port %d: %02X:%02X:%02X:%02X:%02X:%02X\n", pi,
-				mac_addr.addr_bytes[0], mac_addr.addr_bytes[1],
-				mac_addr.addr_bytes[2], mac_addr.addr_bytes[3],
-				mac_addr.addr_bytes[4], mac_addr.addr_bytes[5]);
+				port->eth_addr.addr_bytes[0],
+				port->eth_addr.addr_bytes[1],
+				port->eth_addr.addr_bytes[2],
+				port->eth_addr.addr_bytes[3],
+				port->eth_addr.addr_bytes[4],
+				port->eth_addr.addr_bytes[5]);
 
 		/* at least one port started, need checking link status */
 		need_check_link_status = 1;
-- 
2.30.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-07-26 13:53:19.421484539 +0100
+++ 0059-app-testpmd-fix-MAC-address-after-port-reset.patch	2021-07-26 13:53:15.997295734 +0100
@@ -1 +1 @@
-From 5ffc4a2acadad427f2f9ddf8e072632764ad2d47 Mon Sep 17 00:00:00 2001
+From 2f39890f4a7707e2a02c536fc40bb173bbf95da8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5ffc4a2acadad427f2f9ddf8e072632764ad2d47 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index a48f70962f..37aba40272 100644
+index c442bcc5ff..5288c04ab6 100644
@@ -24 +25 @@
-@@ -2441,7 +2441,6 @@ start_port(portid_t pid)
+@@ -2414,7 +2414,6 @@ start_port(portid_t pid)
@@ -32 +33 @@
-@@ -2612,11 +2611,14 @@ start_port(portid_t pid)
+@@ -2583,11 +2582,14 @@ start_port(portid_t pid)


More information about the stable mailing list