[dpdk-stable] patch 'net/ionic: fix link speed and autonegotiation' has been queued to stable release 20.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Feb 5 12:17:34 CET 2021


Hi,

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

Thanks.

Luca Boccassi

---
>From a457b9a8d853a924067e536b4f2e819c6884e8bc Mon Sep 17 00:00:00 2001
From: Andrew Boyer <aboyer at pensando.io>
Date: Mon, 11 Jan 2021 11:02:09 -0800
Subject: [PATCH] net/ionic: fix link speed and autonegotiation

[ upstream commit 0dad8b3d4cbca12907f6bf7b4204ac7de6e76aeb ]

Don't assume autoneg in link_update().

Always call ionic_dev_cmd_port_autoneg() in start().

This allows the client to specify the link settings.

Fixes: 598f6726390f ("net/ionic: add basic port operations")

Signed-off-by: Andrew Boyer <aboyer at pensando.io>
---
 drivers/net/ionic/ionic_ethdev.c | 28 ++++++++++++++++++++++------
 1 file changed, 22 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c
index 68a6e630c8..fe778043eb 100644
--- a/drivers/net/ionic/ionic_ethdev.c
+++ b/drivers/net/ionic/ionic_ethdev.c
@@ -289,7 +289,10 @@ ionic_dev_link_update(struct rte_eth_dev *eth_dev,
 
 	/* Initialize */
 	memset(&link, 0, sizeof(link));
-	link.link_autoneg = ETH_LINK_AUTONEG;
+
+	if (adapter->idev.port_info->config.an_enable) {
+		link.link_autoneg = ETH_LINK_AUTONEG;
+	}
 
 	if (!adapter->link_up) {
 		/* Interface is down */
@@ -901,7 +904,8 @@ ionic_dev_start(struct rte_eth_dev *eth_dev)
 	struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev);
 	struct ionic_adapter *adapter = lif->adapter;
 	struct ionic_dev *idev = &adapter->idev;
-	uint32_t allowed_speeds;
+	uint32_t speed = 0, allowed_speeds;
+	uint8_t an_enable;
 	int err;
 
 	IONIC_PRINT_CALL();
@@ -925,11 +929,23 @@ ionic_dev_start(struct rte_eth_dev *eth_dev)
 		return err;
 	}
 
-	if (eth_dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED) {
-		uint32_t speed = ionic_parse_link_speeds(dev_conf->link_speeds);
+	/* Configure link */
+	an_enable = (dev_conf->link_speeds & ETH_LINK_SPEED_FIXED) == 0;
 
-		if (speed)
-			ionic_dev_cmd_port_speed(idev, speed);
+	ionic_dev_cmd_port_autoneg(idev, an_enable);
+	err = ionic_dev_cmd_wait_check(idev, IONIC_DEVCMD_TIMEOUT);
+	if (err)
+		IONIC_PRINT(WARNING, "Failed to %s autonegotiation",
+			an_enable ? "enable" : "disable");
+
+	if (!an_enable)
+		speed = ionic_parse_link_speeds(dev_conf->link_speeds);
+	if (speed) {
+		ionic_dev_cmd_port_speed(idev, speed);
+		err = ionic_dev_cmd_wait_check(idev, IONIC_DEVCMD_TIMEOUT);
+		if (err)
+			IONIC_PRINT(WARNING, "Failed to set link speed %u",
+				speed);
 	}
 
 	ionic_dev_link_update(eth_dev, 0);
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:36.784624307 +0000
+++ 0168-net-ionic-fix-link-speed-and-autonegotiation.patch	2021-02-05 11:18:29.122697128 +0000
@@ -1 +1 @@
-From 0dad8b3d4cbca12907f6bf7b4204ac7de6e76aeb Mon Sep 17 00:00:00 2001
+From a457b9a8d853a924067e536b4f2e819c6884e8bc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0dad8b3d4cbca12907f6bf7b4204ac7de6e76aeb ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index 838e93ef75..2face7c635 100644
+index 68a6e630c8..fe778043eb 100644
@@ -24 +25 @@
-@@ -276,7 +276,10 @@ ionic_dev_link_update(struct rte_eth_dev *eth_dev,
+@@ -289,7 +289,10 @@ ionic_dev_link_update(struct rte_eth_dev *eth_dev,
@@ -34,3 +35,3 @@
- 	if (!adapter->link_up ||
- 	    !(lif->state & IONIC_LIF_F_UP)) {
-@@ -869,7 +872,8 @@ ionic_dev_start(struct rte_eth_dev *eth_dev)
+ 	if (!adapter->link_up) {
+ 		/* Interface is down */
+@@ -901,7 +904,8 @@ ionic_dev_start(struct rte_eth_dev *eth_dev)
@@ -46 +47 @@
-@@ -896,11 +900,23 @@ ionic_dev_start(struct rte_eth_dev *eth_dev)
+@@ -925,11 +929,23 @@ ionic_dev_start(struct rte_eth_dev *eth_dev)


More information about the stable mailing list