Re: [systemd-devel] [RFC] networkd/udev: match on 'ethernet' devices
Hi Tom, >> we can easily update ConnMan to handle DEVTYPE= and DEVTYPE=ethernet. That >> is an easy change and will keep things working. As I explained in the other >> reply, the main reason for DEVTYPE= is to detect that it is a >> network device that needs a management entity before it becomes useful. >> >> You also need to check the ARPHRD_ type of an interface to make sure it is >> actually Ethernet and not just rely on what DEVTYPE= is telling you. We are >> having the case with Bluetooth right now that you get DEVTYPE=bluetooth, but >> one of them is Ethernet emulation via BNEP and the other raw IP via 6loWPAN. > > So the usecase I see for the DEVTYPE is quite different. I'm simply > interested in using it to let the administrator classify devices in an > intuitive and predictable way, so in this case (I think) we actually > do want to use Type=bluetooth for all bluetooth devices, regardless of > the actual protocols they speak. Also, having DEVTYPE=ethernet set by > the kernel becomes quite useful as there is no 'magic' going on, and > the admin can simply read 'udevadm info' to know whether or not a > given device will match. I am all for doing a DEVTYPE=ethernet. It was just not that simple when I introduce DEVTYPE for network interfaces. Maybe things have also changed now. Regards Marcel ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [RFC] networkd/udev: match on 'ethernet' devices
On Sat, Jan 4, 2014 at 3:15 AM, Marcel Holtmann wrote: > we can easily update ConnMan to handle DEVTYPE= and DEVTYPE=ethernet. That is > an easy change and will keep things working. As I explained in the other > reply, the main reason for DEVTYPE= is to detect that it is a > network device that needs a management entity before it becomes useful. > > You also need to check the ARPHRD_ type of an interface to make sure it is > actually Ethernet and not just rely on what DEVTYPE= is telling you. We are > having the case with Bluetooth right now that you get DEVTYPE=bluetooth, but > one of them is Ethernet emulation via BNEP and the other raw IP via 6loWPAN. So the usecase I see for the DEVTYPE is quite different. I'm simply interested in using it to let the administrator classify devices in an intuitive and predictable way, so in this case (I think) we actually do want to use Type=bluetooth for all bluetooth devices, regardless of the actual protocols they speak. Also, having DEVTYPE=ethernet set by the kernel becomes quite useful as there is no 'magic' going on, and the admin can simply read 'udevadm info' to know whether or not a given device will match. Cheers, Tom ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [RFC] networkd/udev: match on 'ethernet' devices
Hi Tom, > 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] Because you have to >>> touch every single driver to get this done properly. >>> [Friday 03 January 2014] [19:58:34] So DEVTYPE= means it >>> is wired Ethernet. >>> [Friday 03 January 2014] [19:58:42] 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. > > If you see a way to make it happen, that'd be great (and I can revert > this patch). we can easily update ConnMan to handle DEVTYPE= and DEVTYPE=ethernet. That is an easy change and will keep things working. As I explained in the other reply, the main reason for DEVTYPE= is to detect that it is a network device that needs a management entity before it becomes useful. You also need to check the ARPHRD_ type of an interface to make sure it is actually Ethernet and not just rely on what DEVTYPE= is telling you. We are having the case with Bluetooth right now that you get DEVTYPE=bluetooth, but one of them is Ethernet emulation via BNEP and the other raw IP via 6loWPAN. Regards Marcel ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [RFC] networkd/udev: match on 'ethernet' devices
On Sat, Jan 4, 2014 at 2:00 AM, Greg KH wrote: > On Sat, Jan 04, 2014 at 01:44:08AM +0100, Tom Gundersen wrote: >> On Sat, Jan 4, 2014 at 1:22 AM, Greg KH 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] Because you have to >> touch every single driver to get this done properly. >> [Friday 03 January 2014] [19:58:34] So DEVTYPE= means it >> is wired Ethernet. >> [Friday 03 January 2014] [19:58:42] 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. If you see a way to make it happen, that'd be great (and I can revert this patch). Cheers, Tom ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [RFC] networkd/udev: match on 'ethernet' devices
Hi Greg, 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] Because you have to >> touch every single driver to get this done properly. >> [Friday 03 January 2014] [19:58:34] So DEVTYPE= means it >> is wired Ethernet. >> [Friday 03 January 2014] [19:58:42] 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 :) when I did the initial DEVTYPE support, it was easy for “wlan” since the subsystem is taking care of creating the netdev. So you have one places for mac80211 drivers and some extra work for the cfg80211 only drivers. It was all minimal work. So was “bluetooth” since it is one central place and same applied to “wimax”. The “wwan” was lucky part since the drivers already did the FLAG_WWAN to pick the wwan%d ifname. For Ethernet cards it was just the wild west. So I left them out of the picture. It is also more important to detect the devices that need extra management handling. Like WiFi, Bluetooth, 3G/LTE etc. The indication of DEVTYPE here is mainly that nobody goes and tries to run DHCP until another management entity tell you the device is ready. For Ethernet or DEVTYPE=“” you do not need to know who manages it since there is nobody. Regards Marcel ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [RFC] networkd/udev: match on 'ethernet' devices
On Sat, Jan 04, 2014 at 01:44:08AM +0100, Tom Gundersen wrote: > On Sat, Jan 4, 2014 at 1:22 AM, Greg KH 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] Because you have to > touch every single driver to get this done properly. > [Friday 03 January 2014] [19:58:34] So DEVTYPE= means it > is wired Ethernet. > [Friday 03 January 2014] [19:58:42] 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 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [RFC] networkd/udev: match on 'ethernet' devices
On Sat, Jan 4, 2014 at 1:22 AM, Greg KH 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] Because you have to touch every single driver to get this done properly. [Friday 03 January 2014] [19:58:34] So DEVTYPE= means it is wired Ethernet. [Friday 03 January 2014] [19:58:42] 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 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [RFC] networkd/udev: match on 'ethernet' devices
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. Not to imply that this patch is not right at all though, it looks good to me. thanks, greg k-h ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel