02/11/2026 12:07, Morten Brørup: > Are there any APIs to tell if a transceiver module is plugged into the > transceiver module socket on the NIC, either in the ethdev library or > under this new transceiver library?
There is no dedicated "module present" API in DPDK today. Module presence is only detected indirectly: rte_eth_dev_get_module_info() and rte_eth_dev_get_module_eeprom() return an error, for example -EIO, when no module is plugged, but only for drivers implementing these operations (ixgbe, i40e, ice, hns3, cnxk, ...). The link state is not a reliable indicator either: a plugged module can be down, and some modules (DAC cables) report link without optical diagnostics. The transceiver library cannot detect presence by design: it works on the raw EEPROM bytes only and has no dependency on any device, driver or even EAL initialization. This is also what makes it usable for kernel ports read with the ethtool ioctls. Physically, module presence is a MOD_ABS pin of the socket, not something that can be read from the EEPROM, so it belongs to the driver level. If an explicit presence API is wanted, I think it should be a separate ethdev device operation, for example .get_module_presence, so drivers could report it without attempting an EEPROM read. That would be a follow-up series, independent of this one. Thanks, Roman

