All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Vivian Wang <wangruikang@iscas.ac.cn>
Cc: Simon Horman <horms@kernel.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Yixun Lan <dlan@gentoo.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>,
	Vadim Fedorenko <vadim.fedorenko@linux.dev>,
	Junhui Liu <junhui.liu@pigmoral.tech>,
	Maxime Chevallier <maxime.chevallier@bootlin.com>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-riscv@lists.infradead.org, spacemit@lists.linux.dev,
	linux-kernel@vger.kernel.org,
	Troy Mitchell <troy.mitchell@linux.spacemit.com>,
	Vivian Wang <uwu@dram.page>
Subject: Re: [PATCH net-next v9 2/5] net: spacemit: Add K1 Ethernet MAC
Date: Fri, 5 Sep 2025 16:59:08 -0700	[thread overview]
Message-ID: <20250905165908.69548ce0@kernel.org> (raw)
In-Reply-To: <45053235-3b01-42d8-98aa-042681104d11@iscas.ac.cn>

On Sat, 6 Sep 2025 00:35:37 +0800 Vivian Wang wrote:
> >> 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?  
> 
> Right... but tstats doesn't have *_dropped. It seems that tx_dropped and
> rx_dropped are considered "slow path" for real devices. It makes sense
> to me that those should be very rare.

Pretty sure Simon meant the per-cpu netdev stats in general.
There are three types of them, if you need drops I think you
probably want dstats. Take a look.

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

WARNING: multiple messages have this Message-ID (diff)
From: Jakub Kicinski <kuba@kernel.org>
To: Vivian Wang <wangruikang@iscas.ac.cn>
Cc: Simon Horman <horms@kernel.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Yixun Lan <dlan@gentoo.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>,
	Vadim Fedorenko <vadim.fedorenko@linux.dev>,
	Junhui Liu <junhui.liu@pigmoral.tech>,
	Maxime Chevallier <maxime.chevallier@bootlin.com>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-riscv@lists.infradead.org, spacemit@lists.linux.dev,
	linux-kernel@vger.kernel.org,
	Troy Mitchell <troy.mitchell@linux.spacemit.com>,
	Vivian Wang <uwu@dram.page>
Subject: Re: [PATCH net-next v9 2/5] net: spacemit: Add K1 Ethernet MAC
Date: Fri, 5 Sep 2025 16:59:08 -0700	[thread overview]
Message-ID: <20250905165908.69548ce0@kernel.org> (raw)
In-Reply-To: <45053235-3b01-42d8-98aa-042681104d11@iscas.ac.cn>

On Sat, 6 Sep 2025 00:35:37 +0800 Vivian Wang wrote:
> >> 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?  
> 
> Right... but tstats doesn't have *_dropped. It seems that tx_dropped and
> rx_dropped are considered "slow path" for real devices. It makes sense
> to me that those should be very rare.

Pretty sure Simon meant the per-cpu netdev stats in general.
There are three types of them, if you need drops I think you
probably want dstats. Take a look.

  reply	other threads:[~2025-09-06  0:14 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-05 11:09 [PATCH net-next v9 0/5] Add Ethernet MAC support for SpacemiT K1 Vivian Wang
2025-09-05 11:09 ` Vivian Wang
2025-09-05 11:09 ` [PATCH net-next v9 1/5] dt-bindings: net: Add " Vivian Wang
2025-09-05 11:09   ` Vivian Wang
2025-09-05 11:09 ` [PATCH net-next v9 2/5] net: spacemit: Add K1 Ethernet MAC Vivian Wang
2025-09-05 11:09   ` Vivian Wang
2025-09-05 15:35   ` Simon Horman
2025-09-05 15:35     ` Simon Horman
2025-09-05 15:45     ` Vivian Wang
2025-09-05 15:45       ` Vivian Wang
2025-09-05 16:01       ` Simon Horman
2025-09-05 16:01         ` Simon Horman
2025-09-05 16:35         ` Vivian Wang
2025-09-05 16:35           ` Vivian Wang
2025-09-05 23:59           ` Jakub Kicinski [this message]
2025-09-05 23:59             ` Jakub Kicinski
2025-09-06  1:46             ` Vivian Wang
2025-09-06  1:46               ` Vivian Wang
2025-09-07  8:22             ` Vivian Wang
2025-09-07  8:22               ` Vivian Wang
2025-09-09  0:34               ` Jakub Kicinski
2025-09-09  0:34                 ` Jakub Kicinski
2025-09-09 16:15           ` Simon Horman
2025-09-09 16:15             ` Simon Horman
2025-09-09 16:18             ` Simon Horman
2025-09-09 16:18               ` Simon Horman
2025-09-05 11:09 ` [PATCH net-next v9 3/5] riscv: dts: spacemit: Add Ethernet support for K1 Vivian Wang
2025-09-05 11:09   ` Vivian Wang
2025-09-05 11:09 ` [PATCH net-next v9 4/5] riscv: dts: spacemit: Add Ethernet support for BPI-F3 Vivian Wang
2025-09-05 11:09   ` Vivian Wang
2025-09-05 11:09 ` [PATCH net-next v9 5/5] riscv: dts: spacemit: Add Ethernet support for Jupiter Vivian Wang
2025-09-05 11:09   ` Vivian Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250905165908.69548ce0@kernel.org \
    --to=kuba@kernel.org \
    --cc=alex@ghiti.fr \
    --cc=andrew+netdev@lunn.ch \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dlan@gentoo.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=junhui.liu@pigmoral.tech \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh@kernel.org \
    --cc=spacemit@lists.linux.dev \
    --cc=troy.mitchell@linux.spacemit.com \
    --cc=uwu@dram.page \
    --cc=vadim.fedorenko@linux.dev \
    --cc=wangruikang@iscas.ac.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.