[dpdk-stable] patch 'net/e1000: fix link status update' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Wed Dec 11 22:26:54 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.6

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

Thanks.

Kevin.

---
>From 14f605715a720372dab34c4ba9d38cd46942e3b3 Mon Sep 17 00:00:00 2001
From: Lunyuan Cui <lunyuanx.cui at intel.com>
Date: Wed, 20 Nov 2019 09:22:03 +0000
Subject: [PATCH] net/e1000: fix link status update

[ upstream commit e7c1d6b2d8f320732780783ce0999367e9b86957 ]

Meaningless to judge the link state according to the memset'ed
link variable, this patch fixes this logical issue.

In addition, this patch changes the variable from link_check to link_up
according to its real meaning.

Fixes: 80ba61115e77 ("net/e1000: use link status helper functions")

Signed-off-by: Lunyuan Cui <lunyuanx.cui at intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye at intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu at intel.com>
---
 drivers/net/e1000/em_ethdev.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 123c73053..28637c494 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -1116,7 +1116,7 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 		E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct rte_eth_link link;
-	int link_check, count;
+	int link_up, count;
 
-	link_check = 0;
+	link_up = 0;
 	hw->mac.get_link_status = 1;
 
@@ -1128,10 +1128,10 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 			/* Do the work to read phy */
 			e1000_check_for_link(hw);
-			link_check = !hw->mac.get_link_status;
+			link_up = !hw->mac.get_link_status;
 			break;
 
 		case e1000_media_type_fiber:
 			e1000_check_for_link(hw);
-			link_check = (E1000_READ_REG(hw, E1000_STATUS) &
+			link_up = (E1000_READ_REG(hw, E1000_STATUS) &
 					E1000_STATUS_LU);
 			break;
@@ -1139,5 +1139,5 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 		case e1000_media_type_internal_serdes:
 			e1000_check_for_link(hw);
-			link_check = hw->mac.serdes_has_link;
+			link_up = hw->mac.serdes_has_link;
 			break;
 
@@ -1145,5 +1145,5 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 			break;
 		}
-		if (link_check || wait_to_complete == 0)
+		if (link_up || wait_to_complete == 0)
 			break;
 		rte_delay_ms(EM_LINK_UPDATE_CHECK_INTERVAL);
@@ -1152,5 +1152,5 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 
 	/* Now we check if a transition has happened */
-	if (link_check && (link.link_status == ETH_LINK_DOWN)) {
+	if (link_up) {
 		uint16_t duplex, speed;
 		hw->mac.ops.get_link_up_info(hw, &speed, &duplex);
@@ -1162,5 +1162,5 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 		link.link_autoneg = !(dev->data->dev_conf.link_speeds &
 				ETH_LINK_SPEED_FIXED);
-	} else if (!link_check && (link.link_status == ETH_LINK_UP)) {
+	} else {
 		link.link_speed = ETH_SPEED_NUM_NONE;
 		link.link_duplex = ETH_LINK_HALF_DUPLEX;
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-11 21:24:17.543208913 +0000
+++ 0062-net-e1000-fix-link-status-update.patch	2019-12-11 21:24:12.727649978 +0000
@@ -1 +1 @@
-From e7c1d6b2d8f320732780783ce0999367e9b86957 Mon Sep 17 00:00:00 2001
+From 14f605715a720372dab34c4ba9d38cd46942e3b3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e7c1d6b2d8f320732780783ce0999367e9b86957 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index 9a88b50b2..080cbe2df 100644
+index 123c73053..28637c494 100644
@@ -26 +27 @@
-@@ -1122,7 +1122,7 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)
+@@ -1116,7 +1116,7 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)
@@ -36 +37 @@
-@@ -1134,10 +1134,10 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)
+@@ -1128,10 +1128,10 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)
@@ -49 +50 @@
-@@ -1145,5 +1145,5 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)
+@@ -1139,5 +1139,5 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)
@@ -56 +57 @@
-@@ -1151,5 +1151,5 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)
+@@ -1145,5 +1145,5 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)
@@ -63 +64 @@
-@@ -1158,5 +1158,5 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)
+@@ -1152,5 +1152,5 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)
@@ -70 +71 @@
-@@ -1168,5 +1168,5 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)
+@@ -1162,5 +1162,5 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)



More information about the stable mailing list