patch 'net/sfc: fix reporting status of autonegotiation' has been queued to stable release 24.11.5
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Fri Feb 20 15:55:35 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.11.5
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/22/26. 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/cd65a251d54ea7324abb6a11101583bf31c7145c
Thanks.
Luca Boccassi
---
>From cd65a251d54ea7324abb6a11101583bf31c7145c Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov at arknetworks.am>
Date: Tue, 30 Dec 2025 01:35:27 +0400
Subject: [PATCH] net/sfc: fix reporting status of autonegotiation
[ upstream commit 95330ee234cd2d4e60dec4ca7c02bb09e766ce86 ]
Currently, the driver always indicates speed autonegotiation to be enabled,
even when the user has disabled it. Fix the code to report the true status.
Fixes: 886f8d8a05bf ("net/sfc: retrieve link info")
Signed-off-by: Ivan Malov <ivan.malov at arknetworks.am>
Reviewed-by: Andy Moreton <andy.moreton at amd.com>
---
drivers/net/sfc/sfc.h | 2 +-
drivers/net/sfc/sfc_ethdev.c | 5 +++--
drivers/net/sfc/sfc_ev.c | 7 ++++++-
drivers/net/sfc/sfc_port.c | 8 +++++---
drivers/net/sfc/sfc_repr.c | 2 +-
5 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h
index 2432a2307e..2e74fb6ecf 100644
--- a/drivers/net/sfc/sfc.h
+++ b/drivers/net/sfc/sfc.h
@@ -413,7 +413,7 @@ int sfc_port_configure(struct sfc_adapter *sa);
void sfc_port_close(struct sfc_adapter *sa);
int sfc_port_start(struct sfc_adapter *sa);
void sfc_port_stop(struct sfc_adapter *sa);
-void sfc_port_link_mode_to_info(efx_link_mode_t link_mode,
+void sfc_port_link_mode_to_info(efx_link_mode_t link_mode, uint32_t phy_cap_req,
struct rte_eth_link *link_info);
int sfc_port_update_mac_stats(struct sfc_adapter *sa, boolean_t manual_update);
int sfc_port_get_mac_stats(struct sfc_adapter *sa, struct rte_eth_xstat *xstats,
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index d4e997bcef..21e39e5981 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -259,13 +259,14 @@ sfc_dev_get_rte_link(struct rte_eth_dev *dev, int wait_to_complete,
SFC_ASSERT(link != NULL);
if (sa->state != SFC_ETHDEV_STARTED) {
- sfc_port_link_mode_to_info(EFX_LINK_UNKNOWN, link);
+ sfc_port_link_mode_to_info(EFX_LINK_UNKNOWN, 0, link);
} else if (wait_to_complete) {
efx_link_mode_t link_mode;
if (efx_port_poll(sa->nic, &link_mode) != 0)
link_mode = EFX_LINK_UNKNOWN;
- sfc_port_link_mode_to_info(link_mode, link);
+ sfc_port_link_mode_to_info(link_mode, sa->port.phy_adv_cap,
+ link);
} else {
sfc_ev_mgmt_qpoll(sa);
rte_eth_linkstatus_get(dev, link);
diff --git a/drivers/net/sfc/sfc_ev.c b/drivers/net/sfc/sfc_ev.c
index c0d58c9554..3151f3b74a 100644
--- a/drivers/net/sfc/sfc_ev.c
+++ b/drivers/net/sfc/sfc_ev.c
@@ -469,7 +469,12 @@ sfc_ev_link_change(void *arg, efx_link_mode_t link_mode)
struct sfc_adapter *sa = evq->sa;
struct rte_eth_link new_link;
- sfc_port_link_mode_to_info(link_mode, &new_link);
+ /*
+ * Reading 'sa->port.phy_adv_cap' without acquiring adaptor lock may
+ * render autonegotiation status inaccurate, but that's not critical,
+ * as it's unlikely to happen often and may be a practical trade-off.
+ */
+ sfc_port_link_mode_to_info(link_mode, sa->port.phy_adv_cap, &new_link);
if (rte_eth_linkstatus_set(sa->eth_dev, &new_link) == 0)
evq->sa->port.lsc_seq++;
diff --git a/drivers/net/sfc/sfc_port.c b/drivers/net/sfc/sfc_port.c
index e5bb6d8620..e4d27c5cda 100644
--- a/drivers/net/sfc/sfc_port.c
+++ b/drivers/net/sfc/sfc_port.c
@@ -130,7 +130,8 @@ sfc_port_init_dev_link(struct sfc_adapter *sa)
if (rc != 0)
return rc;
- sfc_port_link_mode_to_info(link_mode, ¤t_link);
+ sfc_port_link_mode_to_info(link_mode, sa->port.phy_adv_cap,
+ ¤t_link);
EFX_STATIC_ASSERT(sizeof(*dev_link) == sizeof(rte_atomic64_t));
rte_atomic64_set((rte_atomic64_t *)dev_link,
@@ -593,7 +594,7 @@ sfc_set_rx_mode(struct sfc_adapter *sa)
}
void
-sfc_port_link_mode_to_info(efx_link_mode_t link_mode,
+sfc_port_link_mode_to_info(efx_link_mode_t link_mode, uint32_t phy_cap_req,
struct rte_eth_link *link_info)
{
SFC_ASSERT(link_mode < EFX_LINK_NMODES);
@@ -659,7 +660,8 @@ sfc_port_link_mode_to_info(efx_link_mode_t link_mode,
break;
}
- link_info->link_autoneg = RTE_ETH_LINK_AUTONEG;
+ if ((phy_cap_req & (1U << EFX_PHY_CAP_AN)) != 0)
+ link_info->link_autoneg = RTE_ETH_LINK_AUTONEG;
}
int
diff --git a/drivers/net/sfc/sfc_repr.c b/drivers/net/sfc/sfc_repr.c
index 2c1421b959..205ba24a93 100644
--- a/drivers/net/sfc/sfc_repr.c
+++ b/drivers/net/sfc/sfc_repr.c
@@ -532,7 +532,7 @@ sfc_repr_dev_link_update(struct rte_eth_dev *dev,
struct rte_eth_link link;
if (sr->state != SFC_ETHDEV_STARTED) {
- sfc_port_link_mode_to_info(EFX_LINK_UNKNOWN, &link);
+ sfc_port_link_mode_to_info(EFX_LINK_UNKNOWN, 0, &link);
} else {
memset(&link, 0, sizeof(link));
link.link_status = RTE_ETH_LINK_UP;
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-02-20 14:55:44.607670767 +0000
+++ 0033-net-sfc-fix-reporting-status-of-autonegotiation.patch 2026-02-20 14:55:43.208191141 +0000
@@ -1 +1 @@
-From 95330ee234cd2d4e60dec4ca7c02bb09e766ce86 Mon Sep 17 00:00:00 2001
+From cd65a251d54ea7324abb6a11101583bf31c7145c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 95330ee234cd2d4e60dec4ca7c02bb09e766ce86 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index af32ccfaa3..629578549f 100644
+index 2432a2307e..2e74fb6ecf 100644
@@ -26 +27 @@
-@@ -417,7 +417,7 @@ int sfc_port_configure(struct sfc_adapter *sa);
+@@ -413,7 +413,7 @@ int sfc_port_configure(struct sfc_adapter *sa);
@@ -36 +37 @@
-index 7c2abaab6b..6be98c49d0 100644
+index d4e997bcef..21e39e5981 100644
@@ -39 +40 @@
-@@ -262,13 +262,14 @@ sfc_dev_get_rte_link(struct rte_eth_dev *dev, int wait_to_complete,
+@@ -259,13 +259,14 @@ sfc_dev_get_rte_link(struct rte_eth_dev *dev, int wait_to_complete,
@@ -57 +58 @@
-index 1d1ee0671f..f058b3cb9b 100644
+index c0d58c9554..3151f3b74a 100644
@@ -60,2 +61,3 @@
-@@ -516,7 +516,12 @@ sfc_ev_link_change(void *arg, efx_link_mode_t link_mode)
- }
+@@ -469,7 +469,12 @@ sfc_ev_link_change(void *arg, efx_link_mode_t link_mode)
+ struct sfc_adapter *sa = evq->sa;
+ struct rte_eth_link new_link;
@@ -63 +64,0 @@
- decode_comprehensive:
@@ -71,2 +71,0 @@
-
- set:
@@ -73,0 +73,2 @@
+ evq->sa->port.lsc_seq++;
+
@@ -75 +76 @@
-index e5a7b8358d..33b53f7ac8 100644
+index e5bb6d8620..e4d27c5cda 100644
@@ -88 +89 @@
-@@ -614,7 +615,7 @@ sfc_set_rx_mode(struct sfc_adapter *sa)
+@@ -593,7 +594,7 @@ sfc_set_rx_mode(struct sfc_adapter *sa)
@@ -97 +98 @@
-@@ -684,7 +685,8 @@ sfc_port_link_mode_to_info(efx_link_mode_t link_mode,
+@@ -659,7 +660,8 @@ sfc_port_link_mode_to_info(efx_link_mode_t link_mode,
@@ -108 +109 @@
-index 93da97387c..fbb5f58a8e 100644
+index 2c1421b959..205ba24a93 100644
@@ -111 +112 @@
-@@ -533,7 +533,7 @@ sfc_repr_dev_link_update(struct rte_eth_dev *dev,
+@@ -532,7 +532,7 @@ sfc_repr_dev_link_update(struct rte_eth_dev *dev,
More information about the stable
mailing list