16 #ifndef included_vnet_optics_sfp_h 17 #define included_vnet_optics_sfp_h 21 #define foreach_sfp_id \ 22 _ (UNKNOWN, "unknown") \ 24 _ (ON_MB, "on-motherboard") \ 25 _ (SFP, "SFP/SFP+/SFP28") \ 26 _ (300_PIN_XBI, "300-pin-XBI") \ 27 _ (XENPAK, "XENPAK") \ 33 _ (DWDM_SFP, "DWDM-SFP") \ 35 _ (QSFP_PLUS, "QSFP+") \ 37 _ (SMM_HD_4X, "SMM-HD-4X") \ 38 _ (SMM_HD_8X, "SMM-HD-8X") \ 39 _ (QSFP28, "QSFP28") \ 41 _ (SMM_HD_4X_FAN, "SMM-HD-4X-fanout") \ 42 _ (SMM_HD_8X_FAN, "SMM-HD-8X-fanout") \ 44 _ (MQSFP, "microQSFP") \ 45 _ (QSFP_DD, "QSFP-DD") \ 49 #define _(f,s) SFP_ID_##f, 68 u8 vendor_part_number[16];
69 u8 vendor_revision[2];
71 u8 wavelength_or_att[2];
72 u8 wavelength_tolerance_or_att[2];
78 u8 vendor_serial_number[16];
79 u8 vendor_date_code[8];
82 u8 vendor_specific[32];
86 u8 vendor_specific1[0];
94 for (i = 0; i < 63; i++)
96 return sum == e->cc_base;
100 #define foreach_sfp_compatibility \ 101 _ (0, 0, 40g_active_cable) \ 102 _ (0, 1, 40g_base_lr4) \ 103 _ (0, 2, 40g_base_sr4) \ 104 _ (0, 3, 40g_base_cr4) \ 105 _ (0, 4, 10g_base_sr) \ 106 _ (0, 5, 10g_base_lr) \ 107 _ (0, 5, 10g_base_lrm) \ 109 _ (1, 2, oc48_long_reach) \ 110 _ (1, 1, oc48_intermediate_reach) \ 111 _ (1, 0, oc48_short_reach) \ 112 _ (2, 6, oc12_long_reach) \ 113 _ (2, 5, oc12_intermediate_reach) \ 114 _ (2, 4, oc12_short_reach) \ 115 _ (2, 2, oc3_long_reach) \ 116 _ (2, 1, oc3_intermediate_reach) \ 117 _ (2, 0, oc3_short_reach) \ 118 _ (3, 3, 1g_base_t) \ 119 _ (3, 2, 1g_base_cx) \ 120 _ (3, 1, 1g_base_lx) \ 125 #define _(a,b,f) SFP_COMPATIBILITY_##f,
u8 nominal_bit_rate_100mbits_per_sec
#define foreach_sfp_compatibility
static uword sfp_eeprom_is_valid(sfp_eeprom_t *e)
format_function_t format_sfp_eeprom
u32 sfp_is_comatible(sfp_eeprom_t *e, sfp_compatibility_t c)