Re: [PATCH net] net: fman: Use physical address for userspace interfaces
From: Andrew Lunn
Date: Wed Oct 19 2022 - 09:06:42 EST
> > root@localhost:~# grep 1ae /etc/udev/rules.d/72-fsl-dpaa-persistent-networking.rules
> > SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="1ae0000", NAME="fm1-mac1"
> > SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="1ae2000", NAME="fm1-mac2"
> > SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="1ae4000", NAME="fm1-mac3"
> > SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="1ae6000", NAME="fm1-mac4"
> > SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="1ae8000", NAME="fm1-mac5"
> > SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="1aea000", NAME="fm1-mac6"
>
> So you rely on the physical address.
> It's a pity this uses a custom sysfs file.
> Can't you obtain this information some other way?
> Anyway, as this is in use, it became part of the ABI.
I agree about the ABI thing. Please add this to the commit messages as
a justification.
It would also be good to move user space away from this. You should be
able to use the port id in the place of the physical address. That is
what is used by Ethernet switches etc, in the udev rules for giving
switch ports names.
Andrew