From: Stephen Hemminger <stephen@networkplumber.org>
To: Haiyang Zhang <haiyangz@microsoft.com>
Cc: sashal@kernel.org, linux-hyperv@vger.kernel.org,
netdev@vger.kernel.org, kys@microsoft.com,
sthemmin@microsoft.com, olaf@aepfle.de, vkuznets@redhat.com,
davem@davemloft.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next, 3/3] hv_netvsc: Name NICs based on vmbus offer sequence and use async probe
Date: Sat, 28 Dec 2019 16:13:18 -0800 [thread overview]
Message-ID: <20191228161318.4501bb79@hermes.lan> (raw)
In-Reply-To: <1577576793-113222-4-git-send-email-haiyangz@microsoft.com>
On Sat, 28 Dec 2019 15:46:33 -0800
Haiyang Zhang <haiyangz@microsoft.com> wrote:
> - net = alloc_etherdev_mq(sizeof(struct net_device_context),
> - VRSS_CHANNEL_MAX);
> + snprintf(name, IFNAMSIZ, "eth%d", dev->channel->dev_num);
> + net = alloc_netdev_mqs(sizeof(struct net_device_context), name,
> + NET_NAME_ENUM, ether_setup,
> + VRSS_CHANNEL_MAX, VRSS_CHANNEL_MAX);
> +
Naming is a hard problem, and best left to userspace.
By choosing ethN as a naming policy, you potentially run into naming
conflicts with other non netvsc devices like those passed through or
SR-IOV devices.
Better to have udev use dev_num and use something like envN or something.
Udev also handles SRIOV devices in later versions.
Fighting against systemd, netplan, etc is not going to be make friends.
next prev parent reply other threads:[~2019-12-29 0:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-28 23:46 [PATCH net-next, 0/3] Add vmbus dev_num and enable netvsc async probing Haiyang Zhang
2019-12-28 23:46 ` [PATCH net-next, 1/3] Drivers: hv: vmbus: Add a dev_num variable based on channel offer sequence Haiyang Zhang
2019-12-29 0:20 ` Stephen Hemminger
2019-12-29 1:06 ` Haiyang Zhang
2019-12-28 23:46 ` [PATCH net-next, 2/3] Drivers: hv: vmbus: Add dev_num to sysfs Haiyang Zhang
2019-12-28 23:46 ` [PATCH net-next, 3/3] hv_netvsc: Name NICs based on vmbus offer sequence and use async probe Haiyang Zhang
2019-12-29 0:13 ` Stephen Hemminger [this message]
2019-12-29 1:23 ` Haiyang Zhang
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=20191228161318.4501bb79@hermes.lan \
--to=stephen@networkplumber.org \
--cc=davem@davemloft.net \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olaf@aepfle.de \
--cc=sashal@kernel.org \
--cc=sthemmin@microsoft.com \
--cc=vkuznets@redhat.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).