support for programming MAC address through the corundum device driver

71 views
Skip to first unread message

Sameh Asaad

unread,
Apr 23, 2021, 6:53:59 PM4/23/21
to corundum-nic
Greetings,

My understanding is that the MAC address is read from the I2C eeprom on the board, and if this fails, a randomly generated MAC address is used. There is also a recipe for accessing the I2C eeprom through Linux to (re-) program the MAC address. Is there any provision for programming the MAC address through the mqnic device driver itself? if not, are you planning to support this feature?

Thank you.
--Sameh

Alex Forencich

unread,
Apr 23, 2021, 7:59:38 PM4/23/21
to corund...@googlegroups.com

It's not currently supported, but presumably it would not be hard to do that.  The main consideration is if there is an existing API, perhaps an ethtool API or something, that can simply be implemented in the driver.  A custom API (ioctl or something) is also possible, but this would then also need a custom userspace tool to interface with, etc. 

Looks like one reasonable option could be to implement the ethtool get_eeprom and set_eeprom APIs, which would enable read/write access to the EEPROM where the MAC addresses are stored using the ethtool utility.  Obviously this would only work for cards that have an FPGA-accessable EEPROM, so this wouldn't let you change Alveo card MAC addresses for example.  I think this would be a pretty straightforward change, so I'll add it to my to-do list.  

https://github.com/corundum/corundum/issues/54

Alex Forencich
--
You received this message because you are subscribed to the Google Groups "corundum-nic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to corundum-nic...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/corundum-nic/184cac9c-028c-44f5-9444-6c4273d24510n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages