Netdev List
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Daniel Zahka <daniel.zahka@gmail.com>
Cc: Alexander Duyck <alexanderduyck@fb.com>,
	Jakub Kicinski <kuba@kernel.org>,
	kernel-team@meta.com, Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Paolo Abeni <pabeni@redhat.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	Stanislav Fomichev <sdf@fomichev.me>,
	Eric Dumazet <edumazet@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	bpf@vger.kernel.org
Subject: Re: [PATCH net-next v2 1/4] eth: mpnic: count packets, bytes, and drops per ring
Date: Sat, 17 Oct 2026 00:09:30 +0200	[thread overview]
Message-ID: <20261016220930.i32JEcqe@linutronix.de> (raw)
In-Reply-To: <20261012-mpnic-counters3-v2-1-8afba81c2d5a@gmail.com>

On 2026-10-12 05:04:34 [-0700], Daniel Zahka wrote:
> Keep packet, byte and drop counters on each Tx work, Tx completion, and
> Rx completion queue. Report them to the core via the rtnl_link_stats64
> interface.
> 
> Rx completion queues also count errors. Frames the device marked with an
> uncorrectable error are counted as errors, and frames that fail for any
> other reason are counted as drops.
> 
> All packets cleaned from the TWQ during mpnic_flush() are counted as
> drops, though completions for some of them may have been DMA'd into
> the completion ring between the time mpnic_poll() last ran and before
> mpnic_wait_all_queues_idle() returns. This is done for code simplicity.
> 
> An RCU approach is used because ndo_get_stats64 is not called with the
> instance lock.

Why do you have the two mpnic_base_stats and fold the stats into into
it? My guess would be that on stop the counters are reset and you want
to preserve the stats.

> Signed-off-by: Daniel Zahka <daniel.zahka@gmail.com>

Sebastian

  parent reply	other threads:[~2026-10-16 22:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-12 12:04 [PATCH net-next v2 0/4] eth: mpnic: add basic netdev statistics Daniel Zahka
2026-10-12 12:04 ` [PATCH net-next v2 1/4] eth: mpnic: count packets, bytes, and drops per ring Daniel Zahka
2026-10-13 12:05   ` netdev-bot+sashiko
2026-10-13 12:10     ` Daniel Zahka
2026-10-16 22:09   ` Sebastian Andrzej Siewior [this message]
2026-10-12 12:04 ` [PATCH net-next v2 2/4] eth: mpnic: report per-queue stats Daniel Zahka
2026-10-13 12:05   ` netdev-bot+sashiko
2026-10-13 13:30     ` Daniel Zahka
2026-10-12 12:04 ` [PATCH net-next v2 3/4] eth: mpnic: count Tx queue stops and wakes Daniel Zahka
2026-10-12 12:04 ` [PATCH net-next v2 4/4] eth: mpnic: count Rx allocation failures Daniel Zahka

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=20261016220930.i32JEcqe@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=alexanderduyck@fb.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel.zahka@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=hawk@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=kernel-team@meta.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox