Skip to content

Commit 3ff137c

Browse files
authored
[Cables] Add support for 'Extended Specification Compliance' for QSFP cables (sonic-net#108)
Parse 'Extended Specification Compliance' field from EEPROM and add it to DB, if exist Signed-off-by: Shlomi Bitton <[email protected]>
1 parent f988995 commit 3ff137c

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

sonic_platform_base/sonic_sfp/sff8024.py

+57
Original file line numberDiff line numberDiff line change
@@ -300,3 +300,60 @@
300300
'04': '10GBASE-T (Clause 55)',
301301
}
302302

303+
ext_specification_compliance = {
304+
'00': 'Unspecified',
305+
'01': '100G AOC (Active Optical Cable) or 25GAUI C2M AOC',
306+
'02': '100GBASE-SR4 or 25GBASE-SR',
307+
'03': '100GBASE-LR4 or 25GBASE-LR',
308+
'04': '100GBASE-ER4 or 25GBASE-ER',
309+
'05': '100GBASE-SR10',
310+
'06': '100G CWDM4',
311+
'07': '100G PSM4 Parallel SMF',
312+
'08': '100G ACC (Active Copper Cable) or 25GAUI C2M ACC',
313+
'09': 'Obsolete (assigned before 100G CWDM4 MSA required FEC)',
314+
'0b': '100GBASE-CR4, 25GBASE-CR CA-25G-L or 50GBASE-CR2 with RS',
315+
'0c': '25GBASE-CR CA-25G-S or 50GBASE-CR2 with BASE-R',
316+
'0d': '25GBASE-CR CA-25G-N or 50GBASE-CR2 with no FEC',
317+
'10': '40GBASE-ER4',
318+
'11': '4 x 10GBASE-SR',
319+
'12': '40G PSM4 Parallel SMF',
320+
'13': 'G959.1 profile P1I1-2D1 (10709 MBd, 2km, 1310 nm SM)',
321+
'14': 'G959.1 profile P1S1-2D2 (10709 MBd, 40km, 1550 nm SM)',
322+
'15': 'G959.1 profile P1L1-2D2 (10709 MBd, 80km, 1550 nm SM)',
323+
'16': '10GBASE-T with SFI electrical interface',
324+
'17': '100G CLR4',
325+
'18': '100G AOC or 25GAUI C2M AOC',
326+
'19': '100G ACC or 25GAUI C2M ACC',
327+
'1a': '100GE-DWDM2',
328+
'1b': '100G 1550nm WDM',
329+
'1c': '10GBASE-T Short Reach',
330+
'1d': '5GBASE-T',
331+
'1e': '2.5GBASE-T',
332+
'1f': '40G SWDM4',
333+
'20': '100G SWDM4',
334+
'21': '100G PAM4 BiDi',
335+
'22': '4WDM-10 MSA',
336+
'23': '4WDM-20 MSA',
337+
'24': '4WDM-40 MSA',
338+
'25': '100GBASE-DR',
339+
'26': '100G-FR or 100GBASE-FR1',
340+
'27': '100G-LR or 100GBASE-LR1',
341+
'30': 'Active Copper Cable with 50GAUI, 100GAUI-2 or 200GAUI-4 C2M. Providing a worst BER of 10-6 or below',
342+
'31': 'Active Optical Cable with 50GAUI, 100GAUI-2 or 200GAUI-4 C2M. Providing a worst BER of 10-6 or below',
343+
'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',
344+
'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',
345+
'40': '50GBASE-CR, 100GBASE-CR2, or 200GBASE-CR4',
346+
'41': '50GBASE-SR, 100GBASE-SR2, or 200GBASE-SR4',
347+
'42': '50GBASE-FR or 200GBASE-DR4',
348+
'43': '200GBASE-FR4',
349+
'44': '200G 1550 nm PSM4',
350+
'45': '50GBASE-LR',
351+
'46': '200GBASE-LR4',
352+
'50': '64GFC EA',
353+
'51': '64GFC SW',
354+
'52': '64GFC LW',
355+
'53': '128GFC EA',
356+
'54': '128GFC SW',
357+
'55': '128GFC LW'
358+
}
359+

sonic_platform_base/sonic_sfp/sff8436.py

+6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from math import log10
1818
from .sff8024 import type_of_transceiver # Dot module supports both Python 2 and Python 3 using explicit relative import methods
1919
from .sff8024 import type_abbrv_name # Dot module supports both Python 2 and Python 3 using explicit relative import methods
20+
from .sff8024 import ext_specification_compliance # Dot module supports both Python 2 and Python 3 using explicit relative import methods
2021
from .sffbase import sffbase # Dot module supports both Python 2 and Python 3 using explicit relative import methods
2122
except ImportError as e:
2223
raise ImportError (str(e) + "- required module not found")
@@ -372,6 +373,11 @@ class sff8436InterfaceId(sffbase):
372373
{'offset' : 3,
373374
'type' : 'nested',
374375
'decode' : specification_compliance},
376+
'Extended Specification compliance':
377+
{'offset' : 64,
378+
'size':1,
379+
'type' : 'enum',
380+
'decode' : ext_specification_compliance},
375381
'EncodingCodes':
376382
{'offset':11,
377383
'size':1,

0 commit comments

Comments
 (0)