From: Jakub Kicinski <kuba@kernel.org>
To: Amritha Nambiar <amritha.nambiar@intel.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, sridhar.samudrala@intel.com
Subject: Re: [net-next/RFC PATCH v1 4/4] netdev-genl: Add support for exposing napi info from netdev
Date: Fri, 2 Jun 2023 23:17:53 -0700 [thread overview]
Message-ID: <20230602231753.37ec92b9@kernel.org> (raw)
In-Reply-To: <168564136118.7284.18138054610456895287.stgit@anambiarhost.jf.intel.com>
On Thu, 01 Jun 2023 10:42:41 -0700 Amritha Nambiar wrote:
> Add support in ynl/netdev.yaml for napi related information. The
> netdev structure tracks all the napi instances and napi fields.
> The napi instances and associated queue[s] can be retrieved this way.
>
> Refactored netdev-genl to support exposing napi<->queue[s] mapping
> that is retained in a netdev.
>
> Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com>
> ---
> Documentation/netlink/specs/netdev.yaml | 39 +++++
> include/uapi/linux/netdev.h | 4 +
> net/core/netdev-genl.c | 239 ++++++++++++++++++++++++++-----
> tools/include/uapi/linux/netdev.h | 4 +
> 4 files changed, 247 insertions(+), 39 deletions(-)
>
> diff --git a/Documentation/netlink/specs/netdev.yaml b/Documentation/netlink/specs/netdev.yaml
> index b99e7ffef7a1..8d0edb529563 100644
> --- a/Documentation/netlink/specs/netdev.yaml
> +++ b/Documentation/netlink/specs/netdev.yaml
> @@ -62,6 +62,44 @@ attribute-sets:
> type: u64
> enum: xdp-act
> enum-as-flags: true
> + -
> + name: napi-info
> + doc: napi information such as napi-id, napi queues etc.
> + type: nest
> + multi-attr: true
Let's make a new attr space for the napi info command.
We don't reuse much of the attributes, and as the commands
grow stuffing all attrs into one space makes finding stuff
harder.
> + nested-attributes: dev-napi-info
And what's inside this nest should also be a separate attr space.
> + -
> + name: napi-id
> + doc: napi id
> + type: u32
> + -
> + name: rx-queues
> + doc: list of rx queues associated with a napi
> + type: u16
Make it u32, at the uAPI level we're tried to the width of fields, and
u16 ends up being the same size as u32 "on the wire" due to padding.
> + multi-attr: true
> + -
> + name: tx-queues
> + doc: list of tx queues associated with a napi
> + type: u16
> + multi-attr: true
> + -
> + name: dev-napi-info
> + subset-of: dev
Yeah, this shouldn't be a subset just a full-on separate attr space.
The handshake family may be a good example to look at, it's the biggest
so far written with the new rules in mind.
> + attributes:
> + -
> + name: napi-id
> + doc: napi id
> + type: u32
> + -
> + name: rx-queues
> + doc: list rx of queues associated with a napi
> + type: u16
> + multi-attr: true
> + -
> + name: tx-queues
> + doc: list tx of queues associated with a napi
> + type: u16
> + multi-attr: true
>
> operations:
> list:
> @@ -77,6 +115,7 @@ operations:
> attributes:
> - ifindex
> - xdp-features
> + - napi-info
Aaah, separate command, please. Let's not stuff all the information
into a single command like we did for rtnl.
> dump:
> reply: *dev-all
> -
next prev parent reply other threads:[~2023-06-03 6:17 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-01 17:42 [net-next/RFC PATCH v1 0/4] Introduce napi queues support Amritha Nambiar
2023-06-01 17:42 ` [net-next/RFC PATCH v1 1/4] net: Introduce new napi fields for rx/tx queues Amritha Nambiar
2023-06-03 6:06 ` Jakub Kicinski
2023-07-12 20:09 ` Nambiar, Amritha
2023-07-12 21:14 ` Jakub Kicinski
2023-07-12 23:11 ` Nambiar, Amritha
2023-07-12 23:53 ` Jakub Kicinski
2023-07-28 21:59 ` Jakub Kicinski
2023-07-28 22:37 ` Nambiar, Amritha
2023-07-28 23:09 ` Jakub Kicinski
2023-07-31 23:48 ` Nambiar, Amritha
2023-08-02 0:26 ` David Ahern
2023-08-02 0:50 ` Jakub Kicinski
2023-06-01 17:42 ` [net-next/RFC PATCH v1 2/4] net: Add support for associating napi with queue[s] Amritha Nambiar
2023-06-02 15:42 ` Simon Horman
2023-07-12 19:53 ` Nambiar, Amritha
2023-06-03 6:31 ` Paolo Abeni
2023-07-12 19:56 ` Nambiar, Amritha
2023-06-01 17:42 ` [net-next/RFC PATCH v1 3/4] netdev-genl: Introduce netdev dump ctx Amritha Nambiar
2023-06-01 17:42 ` [net-next/RFC PATCH v1 4/4] netdev-genl: Add support for exposing napi info from netdev Amritha Nambiar
2023-06-02 15:47 ` Simon Horman
2023-06-03 6:08 ` Jakub Kicinski
2023-07-12 20:05 ` Nambiar, Amritha
2023-07-12 19:54 ` Nambiar, Amritha
2023-06-03 6:17 ` Jakub Kicinski [this message]
2023-07-12 20:10 ` Nambiar, Amritha
2023-07-12 21:19 ` Jakub Kicinski
2023-06-03 6:00 ` [net-next/RFC PATCH v1 0/4] Introduce napi queues support Jakub Kicinski
2023-07-12 19:52 ` Nambiar, Amritha
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=20230602231753.37ec92b9@kernel.org \
--to=kuba@kernel.org \
--cc=amritha.nambiar@intel.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=sridhar.samudrala@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).