Skip to content

KNET: expose SFP info in tracked netifs - #4

Open
KanjiMonster wants to merge 1 commit into
bisdn/mainfrom
jogo_sfp_eeprom
Open

KNET: expose SFP info in tracked netifs#4
KanjiMonster wants to merge 1 commit into
bisdn/mainfrom
jogo_sfp_eeprom

Conversation

@KanjiMonster

@KanjiMonster KanjiMonster commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Add support for exposing SFP module info in KNET tracked interfaces. The EEPROM's content is accessed via a nvmem device created by the optoe driver, while SFP signals are provided by userspace for now.

The EEPROM layout follows ONL's optoe's driver's layout, i.e.:

  • for SFP modules, 0-255 is EEPROM at address 0x50 / 0xa0, 256-511 is 0x51 / 0xa2
  • for QSFP modules, 0-127 is lower page 0, 128-255 is upper page 0, 256-383 is upper page 1 etc.

Expose the type of SFP module via the port field to user space. In the future we can use this to dynamically configure the hardware based on the inserted module.

Code for parsing the SFP EEPROM is taken from the kernel.

Depends on bisdn/meta-open-network-linux#237 for accessing the EEPROM.

Add support for exposing SFP module info in KNET tracked interfaces. The
EEPROM's content is accessed via a nvmem device created by the optoe
driver, while SFP signals are provided by userspace for now.

The EEPROM layout follows ONL's optoe's driver's layout, i.e.:

- for SFP modules, 0-255 is EEPROM at address 0x50 / 0xa0, 256-511 is
  0x51 / 0xa2
- for QSFP modules, 0-127 is lower page 0, 128-255 is upper page 0,
  256-383 is upper page 1 etc.

Expose the type of SFP module via the port field to user space. In the
future we can use this to dynamically configure the hardware based on
the inserted module.

Code for parsing the SFP EEPROM is taken from the kernel.

Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de>
@KanjiMonster
KanjiMonster requested a review from rubensfig July 16, 2026 12:03
@KanjiMonster
KanjiMonster marked this pull request as ready for review July 16, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant