From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthias Schwarzott Date: Fri, 13 Apr 2007 20:08:19 +0000 Subject: Re: Excluding some device types from persistent-net (xen, s390) Message-Id: <200704132208.19301.zzam@gentoo.org> List-Id: References: <200704120944.10520.zzam@gentoo.org> In-Reply-To: <200704120944.10520.zzam@gentoo.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org On Donnerstag, 12. April 2007, Matthias Schwarzott wrote: > Hi there! > > I have a change to persistent-net behaviour, to exclude xen-devices, and > s390-devices. > I thought even more about the persistent-net framework. The problems appear in two different cases: 1. Random MAC addresses (as we for now only use by-mac as method) This will lead to increasing numbers for the device after each reboot with = different mac. 2. Devices that are ignored and does not add persistent-rules. This leads to errors as soon as on a system there are devices which we try = to=20 get persistent, and devices which we ignore (with the same prefix, e.g.=20 eth*). As udev cannot rename the device as soon as the dest name is already occupi= ed. (ignored devices being eth1, and udev trying to rename eth2 to eth1 will le= ad=20 to eth?_rename devices ...) Possible solutions for different devices (restricting me to eth, will add n= ew=20 mail about wifi stuff): xen-devices:=20 # udevinfo -a -p /sys/class/net/eth0 =20 looking at device '/class/net/eth0': KERNEL=3D"eth0" SUBSYSTEM=3D"net" DRIVER=3D"" ATTR{weight}=3D"64" ATTR{tx_queue_len}=3D"1000" ATTR{flags}=3D"0x1003" ATTR{mtu}=3D"1500" ATTR{carrier}=3D"1" ATTR{broadcast}=3D"ff:ff:ff:ff:ff:ff" ATTR{address}=3D"00:16:3e:08:25:1d" =20 looking at parent device '/devices/xen/vif-0': KERNELS=3D"vif-0" SUBSYSTEMS=3D"xen" DRIVERS=3D"vif" ATTRS{devtype}=3D"vif" ATTRS{nodename}=3D"device/vif/0" =20 looking at parent device '/devices/xen': KERNELS=3D"xen" SUBSYSTEMS=3D"" DRIVERS=3D"" Perhaps the KERNEL(S) attribute of the parent device can be used for=20 persistence (even though I don't know how the rule should look like) but=20 perhaps just KERNELS=3D"vif-0" will work. As I think the number refers to t= he=20 (n+1)-th network interface declared in xen-conf for this domain. And that=20 should be constant, even if mac changes. Better solutions for xen-devices? s390: For s390 I don't know the facts, please others discuss if there is=20 something special necessary or not. eth1394: Some users seem to have problems with eth1394, but the people I as= ked=20 seem to have no problems with it (seem to have macs set and constant). See this thread: "Problems with udev > 106 and multiple network cards" Perhaps if just one device of this type appears we can persist it with=20 ATTR{type}=3D"24" in case no mac exists, ugly :( Matthias --=20 Matthias Schwarzott (zzam) ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=DEVD= EV _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel