Skip to content

Commit

Permalink
[Mellanox] Use softlink for sfputils on MSN4410 platform (#7092)
Browse files Browse the repository at this point in the history
The file device/mellanox/x86_64-mlnx_msn4410-r0/plugins/sfputil.py is not a software link for device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py. And it is still using python2 syntex which causes some SFP CLI error. The PR is to change it to a softlink and add 4410 support in device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py.
  • Loading branch information
Junchao-Mellanox authored and daall committed Mar 31, 2021
1 parent 53ff05f commit 5e5b69c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 661 deletions.
9 changes: 3 additions & 6 deletions device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#

try:
import time
import subprocess
from sonic_sfp.sfputilbase import *
import syslog
Expand Down Expand Up @@ -44,7 +43,8 @@
platform_dict = {'x86_64-mlnx_msn2700-r0': 0, 'x86_64-mlnx_msn2740-r0': 0, 'x86_64-mlnx_msn2100-r0': 1,
'x86_64-mlnx_msn2410-r0': 2, 'x86_64-mlnx_msn2010-r0': 3, 'x86_64-mlnx_msn3420-r0': 5,
'x86_64-mlnx_msn3700-r0': 0, 'x86_64-mlnx_msn3700c-r0': 0, 'x86_64-mlnx_msn3800-r0': 4,
'x86_64-mlnx_msn4600-r0': 4, 'x86_64-mlnx_msn4600c': 4, 'x86_64-mlnx_msn4700-r0': 0}
'x86_64-mlnx_msn4410-r0': 0, 'x86_64-mlnx_msn4600-r0': 4, 'x86_64-mlnx_msn4600c': 4,
'x86_64-mlnx_msn4700-r0': 0}
port_position_tuple_list = [(0, 0, 31, 32, 1), (0, 0, 15, 16, 1), (0, 48, 55, 56, 1),
(0, 18, 21, 22, 1), (0, 0, 63, 64, 1), (0, 48, 59, 60, 1)]

Expand Down Expand Up @@ -187,8 +187,7 @@ def reset(self, port_num):
print("Error! Unable to set LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output))
return False

return False


def get_transceiver_change_event(self, timeout=0):
phy_port_dict = {}
status = True
Expand Down Expand Up @@ -352,7 +351,6 @@ def get_transceiver_info_dict(self, port_num):
if port_num in self.qsfp_ports:
offset = 128
vendor_rev_width = XCVR_HW_REV_WIDTH_QSFP
cable_length_width = XCVR_CABLE_LENGTH_WIDTH_QSFP
interface_info_bulk_width = XCVR_INTFACE_BULK_WIDTH_QSFP
sfp_type = 'QSFP'

Expand All @@ -364,7 +362,6 @@ def get_transceiver_info_dict(self, port_num):
else:
offset = 0
vendor_rev_width = XCVR_HW_REV_WIDTH_SFP
cable_length_width = XCVR_CABLE_LENGTH_WIDTH_SFP
interface_info_bulk_width = XCVR_INTFACE_BULK_WIDTH_SFP
sfp_type = 'SFP'

Expand Down
Loading

0 comments on commit 5e5b69c

Please sign in to comment.