Re: [PATCH net] net: fix spurious TX timeout after dev_activate()

From
Breno Leitao <leitao@debian.org>
Date
2026-08-25 10:37:04
Also in
lkml, stable
Reply to
Nicolai Buchwitz, 2026-08-24
Hello Nicolai,

On Mon, Aug 24, 2026 at 05:13:13PM +0200, Nicolai Buchwitz wrote:
On 24.8.2026 13:45, Breno Leitao wrote:
quoted
While debugging another issue today, I found out that my TX queue is
stopped for 136.07 years (4294907392 ms).
nit: 4294907392 ms is ~49.7 days
Lol, let me fix update it.
quoted
    bnxt_en 0002:01:00.0 eth0: NETDEV WATCHDOG: CPU: 28: transmit queue
23 timed out 4294907392 ms

4294907392 is not an elapsed time. It is the value of jiffies at that
moment: INITIAL_JIFFIES is 4294667296.

dev_activate() runs transition_one_qdisc() over every TX queue, which
resets trans_start to 0, and then stamps only queue 0 through
netif_trans_update().

Stamp jiffies instead. A queue stopped across dev_activate() now gets a
full watchdog_timeo of grace, and is still reported if it is stopped
that long.

Fixes: 9b36627acecd ("net: remove dev->trans_start")
Cc: <redacted>
Signed-off-by: Breno Leitao <leitao@debian.org>
---
 net/sched/sch_generic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index ef2b4bf515641..4539dc2c6d380 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -1278,7 +1278,7 @@ static void transition_one_qdisc(struct net_device
*dev,

 	rcu_assign_pointer(dev_queue->qdisc, new_qdisc);
 	if (need_watchdog_p) {
-		WRITE_ONCE(dev_queue->trans_start, 0);
+		WRITE_ONCE(dev_queue->trans_start, jiffies);
 		*need_watchdog_p = 1;
 	}
 }
Follow up or v2: netif_trans_update() in dev_activate() now seems redundant?
Yea, good point, we can get rid of netif_trans_update(), given we have
updated all the trans_start in here.

I will respin this one.

Thanks for the review,
--breno

--
pw-bot: cr
Thread (5 messages) 5 messages, 3 authors, last reply 2026-08-25
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help