16 #ifndef included_vnet_optics_sfp_h 17 #define included_vnet_optics_sfp_h 21 #define foreach_sfp_id \ 29 #define _(f) SFP_ID_##f, 48 u8 vendor_part_number[16];
49 u8 vendor_revision[4];
51 u8 laser_wavelength_in_nm[2];
58 u8 vendor_serial_number[16];
59 u8 vendor_date_code[8];
62 u8 vendor_specific[32];
66 u8 vendor_specific1[0];
74 for (i = 0; i < 63; i++)
80 #define foreach_sfp_compatibility \ 81 _ (0, 4, 10g_base_sr) \ 82 _ (0, 5, 10g_base_lr) \ 83 _ (1, 2, oc48_long_reach) \ 84 _ (1, 1, oc48_intermediate_reach) \ 85 _ (1, 0, oc48_short_reach) \ 86 _ (2, 6, oc12_long_reach) \ 87 _ (2, 5, oc12_intermediate_reach) \ 88 _ (2, 4, oc12_short_reach) \ 89 _ (2, 2, oc3_long_reach) \ 90 _ (2, 1, oc3_intermediate_reach) \ 91 _ (2, 0, oc3_short_reach) \ 93 _ (3, 2, 1g_base_cx) \ 94 _ (3, 1, 1g_base_lx) \ 99 #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)
u8 min_bit_rate_margin_percent
format_function_t format_sfp_eeprom
u8 max_bit_rate_margin_percent
u32 sfp_is_comatible(sfp_eeprom_t *e, sfp_compatibility_t c)