From: Jakub Kicinski <kuba@kernel.org>
To: Stanislav Fomichev <sdf@google.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, amritha.nambiar@intel.com, danielj@nvidia.com,
mst@redhat.com, michael.chan@broadcom.com,
vadim.fedorenko@linux.dev
Subject: Re: [PATCH net-next 1/3] netdev: add per-queue statistics
Date: Mon, 26 Feb 2024 14:19:28 -0800 [thread overview]
Message-ID: <20240226141928.171b79fe@kernel.org> (raw)
In-Reply-To: <Zd0EJq3gS2_p9NQ8@google.com>
On Mon, 26 Feb 2024 13:35:34 -0800 Stanislav Fomichev wrote:
> > + -
> > + name: stats-scope
> > + type: flags
> > + entries: [ queue ]
>
> IIUC, in order to get netdev-scoped stats in v1 (vs rfc) is to not set
> stats-scope, right? Any reason we dropped the explicit netdev entry?
> It seems more robust with a separate entry and removes the ambiguity about
> which stats we're querying.
The change is because I switched from enum to flags.
I'm not 100% sure which one is going to cause fewer issues down
the line. It's a question of whether the next scope we add will
be disjoint with or subdividing previous scopes.
I think only subdividing previous scopes makes sense. If we were
to add "stats per NAPI" (bad example) or "per buffer pool" or IDK what
other thing -- we should expose that as a new netlink command, not mix
it with the queues.
The expectation is that scopes will be extended with hw vs sw, or
per-CPU (e.g. page pool recycling). In which case we'll want flags,
so that we can combine them -- ask for HW stats for a queue or hw
stats for the entire netdev.
Perhaps I should rename stats -> queue-stats to make this more explicit?
The initial version I wrote could iterate both over NAPIs and
queues. This could be helpful to some drivers - but I realized that it
would lead to rather painful user experience (does the driver maintain
stats per NAPI or per queue?) and tricky implementation of the device
level sum (device stats = Sum(queue) or Sum(queue) + Sum(NAPI)??)
next prev parent reply other threads:[~2024-02-26 22:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-26 21:10 [PATCH net-next 0/3] netdev: add per-queue statistics Jakub Kicinski
2024-02-26 21:10 ` [PATCH net-next 1/3] " Jakub Kicinski
2024-02-26 21:35 ` Stanislav Fomichev
2024-02-26 22:19 ` Jakub Kicinski [this message]
2024-02-27 3:37 ` Stanislav Fomichev
2024-02-27 15:24 ` Jakub Kicinski
2024-02-27 18:09 ` Stanislav Fomichev
2024-02-27 19:49 ` Nambiar, Amritha
2024-02-27 10:29 ` Przemek Kitszel
2024-02-27 15:00 ` Jakub Kicinski
2024-02-27 16:17 ` Przemek Kitszel
2024-02-27 23:01 ` Jakub Kicinski
2024-02-26 21:10 ` [PATCH net-next 2/3] netdev: add queue stat for alloc failures Jakub Kicinski
2024-02-26 21:10 ` [PATCH net-next 3/3] eth: bnxt: support per-queue statistics Jakub Kicinski
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=20240226141928.171b79fe@kernel.org \
--to=kuba@kernel.org \
--cc=amritha.nambiar@intel.com \
--cc=danielj@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=michael.chan@broadcom.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@google.com \
--cc=vadim.fedorenko@linux.dev \
/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.