On Fri, Jul 17, 2020 at 08:58:26AM -0700, Tim Harvey wrote:
> Greetings,
> 
> We make embedded boards that often have on-board PCIe based NIC's that
> have MAC addresses stored in an EEPROM (not within NIC's NVRAM). I've
> struggled with a way to have boot firmware assign the mac's via
> device-tree and I find that only some drivers support getting the MAC
> from device-tree anyway.
> 
> What is the appropriate way to assign vendor MAC's to a NIC from boot
> firmware, or even in userspace?

Hi Tim

>From user space you can always use

ip link set address XX:XX:XX:XX:XX:XX dev enp42s0

But that assumes the MAC driver actually supports setting its MAC
address. As with getting the MAC address from DT, this is also
optional in the driver. But i guess it is more often implemented.

I don't know of any universal method. So i think you probably do need
to work on each of the MAC drivers you are interested in, and add DT
support.

        Andrew

Reply via email to