Re: [PATCH net-next] ppp: reuse ppp_get_stats64() for ioctl stats
Qingfang Deng <[email protected]> Wed, 15 Jul 2026 13:30:39 +0800
| Newsgroups | org.kernel.vger.linux-ppp,org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
Hi, On 2026/7/14 17:19, Zhixing Chen wrote: > ppp_get_stats() open-codes the per-cpu tstats aggregation even though > ppp_get_stats64() already collects the packet, byte and error counters > needed by the legacy SIOCGPPPSTATS ioctl path. > > Reuse ppp_get_stats64() when filling struct ppp_stats. This keeps the > ioctl stats path consistent with the netdev stats64 path and removes the > open-coded per-cpu stats aggregation from the ioctl path. > > Signed-off-by: Zhixing Chen <[email protected]> > --- > > This is meant as a small cleanup. The ioctl path and the netdev stats64 > path already use the same underlying counters, so this just makes the > ioctl path reuse ppp_get_stats64() instead of open-coding the per-cpu > aggregation locally. On a 32-bit architecture, this will introduce unnecessary seqlock overhead to get the upper 32-bit of a counter, which would then be immediately discarded. Regards, Qingfang