* [REGRESSION] net: stmmac: v6.1.y clears xstats.pcpu_stats in __stmmac_open()
@ 2026-11-16 5:10 Kunihiko Hayashi
0 siblings, 0 replies; only message in thread
From: Kunihiko Hayashi @ 2026-11-16 5:10 UTC (permalink / raw)
To: stable; +Cc: Maxime Chevallier, netdev, linux-kernel
Hi,
A regression appears to have been introduced in the v6.1.y stable series
after the per-CPU stmmac statistics backport.
Since v6.1.191, DMA interrupt handlers were converted by
commit 52002cae02db ("net: stmmac: protect updates of 64-bit statistics counters")
from:
priv->xstats.rxq_stats[chan]
priv->xstats.txq_stats[chan]
to:
this_cpu_ptr(priv->xstats.pcpu_stats)
where pcpu_stats is allocated during probe():
priv->xstats.pcpu_stats =
devm_netdev_alloc_pcpu_stats(...);
However, __stmmac_open() still contains:
memset(&priv->xstats, 0,
sizeof(struct stmmac_extra_stats));
which clears the pcpu_stats pointer allocated during probe.
As a result:
probe()
-> allocate xstats.pcpu_stats
__stmmac_open()
-> memset(&priv->xstats, ...)
-> xstats.pcpu_stats = NULL
dma_interrupt
-> this_cpu_ptr(priv->xstats.pcpu_stats)
which appears to leave xstats.pcpu_stats cleared after allocation
during probe().
v6.6 and later do not appear to be affected because the xstats
memset was already removed by
commit 2eb85b750512 ("net: stmmac: don't clear network statistics in .ndo_open()").
before the per-CPU statistics conversion was introduced.
Has anyone else observed this issue?
Thanks,
---
Best Regards
Kunihiko Hayashi
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-16 5:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-16 5:10 [REGRESSION] net: stmmac: v6.1.y clears xstats.pcpu_stats in __stmmac_open() Kunihiko Hayashi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®