sonic-buildimage/device
Sudharsan Dhamal Gopalarathnam 545b526a49
[202012][mellanox]Fix lpmode set when logical port is larger than 64 (#14137)
This PR is to backport #14138 to 202012.

- Why I did it
In sfplpm API, the number of logical ports is hardcoded as 64. When a system contains more port than this, the SDK APIs would fail with a trace as below

Enabling low-power mode for port Ethernet0... Traceback (most recent call last):
File "/usr/share/sonic/platform/plugins/sfplpmset.py", line 167, in
set_lpmode(handle, cmd, sfp_module)
File "/usr/share/sonic/platform/plugins/sfplpmset.py", line 128, in set_lpmode
SX_MGMT_PHY_MOD_PWR_ATTR_PWR_MODE_E, SX_MGMT_PHY_MOD_PWR_MODE_LOW_E)
File "/usr/share/sonic/platform/plugins/sfplpmset.py", line 115, in pwr_attr_set
mgmt_phy_mod_pwr_attr_set(handle, module_id, attr_type, power_mode)
File "/usr/share/sonic/platform/plugins/sfplpmset.py", line 84, in mgmt_phy_mod_pwr_attr_set
assert SX_STATUS_SUCCESS == rc, "sx_mgmt_phy_mod_pwr_attr_set failed"
AssertionError: sx_mgmt_phy_mod_pwr_attr_set failed
Error! Unable to set LPM for 1, rc = 1, err msg: [+] opening sdk
Mar 07 03:25:28 INFO LOG: Initializing SX log with STDOUT as output file.
Mar 07 03:25:28 ERROR SX_API_PORT: sx_mgmt_phy_mod_pwr_attr_get: This API is deprecated and will be removed in the future. Please use sx_mgmt_phy_module_pwr_attr_get in its place.
Mar 07 03:25:28 ERROR SX_API_PORT: sx_mgmt_phy_mod_pwr_attr_set: This API is deprecated and will be removed in the future. Please use sx_mgmt_phy_module_pwr_attr_set in its place.

- How I did it
Remove the hardcoded value of 64. Obtained the number of logical ports from SDK

- How to verify it
Manual testing
2023-03-09 00:04:09 +02:00
..
accton [202012][BRCM TH3] Add SOC properties to prevent FDB events during warmboot (#9761) 2022-01-14 14:44:43 -08:00
alphanetworks [sonic-utilities] Update submodule; Build and install as a Python 3 wheel (#5926) 2020-11-25 10:28:36 -08:00
arista Fix content of platform.json for DCS-7050CX3-32S (#13659) 2023-02-08 12:01:07 -08:00
barefoot updated platform info for device x86_64-accton_wedge100bf_32x-r0 (#8918) 2021-10-12 14:16:27 -07:00
broadcom/x86_64-bcm_xlr-r0 [202012] Disable ALPM distributed hitbit thread that is used for debug purpose only but interfered with Other functional operations (#9190) 2021-11-08 11:50:44 -08:00
celestica [Seastone] fix dx010 qsfp eeprom data write issue (#13930) 2023-03-02 20:06:09 +00:00
centec [sonic-utilities] Update submodule; Build and install as a Python 3 wheel (#5926) 2020-11-25 10:28:36 -08:00
cig [sonic-utilities] Update submodule; Build and install as a Python 3 wheel (#5926) 2020-11-25 10:28:36 -08:00
common Update ECN settings for storage backend (#12855) 2023-01-10 23:52:39 +00:00
dell [202012] [Profile separation] MMU infrastructure update for TD2 (#12739) 2022-11-29 12:53:58 -08:00
delta [202012][BRCM TH3] Add SOC properties to prevent FDB events during warmboot (#9761) 2022-01-14 14:44:43 -08:00
facebook/x86_64-facebook_wedge100-r0 In SAI 3.5 by default we are supporting 256 Group with 64 Memeber each. (#5400) 2020-09-22 11:21:12 -07:00
ingrasys [sonic-utilities] Update submodule; Build and install as a Python 3 wheel (#5926) 2020-11-25 10:28:36 -08:00
inventec [BCM Config] Update TD3 bcm.config files to use ISSU capable premium CANCUN 6.4.1 (#6651) 2021-02-05 16:11:59 -08:00
juniper [platform] Update QSFP method name 'parse_qsfp_dom_capability' -> 'parse_dom_capability' (#6695) 2021-02-05 15:48:30 -08:00
marvell [sonic-utilities] Update submodule; Build and install as a Python 3 wheel (#5926) 2020-11-25 10:28:36 -08:00
mellanox [202012][mellanox]Fix lpmode set when logical port is larger than 64 (#14137) 2023-03-09 00:04:09 +02:00
mitac/x86_64-mitac_ly1200_b32h0_c3-r0 [sonic-utilities] Update submodule; Build and install as a Python 3 wheel (#5926) 2020-11-25 10:28:36 -08:00
nokia/armhf-nokia_ixs7215_52x-r0 [Nokia ixs7215] change var/log size to 4GB (#11122) 2022-06-14 09:02:14 -07:00
pegatron/x86_64-pegatron_porsche-r0 [sonic-utilities] Update submodule; Build and install as a Python 3 wheel (#5926) 2020-11-25 10:28:36 -08:00
quanta [202012][BRCM TH3] Add SOC properties to prevent FDB events during warmboot (#9761) 2022-01-14 14:44:43 -08:00
virtual/x86_64-kvm_x86_64-r0 fix build error (#9902) 2022-02-03 08:52:29 +05:30
wnc/x86_64-wnc_osw1800-r0 [sonic-utilities] Update submodule; Build and install as a Python 3 wheel (#5926) 2020-11-25 10:28:36 -08:00