提交 e9f656b7 编写于 作者: I Ian Wienand 提交者: Jakub Kicinski

net: ethernet: set default assignment identifier to NET_NAME_ENUM

As noted in the original commit 685343fc ("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.  Current popular network setup tools like systemd use
this only to warn if you're setting static settings on interfaces that
might change, so it is expected this only leads to better user
information, but not changing of interfaces, etc.
Signed-off-by: NIan Wienand <iwienand@redhat.com>
Link: https://lore.kernel.org/r/20220406093635.1601506-1-iwienand@redhat.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
上级 15fcdf6a
...@@ -391,7 +391,7 @@ EXPORT_SYMBOL(ether_setup); ...@@ -391,7 +391,7 @@ EXPORT_SYMBOL(ether_setup);
struct net_device *alloc_etherdev_mqs(int sizeof_priv, unsigned int txqs, struct net_device *alloc_etherdev_mqs(int sizeof_priv, unsigned int txqs,
unsigned int rxqs) 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); ether_setup, txqs, rxqs);
} }
EXPORT_SYMBOL(alloc_etherdev_mqs); EXPORT_SYMBOL(alloc_etherdev_mqs);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册