From: Joe Damato <jdamato@fastly.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Alexei Starovoitov <ast@kernel.org>,
Amritha Nambiar <amritha.nambiar@intel.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jesper Dangaard Brouer <hawk@kernel.org>,
Larysa Zaremba <larysa.zaremba@intel.com>,
Maciej Fijalkowski <maciej.fijalkowski@intel.com>,
Paolo Abeni <pabeni@redhat.com>,
Sridhar Samudrala <sridhar.samudrala@intel.com>,
Stanislav Fomichev <sdf@google.com>,
Tariq Toukan <tariqt@nvidia.com>
Subject: Re: [PATCH net-next 0/2] Expose netdev name in netdev netlink APIs
Date: Wed, 21 Feb 2024 11:21:23 -0800 [thread overview]
Message-ID: <20240221192122.GB68788@fastly.com> (raw)
In-Reply-To: <20240221110952.43c0ae6e@kernel.org>
On Wed, Feb 21, 2024 at 11:09:52AM -0800, Jakub Kicinski wrote:
> On Wed, 21 Feb 2024 07:57:28 -0800 Joe Damato wrote:
> > Greetings:
> >
> > The netdev netlink APIs currently provide the ifindex of a device
> > associated with the NIC queue or NAPI when the netlink API is used. In
> > order for user applications to map this back to a human readable device
> > name, user applications must issue a subsequent ioctl (SIOCGIFNAME) in
> > order to map an ifindex back to a device name.
>
> To be clear, if_indextoname() is doing it, right? I wanted to be sure
> the concern is really number of syscalls, not the difficulty in getting
> the name.
It seemed a bit odd to me to require the user to hit different APIs -- one
to get the ifindex and then another to get the name. I didn't realize you
had intentionally left the name out, though.
> > This patch set adds ifname to the API so that when queue or NAPI
> > information is retrieved, the human readable string is included. The netdev
> > netlink YAML spec has been updated to include this field, as well.
> >
> > This saves the subsequent call to ioctl and makes the netlink information
> > more user friendly. Applications might use this information in conjunction
> > with SO_INCOMING_NAPI_ID to map NAPI IDs to specific NICs with application
> > specific configuration (e.g. NUMA zone and CPU layout information).
>
> For context, the reason why I left the names out is that they can change
> at any moment, but primarily because there are also altnames now:
>
> 2: eth0:
> [...]
> altname enp2s0np0
>
> Most of the APIs try to accept altnames as well as the "main" name.
> If we propagate the name we'll step back into the rtnetlink naming
> mess :(
OK, I see. I didn't realize this was a thing. I suppose what you are saying
is that we wouldn't want to expose names at all and stick with ifindexes
only, is that right?
next prev parent reply other threads:[~2024-02-21 19:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-21 15:57 [PATCH net-next 0/2] Expose netdev name in netdev netlink APIs Joe Damato
2024-02-21 15:57 ` [PATCH net-next 1/2] netdev-genl: Add ifname for queue and NAPI APIs Joe Damato
2024-02-21 19:12 ` Jakub Kicinski
2024-02-21 19:17 ` Joe Damato
2024-02-21 19:12 ` Nambiar, Amritha
2024-02-21 19:23 ` Joe Damato
2024-02-22 20:55 ` kernel test robot
2024-02-23 11:21 ` Dan Carpenter
2024-02-21 15:57 ` [PATCH net-next 2/2] netdev-genl: spec: Add ifname to netdev nl YAML spec Joe Damato
2024-02-21 19:09 ` [PATCH net-next 0/2] Expose netdev name in netdev netlink APIs Jakub Kicinski
2024-02-21 19:21 ` Joe Damato [this message]
2024-02-21 19:26 ` Jakub Kicinski
2024-02-21 19:29 ` Joe Damato
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=20240221192122.GB68788@fastly.com \
--to=jdamato@fastly.com \
--cc=amritha.nambiar@intel.com \
--cc=ast@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=kuba@kernel.org \
--cc=larysa.zaremba@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@google.com \
--cc=sridhar.samudrala@intel.com \
--cc=tariqt@nvidia.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).