From: Jakub Kicinski <kuba@kernel.org>
To: "Daniel Zahka" <daniel.zahka@gmail.com>
Cc: <netdev-bot+sashiko@kernel.org>, <alexanderduyck@fb.com>,
<kernel-team@meta.com>, <andrew+netdev@lunn.ch>,
<davem@davemloft.net>, <pabeni@redhat.com>, <ast@kernel.org>,
<daniel@iogearbox.net>, <hawk@kernel.org>,
<john.fastabend@gmail.com>, <sdf@fomichev.me>,
<edumazet@kernel.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <bpf@vger.kernel.org>
Subject: Re: [PATCH net-next v2 2/4] eth: mpnic: report per-queue stats
Date: Mon, 19 Oct 2026 19:00:35 -0700 [thread overview]
Message-ID: <20261019190035.4c3ebf4d@kernel.org> (raw)
In-Reply-To: <DM3QWDZ4B408.2O12B5PXKY8AR@gmail.com>
On Tue, 13 Oct 2026 09:30:02 -0400 Daniel Zahka wrote:
> > The counter semantics come from "eth: mpnic: count packets, bytes, and
> > drops per ring" earlier in this series. This patch is the one that
> > exposes them as qstats rx-packets and rx-bytes.
> >
> > The later patch "eth: mpnic: count Rx allocation failures" also counts
> > skb build failures in alloc_failed. Those packets still stay in packets
> > and bytes.
>
> So, the question is whether or not rx-packets, reported both to rtnl
> stats and qstats, should count drops in the driver. Here, drops are
> either running out of shinfo frags, but really just skb allocation
> failure.
>
> The docs for rtnl stats strongly suggest an skb allocation failure
> should still be counted for rx-packets.
>
> The docs for qstats imply the opposite. Especially when xdp is not
> present, which is the case as of this point. Once xdp is introduced,
> though, counting an skb allocation failure in rx-packets becomes
> reasonable by the qstats docs, because xdp runs before the point of skb
> allocation.
>
> Another option would be reporting rx-packets differently for the two
> APIs. I think this is not desirable, and seems to violate what is in
> the stats.py selftest.
>
> So, I could either submit a v3, which would just be reverting to v1, or
> take the approach here as is.
The rtnl stats and qstats are supposed to behave the same if maintained
by SW. I should have been clearer in the doc but "XDP is considered the
first layer" was supposed to mean - if you reach the point in the driver
where you'd call an XDP prog - its a successful Rx, whether the XDP prog
is actually attached & called, or is NULL & skipped.
I believe the series is good as is.
Acked-by: Jakub Kicinski <kuba@kernel.org>
next prev parent reply other threads:[~2026-10-20 2:00 UTC|newest]
Thread overview: 17+ 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
2026-10-19 13:04 ` Daniel Zahka
2026-10-19 21:54 ` Sebastian Andrzej Siewior
2026-10-20 2:05 ` Jakub Kicinski
2026-10-20 21:21 ` Sebastian Andrzej Siewior
2026-10-20 21:34 ` Daniel Zahka
2026-10-20 21:50 ` Jakub Kicinski
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-20 2:00 ` Jakub Kicinski [this message]
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=20261019190035.4c3ebf4d@kernel.org \
--to=kuba@kernel.org \
--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=linux-kernel@vger.kernel.org \
--cc=netdev-bot+sashiko@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
all inboxes | Powered by JetHome®