Skip to content

Commit

Permalink
[Cables] Add support for 'Extended Specification Compliance' for QSFP…
Browse files Browse the repository at this point in the history
… cables (#108)

Parse 'Extended Specification Compliance' field from EEPROM and add it to DB, if exist

Signed-off-by: Shlomi Bitton <shlomibi@mellanox.com>
  • Loading branch information
shlomibitton authored and abdosi committed Aug 9, 2020
1 parent 476523d commit d5b0e82
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
57 changes: 57 additions & 0 deletions sonic_platform_base/sonic_sfp/sff8024.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,3 +300,60 @@
'04': '10GBASE-T (Clause 55)',
}

ext_specification_compliance = {
'00': 'Unspecified',
'01': '100G AOC (Active Optical Cable) or 25GAUI C2M AOC',
'02': '100GBASE-SR4 or 25GBASE-SR',
'03': '100GBASE-LR4 or 25GBASE-LR',
'04': '100GBASE-ER4 or 25GBASE-ER',
'05': '100GBASE-SR10',
'06': '100G CWDM4',
'07': '100G PSM4 Parallel SMF',
'08': '100G ACC (Active Copper Cable) or 25GAUI C2M ACC',
'09': 'Obsolete (assigned before 100G CWDM4 MSA required FEC)',
'0b': '100GBASE-CR4, 25GBASE-CR CA-25G-L or 50GBASE-CR2 with RS',
'0c': '25GBASE-CR CA-25G-S or 50GBASE-CR2 with BASE-R',
'0d': '25GBASE-CR CA-25G-N or 50GBASE-CR2 with no FEC',
'10': '40GBASE-ER4',
'11': '4 x 10GBASE-SR',
'12': '40G PSM4 Parallel SMF',
'13': 'G959.1 profile P1I1-2D1 (10709 MBd, 2km, 1310 nm SM)',
'14': 'G959.1 profile P1S1-2D2 (10709 MBd, 40km, 1550 nm SM)',
'15': 'G959.1 profile P1L1-2D2 (10709 MBd, 80km, 1550 nm SM)',
'16': '10GBASE-T with SFI electrical interface',
'17': '100G CLR4',
'18': '100G AOC or 25GAUI C2M AOC',
'19': '100G ACC or 25GAUI C2M ACC',
'1a': '100GE-DWDM2',
'1b': '100G 1550nm WDM',
'1c': '10GBASE-T Short Reach',
'1d': '5GBASE-T',
'1e': '2.5GBASE-T',
'1f': '40G SWDM4',
'20': '100G SWDM4',
'21': '100G PAM4 BiDi',
'22': '4WDM-10 MSA',
'23': '4WDM-20 MSA',
'24': '4WDM-40 MSA',
'25': '100GBASE-DR',
'26': '100G-FR or 100GBASE-FR1',
'27': '100G-LR or 100GBASE-LR1',
'30': 'Active Copper Cable with 50GAUI, 100GAUI-2 or 200GAUI-4 C2M. Providing a worst BER of 10-6 or below',
'31': 'Active Optical Cable with 50GAUI, 100GAUI-2 or 200GAUI-4 C2M. Providing a worst BER of 10-6 or below',
'32': 'Active Copper Cable with 50GAUI, 100GAUI-2 or 200GAUI-4 C2M. Providing a worst BER of 2.6x10-4 for ACC, 10-5 for AUI, or below',
'33': 'Active Optical Cable with 50GAUI, 100GAUI-2 or 200GAUI-4 C2M. Providing a worst BER of 2.6x10-4 for AOC, 10-5 for AUI, or below',
'40': '50GBASE-CR, 100GBASE-CR2, or 200GBASE-CR4',
'41': '50GBASE-SR, 100GBASE-SR2, or 200GBASE-SR4',
'42': '50GBASE-FR or 200GBASE-DR4',
'43': '200GBASE-FR4',
'44': '200G 1550 nm PSM4',
'45': '50GBASE-LR',
'46': '200GBASE-LR4',
'50': '64GFC EA',
'51': '64GFC SW',
'52': '64GFC LW',
'53': '128GFC EA',
'54': '128GFC SW',
'55': '128GFC LW'
}

6 changes: 6 additions & 0 deletions sonic_platform_base/sonic_sfp/sff8436.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from math import log10
from .sff8024 import type_of_transceiver # Dot module supports both Python 2 and Python 3 using explicit relative import methods
from .sff8024 import type_abbrv_name # Dot module supports both Python 2 and Python 3 using explicit relative import methods
from .sff8024 import ext_specification_compliance # Dot module supports both Python 2 and Python 3 using explicit relative import methods
from .sffbase import sffbase # Dot module supports both Python 2 and Python 3 using explicit relative import methods
except ImportError as e:
raise ImportError (str(e) + "- required module not found")
Expand Down Expand Up @@ -372,6 +373,11 @@ class sff8436InterfaceId(sffbase):
{'offset' : 3,
'type' : 'nested',
'decode' : specification_compliance},
'Extended Specification compliance':
{'offset' : 64,
'size':1,
'type' : 'enum',
'decode' : ext_specification_compliance},
'EncodingCodes':
{'offset':11,
'size':1,
Expand Down

0 comments on commit d5b0e82

Please sign in to comment.