From 995bd09486818cd906604504f8ec839376253ac3 Mon Sep 17 00:00:00 2001 From: shlomibitton <60430976+shlomibitton@users.noreply.github.com> Date: Fri, 7 Aug 2020 00:16:59 +0300 Subject: [PATCH] Add support for 'Extended Specification Compliance' for QSFP cables parser (#5096) Signed-off-by: Shlomi Bitton --- platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py b/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py index 67d8b6331a..f9d19c5ad1 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py @@ -30,7 +30,7 @@ except ImportError as e: # definitions of the offset and width for values in XCVR info eeprom XCVR_INTFACE_BULK_OFFSET = 0 -XCVR_INTFACE_BULK_WIDTH_QSFP = 20 +XCVR_INTFACE_BULK_WIDTH_QSFP = 65 XCVR_INTFACE_BULK_WIDTH_SFP = 21 XCVR_TYPE_OFFSET = 0 XCVR_TYPE_WIDTH = 1 @@ -827,6 +827,8 @@ class SFP(SfpBase): for key in qsfp_compliance_code_tup: if key in sfp_interface_bulk_data['data']['Specification compliance']['value']: compliance_code_dict[key] = sfp_interface_bulk_data['data']['Specification compliance']['value'][key]['value'] + if sfp_interface_bulk_data['data']['Extended Specification compliance']['value'] != "Unspecified": + compliance_code_dict['Extended Specification compliance'] = sfp_interface_bulk_data['data']['Extended Specification compliance']['value'] transceiver_info_dict['specification_compliance'] = str(compliance_code_dict) transceiver_info_dict['nominal_bit_rate'] = str(sfp_interface_bulk_data['data']['Nominal Bit Rate(100Mbs)']['value'])