Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by Kunihiko Hayashi
Mon, 16 Nov 2026 05:10
[REGRESSION] net: stmmac: v6.1.y clears xstats.pcpu_stats in __stmmac_open()
Author: Kunihiko Hayashi
Date: Mon, 16 Nov 2026 05:10
Date: Mon, 16 Nov 2026 05:10
55 lines
8750 bytes
8750 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads