Skip to content

Commit b20b2dd

Browse files
authored
Merge pull request sonic-net#572 from r12f/code-sync-202412
[202412] Code sync sonic-net/sonic-buildimage:202411 => 202412
2 parents 13dc12d + b7d9326 commit b20b2dd

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_5640.xml
2+
SAI_KEY_SPC5_LOSSY_SCHEDULING=1
3+
SAI_DEFAULT_SWITCHING_MODE_STORE_FORWARD=1
4+

platform/mellanox/mft.mk

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
#
1818
# Mellanox SAI
1919

20-
MFT_VERSION = 4.30.0
21-
MFT_REVISION = 136
20+
MFT_VERSION = 4.30.2
21+
MFT_REVISION = 23
2222

2323
MLNX_MFT_INTERNAL_SOURCE_BASE_URL =
2424

platform/mellanox/mlnx-platform-api/sonic_platform/platform.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,15 @@
2323

2424
try:
2525
from sonic_platform_base.platform_base import PlatformBase
26-
from .chassis import Chassis, ModularChassis, SmartSwitchChassis
26+
from .chassis import Chassis, ModularChassis
2727
from .device_data import DeviceDataManager
2828
except ImportError as e:
2929
raise ImportError(str(e) + "- required module not found")
3030

3131
class Platform(PlatformBase):
3232
def __init__(self):
3333
PlatformBase.__init__(self)
34-
if DeviceDataManager.get_dpu_count():
35-
self._chassis = SmartSwitchChassis()
36-
elif DeviceDataManager.get_linecard_count() == 0:
34+
if DeviceDataManager.get_linecard_count() == 0:
3735
self._chassis = Chassis()
3836
else:
3937
self._chassis = ModularChassis()

platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ def get_error_info_from_sdk_error_type(self):
359359
Returns:
360360
tuple: (error state, error description)
361361
"""
362-
error_type = utils.read_int_from_file(f'/sys/module/sx_core/asic0/module{self.sdk_index}/temperature/statuserror', default=-1)
362+
error_type = utils.read_int_from_file(f'/sys/module/sx_core/asic0/module{self.sdk_index}/statuserror', default=-1)
363363
sfp_state_bits = NvidiaSFPCommon.SDK_ERRORS_TO_ERROR_BITS.get(error_type)
364364
if sfp_state_bits is None:
365365
logger.log_error(f"Unrecognized error {error_type} detected on SFP {self.sdk_index}")
@@ -678,7 +678,9 @@ def get_error_description(self):
678678
if self.is_sw_control():
679679
api = self.get_xcvr_api()
680680
return api.get_error_description() if api else None
681-
except:
681+
except NotImplementedError:
682+
return 'Not supported'
683+
except Exception:
682684
return self.SFP_STATUS_INITIALIZING
683685

684686
oper_status, error_code = self._get_module_info(self.sdk_index)

platform/mellanox/mlnx-platform-api/tests/test_sfp.py

+4
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ def test_sfp_get_error_status(self, mock_get_error_code, mock_control):
9494
mock_control.side_effect = RuntimeError('')
9595
description = sfp.get_error_description()
9696
assert description == 'Initializing'
97+
98+
mock_control.side_effect = NotImplementedError('')
99+
description = sfp.get_error_description()
100+
assert description == 'Not supported'
97101

98102
@mock.patch('sonic_platform.sfp.SFP._get_page_and_page_offset')
99103
@mock.patch('sonic_platform.sfp.SFP._is_write_protected')

0 commit comments

Comments
 (0)