[systemd-devel] [RFC] networkd/udev: match on 'ethernet' devices
Tom Gundersen
teg at jklm.no
Fri Jan 3 16:44:08 PST 2014
On Sat, Jan 4, 2014 at 1:22 AM, Greg KH <gregkh at linuxfoundation.org> wrote:
> On Fri, Jan 03, 2014 at 08:54:17PM +0100, Tom Gundersen wrote:
>> Hi,
>>
>> I just pushed a change[0] which allows the match syntax
>> "Type=ethernet" to match on network devices without a DEVTYPE.
>>
>> We had a discussion on IRC whether we should call it Type=wired or
>> Type=ethernet. I think the former may be more intuitive, but the
>> latter seems to be more in line with what is done elsewhere (connman
>> calls it ethernet, and udev prefixes the devices names with 'en').
>>
>> Any thoughts?
>
> Any reason why the kernel can't be setting this value in the first place
> so you don't have to rely on it being "null"?
>
> Seems like a kernel issue.
I asked Marcel the same thing earlier. He said:
[Friday 03 January 2014] [19:58:22] <holtmann> Because you have to
touch every single driver to get this done properly.
[Friday 03 January 2014] [19:58:34] <holtmann> So DEVTYPE= means it
is wired Ethernet.
[Friday 03 January 2014] [19:58:42] <holtmann> If that is not true,
then that is a bug.
>From my point of view, I'd prefer the kernel just doing the right
thing (and I'd be happy to write the patches), but my impression was
that that's not going to happen...(?)
Also, if we start setting DEVTYPE=ethernet in the kernel, I guess apps
(such as connman) that relies on DEVTYPE=(null) to detect ethernet
devices will break.
> Not to imply that this patch is not right at all though, it looks good
> to me.
Cool. It is intentionally kept so that it will keep working in case
the kernel starts setting DEVTYPE=ethernet (as long as we agree on the
same name, that is).
Cheers,
Tom
More information about the systemd-devel
mailing list