Hi ONL's,
As part of writing a library for managing SFP modules (SFP and QSFP), I'm using the onlp_sfp_eeprom_read() and sff_eeprom_parse() API's. these API's using the low level API onlp_sfpi_eeprom_read() which should be implemented for each platform.
API's refer the eeprom as 256 first data bytes of module memory.
Should these 256 are be read from module memory and written to eeprom file when device is detected?
Should I implement it in a way that onlp_sfpi_eeprom_read() API will read directly from device memory?
I'm wondering what is the expected and best way for implementation…
Thanks
Hadas
Hi ONL's,
As part of writing a library for managing SFP modules (SFP and QSFP), I'm using the onlp_sfp_eeprom_read() and sff_eeprom_parse() API's. these API's using the low level API onlp_sfpi_eeprom_read() which should be implemented for each platform.
API's refer the eeprom as 256 first data bytes of module memory.
Should these 256 are be read from module memory and written to eeprom file when device is detected?
Should I implement it in a way that onlp_sfpi_eeprom_read() API will read directly from device memory?
I'm wondering what is the expected and best way for implementation…
[Diego] IMHO, the eeprom info from the transceiver is runtime information. No need to save it to a file. You can maintain an array of sff_eeprom_t structures for all your transceivers and refresh it when a transceiver is inserted (onlp_sfpi_eeprom_read() will read it from the transceiver). You have to be careful how you manage that array - you want to avoid providing stale information. For example, you can clear an entry when its transceiver is removed, and/or qualify it with transceiver presence status; set the 'identified' member appropriately when transceiver is inserted,...
Thanks
Hadas