lkml.org 
[lkml]   [2025]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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?

...

\
 
 \ /
  Last update: 2025-09-05 18:02    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog