[systemd-devel] [RFC] networkd/udev: match on 'ethernet' devices

Greg KH gregkh at linuxfoundation.org
Fri Jan 3 17:00:07 PST 2014


On Sat, Jan 04, 2014 at 01:44:08AM +0100, Tom Gundersen wrote:
> 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...(?)

It shouldn't need to be set for every driver, wireless doesn't work this
way, so there is lots of precident for how to do this in only a few
lines of kernel code :)

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

Ah, that's a different problem, we can't break userspace.

Ugh, well, if you want me to try to make this change, I will.

thanks,

greg k-h


More information about the systemd-devel mailing list