Re: [PATCH net-next 1/2] net: dsa: make "label" property optional for dsa2

From: Florian Fainelli
Date: Fri Jan 06 2017 - 17:48:02 EST


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