Some SFP+ modules exports diagnostics.
On Linux this can be retrieved by the "ethtool -m|--dump-module-eeprom|--module-info" command (see Re: Optics (SFP) monitoring on ixgbe and igbe — Linux Network Development).
The mlx4 driver implements this (see linux/port.c at 2a500090a4ea2ccd713f3c782a2fb27681bd6e67 · torvalds/linux · GitHub ), but for me this fails with the message
mlx4_core 0000:01:00.0: MLX4_CMD_MAD_IFC Get Module info attr(ff60) port(1) i2c_addr(50) offset(0) size(2): Response Mad Status(21c) - operation not supported for this port (the port is of type CX4 or internal)
Is it possible to get DOM info with ConnectX-2 or does this need ConnectX-3?