[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250905160158.GI553991@horms.kernel.org>
Date: Fri, 5 Sep 2025 17:01:58 +0100
From: Simon Horman <horms@...nel.org>
To: Vivian Wang <wangruikang@...as.ac.cn>
Cc: Andrew Lunn <andrew+netdev@...n.ch>, Jakub Kicinski <kuba@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Yixun Lan <dlan@...too.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
Philipp Zabel <p.zabel@...gutronix.de>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>, Alexandre Ghiti <alex@...ti.fr>,
Vadim Fedorenko <vadim.fedorenko@...ux.dev>,
Junhui Liu <junhui.liu@...moral.tech>,
Maxime Chevallier <maxime.chevallier@...tlin.com>,
netdev@...r.kernel.org, devicetree@...r.kernel.org,
linux-riscv@...ts.infradead.org, spacemit@...ts.linux.dev,
linux-kernel@...r.kernel.org,
Troy Mitchell <troy.mitchell@...ux.spacemit.com>,
Vivian Wang <uwu@...m.page>
Subject: Re: [PATCH net-next v9 2/5] net: spacemit: Add K1 Ethernet MAC
On Fri, Sep 05, 2025 at 11:45:29PM +0800, Vivian Wang wrote:
...
Hi Vivian,
> >> + status = emac_rx_frame_status(priv, rx_desc);
> >> + if (unlikely(status == RX_FRAME_DISCARD)) {
> >> + ndev->stats.rx_dropped++;
> > As per the comment in struct net-device,
> > ndev->stats should not be used in modern drivers.
> >
> > Probably you want to implement NETDEV_PCPU_STAT_TSTATS.
> >
> > Sorry for not mentioning this in an earlier review of
> > stats in this driver.
> >
> On a closer look, these counters in ndev->stats seems to be redundant
> with the hardware-tracked statistics, so maybe I should just not bother
> with updating ndev->stats. Does that make sense?
For rx/tx packets/bytes I think that makes sense.
But what about rx/tx drops?
...
Powered by blists - more mailing lists