[lkml]   [2014]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH 0/4] Provide netdev naming-policy via sysfs

This series implements a new sysfs attribute for netdevs called
"name_assign_type". It provides an integer that describes where an interface
name comes from. See Patch #1 for a description of this attribute. It is
modelled after the existing "addr_assign_type" attribute.

The main use-case is to allow udev to skip applying reliable ifnames to virtual
devices. For instance, if wifi-P2P devices are created, wpas already provides a
suitable naming-policy and udev shouldn't touch these devices. Same is true for
other virtual devices.
The idea is that if a device-name was provided by user-space, we should always
prefer fixing this naming-policy instead of making udev rename the device. For
kernel provided names that's hardly possible, though. Providing the
naming-policy source via sysfs is thus a simple way to see whether renames are

Additionally, this field allows to detect whether a netdev has been manually
renamed, which is quite useful for debugging and during crash-recovery.


David Herrmann (4):
net: add name_assign_type netdev attribute
mac80211: set NET_NAME_USER for user-space created ifs
ath6kl: set NET_NAME_USER for P2P ifs
brcmfmac: set NET_NAME_USER for P2P ifs

drivers/net/wireless/ath/ath6kl/cfg80211.c | 5 ++++-
drivers/net/wireless/ath/ath6kl/cfg80211.h | 1 +
drivers/net/wireless/ath/ath6kl/core.c | 4 ++--
drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 1 +
include/linux/netdevice.h | 6 ++++++
net/core/dev.c | 7 +++++++
net/core/net-sysfs.c | 2 ++
net/core/rtnetlink.c | 2 ++
net/mac80211/iface.c | 1 +
9 files changed, 26 insertions(+), 3 deletions(-)


 \ /
  Last update: 2014-02-27 16:21    [W:0.111 / U:46.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site