[dpdk-stable] patch 'net/ixgbe: set fixed flag for exact link speed' has been queued to stable release 19.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Feb 11 12:19:57 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. 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 25a3624d1e33a0ed575165b6df9af97574f881c7 Mon Sep 17 00:00:00 2001
From: Guinan Sun <guinanx.sun at intel.com>
Date: Tue, 3 Dec 2019 16:59:28 +0000
Subject: [PATCH] net/ixgbe: set fixed flag for exact link speed

[ upstream commit 34e7360960687c1e99fd693d7a72e3be3a019a36 ]

Setting exact link speed makes sense if auto-negotiation is
disabled. Fixed flag is required to disable auto-negotiation.

Signed-off-by: Guinan Sun <guinanx.sun at intel.com>
Acked-by: Ting Xu <ting.xu at intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye at intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index fba8c51595..b2f723f0b6 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2559,17 +2559,6 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
 
 	PMD_INIT_FUNC_TRACE();
 
-	/* IXGBE devices don't support:
-	*    - half duplex (checked afterwards for valid speeds)
-	*    - fixed speed: TODO implement
-	*/
-	if (dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED) {
-		PMD_INIT_LOG(ERR,
-		"Invalid link_speeds for port %u, fix speed not supported",
-				dev->data->port_id);
-		return -EINVAL;
-	}
-
 	/* Stop the link setup handler before resetting the HW. */
 	rte_eal_alarm_cancel(ixgbe_dev_setup_link_alarm_handler, dev);
 
@@ -2725,7 +2714,11 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
 	}
 
 	link_speeds = &dev->data->dev_conf.link_speeds;
-	if (*link_speeds & ~allowed_speeds) {
+
+	/* Ignore autoneg flag bit and check the validity of 
+	 * link_speed 
+	 */
+	if (((*link_speeds) >> 1) & ~(allowed_speeds >> 1)) {
 		PMD_INIT_LOG(ERR, "Invalid link setting");
 		goto error;
 	}
@@ -4169,7 +4162,8 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
 	link.link_status = ETH_LINK_DOWN;
 	link.link_speed = ETH_SPEED_NUM_NONE;
 	link.link_duplex = ETH_LINK_HALF_DUPLEX;
-	link.link_autoneg = ETH_LINK_AUTONEG;
+	link.link_autoneg = !(dev->data->dev_conf.link_speeds &
+			ETH_LINK_SPEED_FIXED);
 
 	hw->mac.get_link_status = true;
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-11 11:17:40.855523307 +0000
+++ 0051-net-ixgbe-set-fixed-flag-for-exact-link-speed.patch	2020-02-11 11:17:38.416001646 +0000
@@ -1,8 +1,10 @@
-From 34e7360960687c1e99fd693d7a72e3be3a019a36 Mon Sep 17 00:00:00 2001
+From 25a3624d1e33a0ed575165b6df9af97574f881c7 Mon Sep 17 00:00:00 2001
 From: Guinan Sun <guinanx.sun at intel.com>
 Date: Tue, 3 Dec 2019 16:59:28 +0000
 Subject: [PATCH] net/ixgbe: set fixed flag for exact link speed
 
+[ upstream commit 34e7360960687c1e99fd693d7a72e3be3a019a36 ]
+
 Setting exact link speed makes sense if auto-negotiation is
 disabled. Fixed flag is required to disable auto-negotiation.
 


More information about the stable mailing list