patch 'net/dpaa2: fix link after port stop/start' has been queued to stable release 23.11.7

Shani Peretz shperetz at nvidia.com
Wed Apr 15 12:00:26 CEST 2026


Hi,

FYI, your patch has been queued to stable release 23.11.7

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

This queued commit can be viewed at:
https://github.com/shanipr/dpdk-stable/commit/577bbd6d413b986dc5b21da8160ec8013805e0cb

Thanks.

Shani

---
>From 577bbd6d413b986dc5b21da8160ec8013805e0cb Mon Sep 17 00:00:00 2001
From: Maxime Leroy <maxime at leroys.fr>
Date: Wed, 25 Mar 2026 21:45:32 +0100
Subject: [PATCH] net/dpaa2: fix link after port stop/start

[ upstream commit d1e32473d1145870fc26e8a9241d3a41014c457e ]

When LSC (Link State Change) interrupts are enabled, the link status
is only updated by interrupt events -- rte_eth_link_get_nowait() reads
the cached value without querying the hardware.

During dev_start(), dpaa2_dev_set_link_up() was called immediately
after dpni_enable(), before LSC interrupts were registered. The MAC
needs ~30ms to renegotiate after being re-enabled, so the initial
link query returned link down. By the time the link came up, the LSC
interrupt handler was not yet installed, so the link-up event was
missed and the cached link status remained down permanently.

The issue does not occur on the first dev_start() after probe because
dpni_reset() during probe does not bring the MAC down -- the kernel
dpmac driver keeps the physical link up. Only dpni_disable() during
dev_stop() causes the MAC to go down, requiring a full renegotiation
on the next dpni_enable().

The problem is more likely to occur with many queues: the queue setup
loop (dpni_get_queue for each RX queue) between dpni_enable() and the
LSC interrupt registration adds MC portal round-trips, giving the MAC
more time to complete negotiation before interrupts are armed. This
makes the link-up event more likely to be missed.

Move dpaa2_dev_set_link_up() after the LSC interrupt setup so that
any link-up event occurring during MAC negotiation is properly caught.

Fixes: c5acbb5ea20e ("net/dpaa2: support link status event")

Signed-off-by: Maxime Leroy <maxime at leroys.fr>
Acked-by: Hemant Agrawal <hemant.agrawal at nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 5a27584939..8cc390a9bb 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -1210,9 +1210,6 @@ dpaa2_dev_start(struct rte_eth_dev *dev)
 		return ret;
 	}
 
-	/* Power up the phy. Needed to make the link go UP */
-	dpaa2_dev_set_link_up(dev);
-
 	for (i = 0; i < data->nb_rx_queues; i++) {
 		dpaa2_q = (struct dpaa2_queue *)data->rx_queues[i];
 		ret = dpni_get_queue(dpni, CMD_PRI_LOW, priv->token,
@@ -1279,6 +1276,12 @@ dpaa2_dev_start(struct rte_eth_dev *dev)
 		dpaa2_eth_setup_irqs(dev, 1);
 	}
 
+	/* Power up the phy. Needed to make the link go UP.
+	 * Called after LSC interrupt setup so that the link-up
+	 * event is not missed if the MAC negotiates quickly.
+	 */
+	dpaa2_dev_set_link_up(dev);
+
 	/* Change the tx burst function if ordered queues are used */
 	if (priv->en_ordered)
 		dev->tx_pkt_burst = dpaa2_dev_tx_ordered;
-- 
2.43.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-04-14 14:44:36.792510871 +0300
+++ 0085-net-dpaa2-fix-link-after-port-stop-start.patch	2026-04-14 14:44:28.871490000 +0300
@@ -1 +1 @@
-From d1e32473d1145870fc26e8a9241d3a41014c457e Mon Sep 17 00:00:00 2001
+From 577bbd6d413b986dc5b21da8160ec8013805e0cb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d1e32473d1145870fc26e8a9241d3a41014c457e ]
+
@@ -33 +34,0 @@
-Cc: stable at dpdk.org
@@ -42 +43 @@
-index 5e0a897ed3..cae81d3a20 100644
+index 5a27584939..8cc390a9bb 100644
@@ -45 +46 @@
-@@ -1392,9 +1392,6 @@ dpaa2_dev_start(struct rte_eth_dev *dev)
+@@ -1210,9 +1210,6 @@ dpaa2_dev_start(struct rte_eth_dev *dev)
@@ -53 +54 @@
- 		dpaa2_q = data->rx_queues[i];
+ 		dpaa2_q = (struct dpaa2_queue *)data->rx_queues[i];
@@ -55 +56 @@
-@@ -1462,6 +1459,12 @@ dpaa2_dev_start(struct rte_eth_dev *dev)
+@@ -1279,6 +1276,12 @@ dpaa2_dev_start(struct rte_eth_dev *dev)


More information about the stable mailing list