From: Tom Gundersen <teg@jklm.no>
To: David Herrmann <dh.herrmann@gmail.com>
Cc: netdev <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Kay Sievers <kay.sievers@vrfy.org>,
Johannes berg <johannes@sipsolutions.net>,
LKML <linux-kernel@vger.kernel.org>,
Linux Wireless List <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 0/4] Provide netdev naming-policy via sysfs
Date: Sat, 1 Mar 2014 15:19:03 +0100 [thread overview]
Message-ID: <CAG-2HqVQRTdA5NvjirR35qLbAkDUB1dN6oAvU2CLs4dnFS42Nw@mail.gmail.com> (raw)
In-Reply-To: <CAG-2HqWahCVvDLPwoMo7O4kam+W0o7BQGm4cRBvc9=X_p0fF7Q@mail.gmail.com>
On Thu, Feb 27, 2014 at 4:47 PM, Tom Gundersen <teg@jklm.no> wrote:
> On Thu, Feb 27, 2014 at 3:47 PM, David Herrmann <dh.herrmann@gmail.com> wrote:
>> 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
>> needed.
>>
>> Additionally, this field allows to detect whether a netdev has been manually
>> renamed, which is quite useful for debugging and during crash-recovery.
>
> Moreover, it would be useful for udev to reliably know if some other
> userspace process already renamed a device, so we know not to touch
> it. This can easily happen for instance if some renaming happens in
> the initrd or from script called from udev rules.
Incidentally, just after writing this email I ran into precisely this
problem due to buggy udev rules in a third-party package. The result
was that the upstream NIC naming rules were unable to detect that a
given NIC had already been renamed and ended up renaming them a second
time (hence wrecking havoc).
The problem was easy enough to fix, but with these patches we would be
able to avoid the issue altogether, so I'm looking forward to fixing
up udev to using this interface.
> Acked-by: Tom Gundersen <teg@jklm.no>
prev parent reply other threads:[~2014-03-01 14:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-27 14:47 [PATCH 0/4] Provide netdev naming-policy via sysfs David Herrmann
2014-02-27 14:47 ` [PATCH 1/4] net: add name_assign_type netdev attribute David Herrmann
2014-02-27 14:47 ` [PATCH 2/4] mac80211: set NET_NAME_USER for user-space created ifs David Herrmann
2014-02-27 14:53 ` Johannes Berg
2014-02-27 14:56 ` David Herrmann
2014-02-27 16:18 ` Johannes Berg
2014-02-27 17:14 ` David Herrmann
2014-02-27 14:47 ` [PATCH 3/4] ath6kl: set NET_NAME_USER for P2P ifs David Herrmann
2014-02-27 15:27 ` Kalle Valo
2014-02-27 16:13 ` Kalle Valo
2014-02-27 14:47 ` [PATCH 4/4] brcmfmac: " David Herrmann
2014-02-27 17:30 ` Arend van Spriel
2014-02-27 15:47 ` [PATCH 0/4] Provide netdev naming-policy via sysfs Tom Gundersen
2014-03-01 14:19 ` Tom Gundersen [this message]
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=CAG-2HqVQRTdA5NvjirR35qLbAkDUB1dN6oAvU2CLs4dnFS42Nw@mail.gmail.com \
--to=teg@jklm.no \
--cc=davem@davemloft.net \
--cc=dh.herrmann@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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).