-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added LPM and reset support to sfputil for MLNX msn2700 platform [NOT FOR master] #10
Conversation
# Get low power mode status | ||
lpm_mask = 1 << 8 | ||
lpm_status = (lpm_mask & mcion.module_status_bits) != 0 | ||
print "LMP ON" if lpm_status else "LPM OFF" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LMP ON
appears to be a typo. Should be LPM ON
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The typo is fixed.
print "Failed to initializing register access.\nPlease check that SDK is running." | ||
sys.exit(errno.EACCES); | ||
|
||
# Get SFP module and log ports number and LMP status |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LMP
should be LPM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The typo is fixed. The typo is fixed.
print "Failed to initializing register access.\nPlease check that SDK is running." | ||
sys.exit(errno.EACCES) | ||
|
||
# Get SFP module number and LMP status |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LMP
should be LPM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The typo is fixed.
|
||
try: | ||
output = subprocess.check_output(lpm_cmd, shell=True) | ||
if 'LMP ON' in output: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LMP ON
should be LPM ON
(see my review comment on sfplpmget.py above).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The typo is fixed.
if 'LMP ON' in output: | ||
return True | ||
except subprocess.CalledProcessError as e: | ||
print "Error! Unable to get LMP for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LMP
should be LPM
subprocess.check_output(lpm_cmd, shell=True) | ||
return True | ||
except subprocess.CalledProcessError as e: | ||
print "Error! Unable to set LMP for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LMP
should be LPM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The typo is fixed.
subprocess.check_output(lpm_cmd, shell=True) | ||
return True | ||
except subprocess.CalledProcessError as e: | ||
print "Error! Unable to set LMP for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LMP
should be LPM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The typo is fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The typo is fixed.
d9b2919
to
4224456
Compare
It can be merged after #13 |
New issue with LPM setting is found. Don't merge this PR without trigger. |
3c84ea6
to
969330a
Compare
c205fa0
to
1321427
Compare
44a7d97
to
630d636
Compare
… FOR master] (#10) * Added LPM and reset support to sfputil for MLNX msn2700 platform * added LPM and reset for all MLNX platforms * [sfputil] Move disabling SFP port before LPM set on a SONiC layer
… FOR master] (#10) * Added LPM and reset support to sfputil for MLNX msn2700 platform * added LPM and reset for all MLNX platforms * [sfputil] Move disabling SFP port before LPM set on a SONiC layer
… FOR master] (#10) * Added LPM and reset support to sfputil for MLNX msn2700 platform * added LPM and reset for all MLNX platforms * [sfputil] Move disabling SFP port before LPM set on a SONiC layer
… FOR master] (#10) * Added LPM and reset support to sfputil for MLNX msn2700 platform * added LPM and reset for all MLNX platforms * [sfputil] Move disabling SFP port before LPM set on a SONiC layer
… FOR master] (#10) * Added LPM and reset support to sfputil for MLNX msn2700 platform * added LPM and reset for all MLNX platforms * [sfputil] Move disabling SFP port before LPM set on a SONiC layer
…onic-net#1796) * Initial commit * Add Ingrasys S9180-32X platform dirver. Signed-off-by: Wade He <[email protected]> * Add bfn.service for init barefoot. Signed-off-by: Wade He <[email protected]> * [Barefoot Beta] Add some functions and fixed some bugs. 1. Update sensors.conf. 2. Fixed IO expander init. 3. Fixed PSU EEPROM. 4. Fixed MB EEPROM. 5. Add fancontrol and fan init. 6. Add SYS LED control (sys, fan, fan tray). 7. 2.5V compute and setup max and min. 8. Fixed typo MB eeprom delete address. 9. Remove coretemp to BMC. 10. Add active CPLD. 11. Modify SFP+ GPIO slave address. 12. Modify tmp75 Near Port 32 slave address. Signed-off-by: Wade He <[email protected]> * Add bfn script in /etc/init.d/ Signed-off-by: Wade He <[email protected]> * Add bfn service in debian Signed-off-by: Wade He <[email protected]> * Fixed CPLD switch LED behavior. Signed-off-by: Wade He <[email protected]> * [Barefoot Beta] Fixed sensors and hwmon order. 1. Fixed ignore sensors Vbat. 2. Reorg hwmon order. Signed-off-by: Wade He <[email protected]> * Fixed PSU1 and PSU2 EEPROM order. Signed-off-by: Wade He <[email protected]> * initial barefoot checkin october 2017 * update refpoint * update refpoints * update refpoints to bf-master * update refpoint * update refpoint to tested version * change to platform from asic * update refpoint for swss * revert core creation setting * update refpoints * add telnet for debug shell * update refpoints 11/17/17 * missed change in file on previous merge * [CPLD] Fixed blink LED issue. * Fixed blink LED mask set error. Signed-off-by: Wade He <[email protected]> * Update bf_kdrv.c for 6.0.2.39 * Update bf kernel driver * Add bf_fun kernel module. * Update bf_tun for fixed build error * merge with Azure master (12/12/17) * update swss refpoint * update refpoint of swss * library dependency for stack unroll * update refpoint to bf-master * [DHCP relay]: Fix circuit ID and remote ID bugs (sonic-net#1248) * [DHCP relay]: Fix circuit ID and remote ID bugs * Set circuit_id_len after setting circuit_id_len to ip->name * [Platform] Add Psuutil and update sensors.conf for S9100-32X, S8810-32Q and S9200-64X (sonic-net#1272) * Add I2C CPLD kernel module for psuutil. * Support psuutil script. * Add voltage min and max threshold. * Update sensors.conf for tmp75. Signed-off-by: Wade He <[email protected]> * Allow multi platform support - infra (more changes to follow) * update relative path to include platform for clarity * [Platform] Add Ingrasys S9130-32X and S9230-64X with Nephos Switch ASIC for "branch 201712" (sonic-net#1274) - What I did Add switch ASIC vendor: Nephos Add Nephos platforms: Ingrasys S9130-32X, Ingrasys S9230-64X - How I did it Add platform/nephos files Add platform/nephos/sonic-platform-modules-ingrasys submodule Add device/ingrasys/x86_64-ingrasys_s9130_32x-r0 files Add device/ingrasys/x86_64-ingrasys_s9230_64x-r0 files Add SONiC to support Nephos platform Update Head of submodule src/sonic-sairedis to "3b817bb" - How to verify it To build SONiC installer image and docker images, run the following commands: make configure PLATFORM=nephos make target/sonic-nephos.bin Check system and network feature is worked as well - Description for the changelog Add switch ASIC vendor and platforms for Nephos - A picture of a cute animal (not mandatory but encouraged) Signed-off-by: Sam Yang <[email protected]> * change source of files to github (from dropbox), update sairedis refpoint * update refpoint of sairedis * [centec] support CENTEC SAI 1.0 on 201712 branch and update e582-48x6q board (sonic-net#1269) * [marvel]: Marvell's updates for SONiC.201712 & SAI v1.0 (sonic-net#1287) * update sairedis (fast-boot refpoint) * fix syncd rpc make files * update refpoint to handle Makefile change (no functional change) * [Marvell]: Add support for SLM5401-54x device (sonic-net#1307) * Marvell's updates for SONiC.201712 & SAI v1.0 * [Platform] Add Marvell's SLM5401-54x for branch 201712 * [Broadcom]: Update Boradcom SAI package to 3.0.3.3-3 (sonic-net#1312) (sonic-net#1321) - update Arista 7050-QX32S config.bcm file - update Accton th-as771*-32x100G.config.bcm files * update refpoint for Makefile chnage in sairedis * update refpoint - sairedis * update sairedis to older refpoint till we debug clean build * export asic platform for build * update refpoint for makefiles * [PLATFORM] Centec update E582 driver fan/epprom/sensor (sonic-net#1332) * Upload wnc-osw1800 * Modify for Barefoot suggest * Revert bfn-platform.mk * Update bfn-platform-wnc.mk Update parameter name * Update parameter name * initial support for WNC platform * change switch name to "switch" * Delete bf modules for rel_7_0 * Add Ingrasys S9180 platform Signed-off-by: Wade He <[email protected]> * Modify bfnsdk for Ingrasys S9180 platform Signed-off-by: Wade He <[email protected]> * Resolved the conflict. * Resolved the conflict. * Update submodule path and url. * Delete unused file. * Update PSU GPIO and EEPROM for psuutil. * Add psuutil in S9180-32X Signed-off-by: Wade He <[email protected]> * update refpoint * update refpoint * change contact email, update refpoint * cleanup and update kernel modules * updates based on review * update refpoint * update refpoint * fix typo in config script to check for platforms * remove stale file * resolve conflicts * cleanup diffs with Azure repo and update SDK debs * update refpoints to Azure * address review comments * revert refpoint of swss-common * porting the build fix from master * porting build fix from master * Minor Fix * Minor fix * Temp to sde deb packages url * Update sonic - sairedis,swss & swss-common refpoints * Update git modules url path to bfn repo * updated paths for swss, swss-common & sairedis * Update refpoint for sonic-swss to local bfn repo * Update URL for downloading sde debian packages * porting fix links of debian git server from master * porting fix links of debian git server from master * [Ingrasys] Add platform support for S9280-64X with Barefoot ASIC * Update ref points for swss, swss-common and sairedis repos * Add sonic platform scripts for bfn montara/maverick * Call sh scripts instead of calling py scripts * Address upstream PR Comments (#10) * Update bf-master with azure/master * Undo changes to some files * Revert "Address upstream PR Comments (#10)" This reverts commit a7fddb8. * Address upstream comments (#11) * Remove all non bfn specific changes from upstream PR * Revert "Address upstream comments (#11)" This reverts commit 5591321. * Undo non bfn changes * Little more cleanup * Add back code removed in merge * export CONFIGURED_PLATFORM * Update sairedis and swss refpoints * Address Upstream PR comment * change deb pkg dependency from 3.16.0-4-amd64 to 3.16.0-5-amd64 * Set default tx queue len for usb0 interface to 64 * Update sairedis refpoint * Update swss ref point * Add bfn buffer cfg files for montara/maverick as per new design * Update buffer cfg templates for bfn montara * add non zero size to buffer profile * add macro to generate port lists * Update buffer cfg templates for bfn mavericks * add non zero size for buffer profiles * add port generation macro * Add missing psmisc package * BGP docker seems to be missing killall utility being used by fast-reboot script. This is causing non graceful termination of BGP sessions. Adding psmisc to resolve this issue. * Update swss ref point * Update swss ref point * Update sairedis refpoint * Update sairedis refpoint * Update sairedis refpoint * Update sairedis refpoint * Update refpoint for sairedis and swss * sairedis to azure master * swss to latest bfn bf-master * Update gitmodules Update url for sairedis to azure master * Correct typo in bfn platform script * Update swss and sairedis ref points * Update swss ref point * Address Review comments * Update swws path in gitmodules to azure master * update swss refpoint * update base docker j2 file -remove psmisc package (could be a concern, would cause fast reboot to not work correctly will fix in another PR) * Fix sairedis refpoint broken in by previous merge * Remove psmisc from docker base image * This will break fast reboot as killall is required for killing bgp process and initiating graceful termination of BGP session. Will fix this in a seperate PR. Need this for SONIC upstreaming * Address upstream comments * Remove bmc interface from interface jinja template and sample output interfaces file * Add bmc interface at boot time to network interfaces for bfn bmc based platforms * Remove autogen ingrasys debian files * Revert "Remove autogen ingrasys debian files" * Buffer and qos config template fix for bfn platforms (#21) SWI-1509 Buffer and qos config template fix for bfn platforms * Fix qos config files for montara & mavericks (#22) * Reference only ppg 3,4 in qos files as no profiles are attached to 0,1 in buffer configs * Fix vs test (#23)
1e61b29 [sonic_eeprom] If reading from what appears to be a corrupt cache file, delete file and read directly from EEPROM (#10) Signed-off-by: Guohan Lu <[email protected]>
* [submodule] update sonic-linux-kernel (sonic-net#2985) * Fix many version strings * Update minor version * Update arista-drivers submodule (#9) * Rebuild SDK on new kernel (#10)
* Upgrade new DellEMC platforms to Bullseye * Update s5212f kernel module
* [BFN] Updated platform APIs impl Signed-off-by: Andriy Kokhan <[email protected]> * Extended BFN platform SFP APIs implementation * Update sfp.py * [BFN] Extended SFP platform plugin implementation Signed-off-by: Andriy Kokhan <[email protected]> * [BFN] Extended Fans platform plugin implementation * [BFN] divided classes Fan and FanDrawer into 2 files * Signed-off-by: Vadym Yashchenko <[email protected]> What I did Add get_model() function Add get_low_critical_threshold() function Change __get(...) function. How I did it Differnece from previous implementation of __get(...) function is return real value or -9999.9 if value is not provided by thrift API * Add get_presence() function and revised __get() function Signed-off-by: Vadym Yashchenko <[email protected]> * [BFN] Updated PSU platform APIs impl Signed-off-by: Dmytro Lytvynenko <[email protected]> * Added BFN PSU cache (#9) Signed-off-by: Andriy Kokhan <[email protected]> * [BFN] Fans and Fantray platform APIs update (#7) * [BFN] Updated SFP platform APIs (#10) Signed-off-by: Volodymyr Boyko <[email protected]> * [BFN] Updated platform API for thermal (#8) * Signed-off-by: Vadym Yashchenko <[email protected]> * Revert "[BFN] Fans and Fantray platform APIs update (#7)" (#11) This reverts commit c62a733. * Add support health monitor system (#15) Signed-off-by: Petro Bratash <[email protected]> * Update chassis.py * [BFN] Updated FANs and FAN Tray platform API (#14) * Fix fix_alignment (#17) Signed-off-by: Petro Bratash <[email protected]> * [BFN] Improvement show environment (#16) * Added PSU temperature skip into platform.json (#18) Signed-off-by: Andriy Kokhan <[email protected]> * Do not skip psud on Newport Signed-off-by: Andriy Kokhan <[email protected]> * [BFN] fix fan status from Not OK to Ok (#19) * [BFN] Updated SFP platform plugin (#13) Signed-off-by: Volodymyr Boyko <[email protected]> * [DPB] Fix typo for Ethernet0 2x200G[100G,40G] breakout mode (#21) Signed-off-by: Mykola Gerasymenko <[email protected]> * [barefoot] Tmp fix vendor_rev (#22) Signed-off-by: Volodymyr Boyko <[email protected]> * Fixed python issues in sonic_platform/fan_drawer.py Signed-off-by: Andriy Kokhan <[email protected]> * Updated fan_drawer.py * Fixing trailing white spaces in fan_drawer.py * [BFN] Fix thrift for SFPs API Signed-off-by: Volodymyr Boyko <[email protected]> * In platform.json, replaced 'false' with '0' to workaround ast.literal_eval() issue Signed-off-by: Andriy Kokhan <[email protected]> * [Newport] Thermal manager (#23) * Signed-off-by: Vadym Yashchenko <[email protected]> * Revert "In platform.json, replaced 'false' with '0' to workaround ast.literal_eval() issue" This reverts commit 1e73127. * Removed 'controllable' options from platform.json to fix factory default config generation Signed-off-by: Andriy Kokhan <[email protected]> * Update thermal_manager.py * Migrated SFP plugin to sonic_xcvr API (#30) Signed-off-by: Andriy Kokhan <[email protected]> Co-authored-by: KostiantynYarovyiBf <[email protected]> Co-authored-by: Vadym Yashchenko <[email protected]> Co-authored-by: Dmytro Lytvynenko <[email protected]> Co-authored-by: Volodymyr Boiko <[email protected]> Co-authored-by: Petro Bratash <[email protected]> Co-authored-by: Mykola Gerasymenko <[email protected]>
#### Why I did it Update sonic-host-services submodule to include below commits: ``` bc8698d Merge pull request #21 from abdosi/feature 557a110 Fix the issue where if dest port is not specified in ACL rule than for multi-asic where we create NAT rule to forward traffic from Namespace to host fail with exception. 6e45acc (master) Merge pull request #14 from abdosi/feature 4d6cad7 Merge remote-tracking branch 'upstream/master' into feature bceb13e Install libyang to azure pipeline (#20) 82299f5 Merge pull request #13 from SuvarnaMeenakshi/cacl_fabricns 15d3bf4 Merge branch 'master' into cacl_fabricns de54082 Merge pull request #16 from ZhaohuiS/feature/caclmgrd_external_client_warning_log b4b368d Add warning log if destination port is not defined d4bb96d Merge branch 'master' into cacl_fabricns 35c76cb Add unit-test and fix typo. 17d44c2 Made Changes to be Python 3.7 compatible 978afb5 Aligning Code 1fbf8fb Merge remote-tracking branch 'upstream/master' into feature 7b8c7d1 Added UT for the changes 91c4c42 Merge pull request #9 from ZhaohuiS/feature/caclmgrd_external_client 7c0b56a Add 4 test cases for external_client_acl, including single port and port range for ipv4 and ipv6 b71e507 Merge remote-tracking branch 'origin/master' into HEAD d992dc0 Merge branch 'master' into feature/caclmgrd_external_client bd7b172 DST_PORT is configuralbe in json config file for EXTERNAL_CLIENT_ACL f9af7ae [CLI] Move hostname, mgmt interface/vrf config to hostcfgd (#2) 70ce6a3 Merge pull request #10 from sujinmkang/cold_reset 29be8d2 Added Support to render Feature Table using Device running metadata. Also added support to render 'has_asic_scope' field of Feature Table. 3437e35 [caclmgrd][chassis]: Add ip tables rules to accept internal docker traffic from fabric asic namespaces. 8720561 Fix and add hardware reboot cause determination tests 0dcc7fe remove the empty bracket if no hardware reboot cause minor e47d831 fix the wrong expected result comparision ef86b53 Fix startswith Attribute error 8a630bb fix mock patch 8543ddf update the reboot cause logic and update the unit test 53ad7cd fix the mock patch function 7c8003d fix the reboot-cause regix for test 1ba611f fix typo 25379d3 Add unit test case a56133b Add hardware reboot cause as actual reboot cause for soft reboot failed c7d3833 Support Restapi/gnmi control plane acls f6ea036 caclmgrd: Don't block traffic to mgmt by default a712fc4 Update test cases adc058b caclmgrd: Don't block traffic to mgmt by default 06ff918 Merge pull request #7 from bluecmd/patch-1 e3e23bc ci: Rename sonic-buildimage repository e83a858 Merge pull request #4 from kamelnetworks/acl-ip2me-test f5a2e50 [caclmgrd]: Tests for IP2ME rules generation ```
- Why I did it Mellanox MSN2700 platforms have a non-functional error log: "ERR pmon#sensord: Error getting sensor data: dps460/#10: Can't read". This error is because of a firmware issue with some PSU, we are not able to upgrade the FW online. Since there is no functional impact, this error log can be ignored safely. - How I did it Add a new rsyslog rule to the rsyslog-container.conf.j2, if the docker name is pmon and the platform name matches, the new rule will be inserted into the docker rsyslogd.conf - How to verify it run regression on the MSN2700 platform to make the error log will not be printed to the syslog. Signed-off-by: Kebo Liu <[email protected]>
…#17365) - Why I did it Mellanox MSN2410 platforms have a non-functional error log: "ERR pmon#sensord: Error getting sensor data: dps460/#10: Can't read". This error is because of a firmware issue with some PSU, we are not able to upgrade the FW online. Since there is no functional impact, this error log can be ignored safely - How I did it Add a new rsyslog rule to the rsyslog-container.conf.j2, if the docker name is pmon and the platform name matches, the new rule will be inserted into the docker rsyslogd.conf - How to verify it run regression on the MSN2410 platform to make the error log will not be printed to the syslog. Signed-off-by: Kebo Liu <[email protected]>
…ic-net#17413) ### Why I did it 1. Protobuf 3.21 has been released in the Debian bookworm 2. Update submodule sonic-swss and sonic-dash-api because they include related updates. ##### Work item tracking - Microsoft ADO **(number only)**: #### How I did it 1. In the protobuf.mk, If it isn't bullseye, ignore to compile the protobuf package 2. Move sonic-swss commits: ``` fd852084 (HEAD, origin/master, origin/HEAD) [dashrouteorch]: Rename dash route namespace (sonic-net#2966) ``` 3. Move sonic-dash-api and move build chain to its submodule ``` d4448c7 (HEAD, origin/master, origin/HEAD, master) [azp]: Add multi-platform artifacts (#11) 8a5e5cc [debian]: Add debian package (#10) d96163a [misc]: Add dash utils and its tests (#9) ``` #### How to verify it Check Azp
…#17365) - Why I did it Mellanox MSN2410 platforms have a non-functional error log: "ERR pmon#sensord: Error getting sensor data: dps460/#10: Can't read". This error is because of a firmware issue with some PSU, we are not able to upgrade the FW online. Since there is no functional impact, this error log can be ignored safely - How I did it Add a new rsyslog rule to the rsyslog-container.conf.j2, if the docker name is pmon and the platform name matches, the new rule will be inserted into the docker rsyslogd.conf - How to verify it run regression on the MSN2410 platform to make the error log will not be printed to the syslog. Signed-off-by: Kebo Liu <[email protected]>
…buf (sonic-net#17521) * [submodule]: Update submodule sonic-swss/sonic-dash-api/protobuf (sonic-net#17413) 1. Protobuf 3.21 has been released in the Debian bookworm 2. Update submodule sonic-swss and sonic-dash-api because they include related updates. - Microsoft ADO **(number only)**: 1. In the protobuf.mk, If it isn't bullseye, ignore to compile the protobuf package 2. Move sonic-swss commits: ``` fd852084 (HEAD, origin/master, origin/HEAD) [dashrouteorch]: Rename dash route namespace (sonic-net#2966) ``` 3. Move sonic-dash-api and move build chain to its submodule ``` d4448c7 (HEAD, origin/master, origin/HEAD, master) [azp]: Add multi-platform artifacts (#11) 8a5e5cc [debian]: Add debian package (#10) d96163a [misc]: Add dash utils and its tests (#9) ``` Signed-off-by: Ze Gan <[email protected]>
For review ONLY
PR can be merged after integrating MLNX SDK version 4.2.7000X042
Also the support for other MLNX platform will be added very soon
Currently support is available only for SN2700
- What I did
Added LPM and reset support to sfputil for MLNX platforms
-How I did it
Implemented additional scripts which uses a MLNX SDK
- How to verify it
2.1 Get LPM status
2.2 Set LPM to OFF
2.3 Get LPM status and check if it's OFF
2.4 Set LPM to ON
2.5 Get LPM status and check if it's ON
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)