[dpdk-stable] patch 'net/ixgbe: fix link status' has been queued to LTS release 17.11.10

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Dec 19 15:34:20 CET 2019


Hi,

FYI, your patch has been queued to LTS release 17.11.10

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/21/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.

Thanks.

Luca Boccassi

---
>From fe7eecb8ea669a195751b3112f06cb5c9d278ae8 Mon Sep 17 00:00:00 2001
From: Xiao Zhang <xiao.zhang at intel.com>
Date: Tue, 29 Oct 2019 13:33:23 +0800
Subject: [PATCH] net/ixgbe: fix link status

[ upstream commit 1ca05831b9be946001ebabba2b3fdb0456684d9a ]

The link status for 82599eb got from link status register was not
correct, check the enable/disable flag of tx laser when getting the link
status, set the link status down if tx laser disabled since the tx laser
flag could be set correctly when up/down the link status.

Fixes: dc66e5fd01b9 ("net/ixgbe: improve link state check on VF")

Signed-off-by: Xiao Zhang <xiao.zhang at intel.com>
Reviewed-by: Wei Zhao <wei.zhao1 at intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye at intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index ca7109e6f0..8325d66f2f 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2852,6 +2852,7 @@ ixgbe_dev_set_link_up(struct rte_eth_dev *dev)
 	} else {
 		/* Turn on the laser */
 		ixgbe_enable_tx_laser(hw);
+		ixgbe_dev_link_update(dev, 0);
 	}
 
 	return 0;
@@ -2882,6 +2883,7 @@ ixgbe_dev_set_link_down(struct rte_eth_dev *dev)
 	} else {
 		/* Turn off the laser */
 		ixgbe_disable_tx_laser(hw);
+		ixgbe_dev_link_update(dev, 0);
 	}
 
 	return 0;
@@ -4012,6 +4014,7 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
 	int link_up;
 	int diag;
 	int wait = 1;
+	u32 esdp_reg;
 
 	link.link_status = ETH_LINK_DOWN;
 	link.link_speed = 0;
@@ -4047,6 +4050,10 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
 		return 0;
 	}
 
+	esdp_reg = IXGBE_READ_REG(hw, IXGBE_ESDP);
+	if ((esdp_reg & IXGBE_ESDP_SDP3))
+		link_up = 0;
+
 	if (link_up == 0) {
 		rte_ixgbe_dev_atomic_write_link_status(dev, &link);
 		if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-19 14:32:30.814963251 +0000
+++ 0113-net-ixgbe-fix-link-status.patch	2019-12-19 14:32:26.285301395 +0000
@@ -1,15 +1,16 @@
-From 1ca05831b9be946001ebabba2b3fdb0456684d9a Mon Sep 17 00:00:00 2001
+From fe7eecb8ea669a195751b3112f06cb5c9d278ae8 Mon Sep 17 00:00:00 2001
 From: Xiao Zhang <xiao.zhang at intel.com>
 Date: Tue, 29 Oct 2019 13:33:23 +0800
 Subject: [PATCH] net/ixgbe: fix link status
 
+[ upstream commit 1ca05831b9be946001ebabba2b3fdb0456684d9a ]
+
 The link status for 82599eb got from link status register was not
 correct, check the enable/disable flag of tx laser when getting the link
 status, set the link status down if tx laser disabled since the tx laser
 flag could be set correctly when up/down the link status.
 
 Fixes: dc66e5fd01b9 ("net/ixgbe: improve link state check on VF")
-Cc: stable at dpdk.org
 
 Signed-off-by: Xiao Zhang <xiao.zhang at intel.com>
 Reviewed-by: Wei Zhao <wei.zhao1 at intel.com>
@@ -19,10 +20,10 @@
  1 file changed, 7 insertions(+)
 
 diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
-index 9c386f5c99..30c0379d41 100644
+index ca7109e6f0..8325d66f2f 100644
 --- a/drivers/net/ixgbe/ixgbe_ethdev.c
 +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
-@@ -2912,6 +2912,7 @@ ixgbe_dev_set_link_up(struct rte_eth_dev *dev)
+@@ -2852,6 +2852,7 @@ ixgbe_dev_set_link_up(struct rte_eth_dev *dev)
  	} else {
  		/* Turn on the laser */
  		ixgbe_enable_tx_laser(hw);
@@ -30,7 +31,7 @@
  	}
  
  	return 0;
-@@ -2942,6 +2943,7 @@ ixgbe_dev_set_link_down(struct rte_eth_dev *dev)
+@@ -2882,6 +2883,7 @@ ixgbe_dev_set_link_down(struct rte_eth_dev *dev)
  	} else {
  		/* Turn off the laser */
  		ixgbe_disable_tx_laser(hw);
@@ -38,16 +39,16 @@
  	}
  
  	return 0;
-@@ -4116,6 +4118,7 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -4012,6 +4014,7 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
  	int link_up;
  	int diag;
  	int wait = 1;
 +	u32 esdp_reg;
  
- 	memset(&link, 0, sizeof(link));
  	link.link_status = ETH_LINK_DOWN;
-@@ -4143,6 +4146,10 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
- 		return rte_eth_linkstatus_set(dev, &link);
+ 	link.link_speed = 0;
+@@ -4047,6 +4050,10 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
+ 		return 0;
  	}
  
 +	esdp_reg = IXGBE_READ_REG(hw, IXGBE_ESDP);
@@ -55,8 +56,8 @@
 +		link_up = 0;
 +
  	if (link_up == 0) {
+ 		rte_ixgbe_dev_atomic_write_link_status(dev, &link);
  		if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {
- 			intr->flags |= IXGBE_FLAG_NEED_LINK_CONFIG;
 -- 
 2.20.1
 


More information about the stable mailing list