From: Jakub Kicinski <kuba@kernel.org>
To: Ian Wienand <iwienand@redhat.com>
Cc: netdev@vger.kernel.org, "David S . Miller" <davem@davemloft.net>,
Andrew Lunn <andrew@lunn.ch>, Tom Gundersen <teg@jklm.no>,
David Herrmann <dh.herrmann@gmail.com>
Subject: Re: [PATCH v2] net/ethernet : set default assignment identifier to NET_NAME_ENUM
Date: Tue, 5 Apr 2022 12:41:03 -0700 [thread overview]
Message-ID: <20220405124103.1f25e5b5@kernel.org> (raw)
In-Reply-To: <20220405001500.1485242-1-iwienand@redhat.com>
On Tue, 5 Apr 2022 10:15:00 +1000 Ian Wienand wrote:
> As noted in the original commit 685343fc3ba6 ("net: add
> name_assign_type netdev attribute")
>
> ... when the kernel has given the interface a name using global
> device enumeration based on order of discovery (ethX, wlanY, etc)
> ... are labelled NET_NAME_ENUM.
>
> That describes this case, so set the default for the devices here to
> NET_NAME_ENUM to better help userspace tools to know if they might
> like to rename them.
Adding Tom and David to CC, please make sure you CC people whose
commits you're mentioning. They may know something.
> This is inspired by inconsistent interface renaming between both
> distributions and within different releases of distributions;
This worries me. Why is UNKNOWN and ENUM treated differently?
Can you point me to the code which pays attention to the assign type?
> particularly with Xen's xen-netfront driver which gets it's device
> from here and is not renamed under CentOS 8, but is under CentOS 9.
> Of course it is ultimately up to userspace (systemd/udev) what happens
> to interfaces marked with with this flag, but providing the naming
> info brings it inline with other common interfaces such as virtio, and
> should ensure better general consistency of renaming behaviour into
> the future.
Can you spell out how netfront gets a different type to virtio?
I see alloc_etherdev_mq() in both cases.
> diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
> index ebcc812735a4..62b89d6f54fd 100644
> --- a/net/ethernet/eth.c
> +++ b/net/ethernet/eth.c
> @@ -391,7 +391,7 @@ EXPORT_SYMBOL(ether_setup);
> struct net_device *alloc_etherdev_mqs(int sizeof_priv, unsigned int txqs,
> unsigned int rxqs)
> {
> - return alloc_netdev_mqs(sizeof_priv, "eth%d", NET_NAME_UNKNOWN,
> + return alloc_netdev_mqs(sizeof_priv, "eth%d", NET_NAME_ENUM,
> ether_setup, txqs, rxqs);
> }
> EXPORT_SYMBOL(alloc_etherdev_mqs);
next prev parent reply other threads:[~2022-04-05 20:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-05 0:15 [PATCH v2] net/ethernet : set default assignment identifier to NET_NAME_ENUM Ian Wienand
2022-04-05 19:41 ` Jakub Kicinski [this message]
2022-04-06 1:56 ` Ian Wienand
2022-04-06 3:47 ` Jakub Kicinski
2022-04-06 9:36 ` [PATCH v3] " Ian Wienand
2022-04-07 5:08 ` Jakub Kicinski
2022-04-08 4:10 ` patchwork-bot+netdevbpf
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=20220405124103.1f25e5b5@kernel.org \
--to=kuba@kernel.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=dh.herrmann@gmail.com \
--cc=iwienand@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=teg@jklm.no \
/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.