[dpdk-stable] patch 'net/hns3: fix link speed when VF device is down' has been queued to stable release 20.11.2

Xueming Li xuemingl at nvidia.com
Sat Jun 12 01:04:26 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/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/91f0c38c0d6561a1abca4ed00115e13829d327a4

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 91f0c38c0d6561a1abca4ed00115e13829d327a4 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong at huawei.com>
Date: Sat, 15 May 2021 08:52:38 +0800
Subject: [PATCH] net/hns3: fix link speed when VF device is down
Cc: Luca Boccassi <bluca at debian.org>

[ upstream commit d1ced85a7e7a193051e96c2d34a8961a2e3f96d9 ]

When the port is link down state, it is meaningless to display the
port link speed. It should be an undefined state.

Fixes: 59fad0f32135 ("net/hns3: support link update operation")

Signed-off-by: Huisong Li <lihuisong at huawei.com>
Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 807ebe16ba..ed9dd9b3c3 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -2065,16 +2065,18 @@ hns3vf_dev_link_update(struct rte_eth_dev *eth_dev,
 	case ETH_SPEED_NUM_50G:
 	case ETH_SPEED_NUM_100G:
 	case ETH_SPEED_NUM_200G:
-		new_link.link_speed = mac->link_speed;
+		if (mac->link_status)
+			new_link.link_speed = mac->link_speed;
 		break;
 	default:
 		if (mac->link_status)
 			new_link.link_speed = ETH_SPEED_NUM_UNKNOWN;
-		else
-			new_link.link_speed = ETH_SPEED_NUM_NONE;
 		break;
 	}
 
+	if (!mac->link_status)
+		new_link.link_speed = ETH_SPEED_NUM_NONE;
+
 	new_link.link_duplex = mac->link_duplex;
 	new_link.link_status = mac->link_status ? ETH_LINK_UP : ETH_LINK_DOWN;
 	new_link.link_autoneg =
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.894316900 +0800
+++ 0172-net-hns3-fix-link-speed-when-VF-device-is-down.patch	2021-06-12 06:53:56.680000000 +0800
@@ -1 +1 @@
-From d1ced85a7e7a193051e96c2d34a8961a2e3f96d9 Mon Sep 17 00:00:00 2001
+From 91f0c38c0d6561a1abca4ed00115e13829d327a4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca at debian.org>
+
+[ upstream commit d1ced85a7e7a193051e96c2d34a8961a2e3f96d9 ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -19 +21 @@
-index c64961632c..41dd8ee129 100644
+index 807ebe16ba..ed9dd9b3c3 100644
@@ -22 +24 @@
-@@ -2205,16 +2205,18 @@ hns3vf_dev_link_update(struct rte_eth_dev *eth_dev,
+@@ -2065,16 +2065,18 @@ hns3vf_dev_link_update(struct rte_eth_dev *eth_dev,


More information about the stable mailing list