netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/ethernet : set default assignment identifier to NET_NAME_ENUM
@ 2022-04-01  6:34 Ian Wienand
  2022-04-01 13:13 ` Andrew Lunn
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Wienand @ 2022-04-01  6:34 UTC (permalink / raw)
  To: netdev; +Cc: David S. Miller, Ian Wienand

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.

Signed-off-by: Ian Wienand <iwienand@redhat.com>
---
 net/ethernet/eth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-04-04 12:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-01  6:34 [PATCH] net/ethernet : set default assignment identifier to NET_NAME_ENUM Ian Wienand
2022-04-01 13:13 ` Andrew Lunn
2022-04-02  0:16   ` Ian Wienand
2022-04-02 18:40     ` Andrew Lunn
2022-04-04  0:55       ` Ian Wienand
2022-04-04 12:31         ` Andrew Lunn

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).