Hello, On 01/06/2017 11:47 PM, Florian Fainelli wrote: > On 01/06/2017 02:20 PM, Andrew Lunn wrote: >>> If one wants to rename an interface, udev rules can be used as usual. >> >> Hi Vivien >> >> Do you have some examples? >> >> A quick look at udevadm info suggests we can use >> >> ATTR{phys_port_id} and ATTR{phys_switch_id} >> >> Humm, it would be nice to know why the second switch has a >> phys_switch_id of 01000000. > > Well, that's a combination of being on a little endian system and using > %*phN as a printk formatter, and the type being 32-bit long (int). I > agree this does not feel natural, but since this is sysfs (so ABI in a > way), it's going to be though to change now.
for most subsystems I know the internally used (and more or less automatically determined) numbers are not to be considered stable. For example the GPIO made it possible to let userspace work with GPIOs without knowing (or having to determine) the gpio numbers. I don't know if/how this applies here. Best regards Uwe
signature.asc
Description: OpenPGP digital signature