-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[201807][platform_barefoot]Wedge100bf_32x, add device util, eeprom and psuutil. #2359
[201807][platform_barefoot]Wedge100bf_32x, add device util, eeprom and psuutil. #2359
Conversation
These 2 utilities poll data through bfshell. Signed-off-by: roy_lee <roy_lee@accton.com>
bfshell_path = 'docker exec -it syncd /opt/bfn/install/bin/bfshell' | ||
bfshell_cmd = [ bfshell_path ] | ||
|
||
prompt_list = ['bfshell> $', 'bf-sde\.*.*> $', 'pd-switch:\d+> $', pexpect.EOF] |
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.
do you you get eeprom/psu data from bfshell? Isn't your platform driver suppose create sysfs entries to expose those data?
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.
No, not with bfshell.
These platforms, 32x and 65x, employ a usb-to-i2c ASIC, called cp2112, to access qsfps' eeprom.
For BF's SDE accesses peripherals itself with libusb, it will detach driver of cp2112.
That's why I can only get these data through bfshell.
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.
ok. can you get this to master branch first? we need to ensure we have this in the master branch, then we can cherry-pick it back to a release branch.
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.
Get it.
I will make another PR for this change to master branch. But it needs quite a while for I'm working on other platforms.
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.
new commits to master branch first.
Postponed, there are code changes by other PR. |
dc8bc1c [portsorch] Expose supported FEC modes to STABE_DB and check whether FEC mode is supported before setting it (sonic-net#2333) 6565b50 Revert "[portsorch] Expose supported FEC modes to STABE_DB and check whether FEC mode is supported before setting it (sonic-net#2333)" (sonic-net#2396) dc88d55 Revert hwinfo count change (sonic-net#2383) 75fc965 [DualToR] Handle race condition between tunnel_decap and mux orchestrator (sonic-net#2397) 525a57f Fix for remote system interface not getting created (sonic-net#2364) 3161eaa portsorch: initial support for link-training (sonic-net#2359) dc477fb [swss/cfgmgr] teammgr configure lacp rate (sonic-net#2121) 2489ad5 Improve pytest speend by grouping 20 tests together. (sonic-net#2390) 168bd3b [EVPN]Modified tunnel creation logic when creating tunnel in VRF-VNI map creation flow (sonic-net#2404) 1e1438e [portsorch] Expose supported FEC modes to STABE_DB and check whether FEC mode is supported before setting it (sonic-net#2400) 9f2e27b [QoS] Fix issue: the WRED profile can not be set if current min > new max or current max < new min (sonic-net#2379) d36c17d [asan][aclorch] fix a memory leak in the SaiAttrWrapper::swap() (sonic-net#2382) Signed-off-by: Stephen Sun <stephens@nvidia.com>
* Advance sonic-utilities pointer 7919077f Add FEC correctable and uncorrectable port stats (#2027) ecb91367 Add CLI to configure YANG config validation (#2147) e9ab5235 Add override testcase to verify removal (#2288) c6794b55 Fix version in db_migrator for `PORT_QOS_MAP|global` (#2289) 92b889b7 [intfutil] Check whether the FEC mode is supported on the platform before configuring it to CONFIG_DB (#2223) dab0d065 Transfer organization from Azure to sonic-net (#2284) 6de18a1d [watermarkstat] Fix CLI script for unconfigured PG counters (#2239) ac2f5530 Improve the way to check port type of RJ45 port (#2249) 142185c9 Fix the issue that sonic_platform is not installed on vs image (#2300) ca14133f [crm] add checking for CRM interval range (#2293) Signed-off-by: Stephen Sun <stephens@nvidia.com> * Advance swss dc8bc1c [portsorch] Expose supported FEC modes to STABE_DB and check whether FEC mode is supported before setting it (#2333) 6565b50 Revert "[portsorch] Expose supported FEC modes to STABE_DB and check whether FEC mode is supported before setting it (#2333)" (#2396) dc88d55 Revert hwinfo count change (#2383) 75fc965 [DualToR] Handle race condition between tunnel_decap and mux orchestrator (#2397) 525a57f Fix for remote system interface not getting created (#2364) 3161eaa portsorch: initial support for link-training (#2359) dc477fb [swss/cfgmgr] teammgr configure lacp rate (#2121) 2489ad5 Improve pytest speend by grouping 20 tests together. (#2390) 168bd3b [EVPN]Modified tunnel creation logic when creating tunnel in VRF-VNI map creation flow (#2404) 1e1438e [portsorch] Expose supported FEC modes to STABE_DB and check whether FEC mode is supported before setting it (#2400) 9f2e27b [QoS] Fix issue: the WRED profile can not be set if current min > new max or current max < new min (#2379) d36c17d [asan][aclorch] fix a memory leak in the SaiAttrWrapper::swap() (#2382) Signed-off-by: Stephen Sun <stephens@nvidia.com> * More sonic-utilities PRs be1866fd Fix GCU bug when backend service modifying config (#2295) bcf36eb3 Fix issues for sonic_installer upgrade-docker and sonic_installer rollback-docker (#2278) Signed-off-by: Stephen Sun <stephens@nvidia.com> Signed-off-by: Stephen Sun <stephens@nvidia.com>
…submodule head Kernel: * 86c4b66 2022-07-28 | [Mellanox] Add new kernel patches from HW-MGMT package V.7.0020.3005 (sonic-net#287) (HEAD -> 202205) [Kebo Liu] * 3a8416a 2022-07-05 | [patch] mlxsw: i2c: Prevent transaction execution for special chip (sonic-net#279) [Stepan Blyshchak] swss: * 3f69944 2022-08-10 | Set internal class state to reflect the actual state (sonic-net#2410) (HEAD -> 202205, tag: foo) [Prince Sunny] * 87e98eb 2022-08-09 | [portsorch] Expose supported FEC modes to STABE_DB and check whether FEC mode is supported before setting it (sonic-net#2400) [Stephen Sun] * e71ab99 2022-07-29 | portsorch: initial support for link-training (sonic-net#2359) [Dante (Kuo-Jung) Su] * ed5e5be 2022-07-08 | Port configuration incremental update support (sonic-net#2305) [Junchao-Mellanox] utilities: * 0df3ba8 2022-08-12 | Revert "Improve the way to check port type of RJ45 port (sonic-net#2249)" (HEAD -> 202205) [Ying Xie] * 9b21903 2022-08-12 | Fix test failure in dump table test in 202205 (sonic-net#2307) (HEAD -> 202205, github/202205) [Stephen Sun] * 750d1db 2022-08-11 | Convert IPv6 addresses to lowercase in apply-patch (sonic-net#2299) (HEAD -> 202205) [dbarashinvd] * 555947e 2022-08-09 | [config][muxcable] add support to enable/disable ycable telemetry (sonic-net#2297) [vdahiya12] * 978f416 2022-08-09 | Fix GCU bug when backend service modifying config (sonic-net#2295) [jingwenxie] * 8fed381 2022-08-02 | [intfutil] Check whether the FEC mode is supported on the platform before configuring it to CONFIG_DB (sonic-net#2223) (github/202205) [Stephen Sun] * a1a09e4 2022-07-29 | Improve the way to check port type of RJ45 port (sonic-net#2249) [Stephen Sun] * 9bdbfb8 2022-05-19 | sonic-utils: initial support for link-training (sonic-net#2071) [Dante (Kuo-Jung) Su] * c088ec4 2022-08-10 | Support to enable fips for the command sonic_installer (sonic-net#2154) (sonic-net#2303) [xumia] platform-daemon: * 767cfb6 2022-08-09 | [ycabled] add capability to enable/disable telemetry (sonic-net#279) (HEAD -> 202205) [vdahiya12] linkmgrd: * cf1ba2b 2022-08-12 | wait for handler to be completed (sonic-net#114) (HEAD -> 202205, github/202205) [Jing Zhang] * e99026c 2022-08-11 | [lgtm]: add uuid-dev to lgtm prepare (sonic-net#112) (HEAD -> 202205) [Jing Zhang] * bd1b7f0 2022-08-11 | Adjust `DbInterfaceRaceConditionCheck` to Wait Longer for Handlers to be executed (sonic-net#111) (HEAD -> 202205, github/202205) [Jing Zhang] * e9dc6b2 2022-08-11 | Backoff mux probing for server down scenario (sonic-net#106) [Jing Zhang] * 0d61171 2022-08-09 | Fix race condition caused by strand `wrap` method (sonic-net#104) [Jing Zhang] * e9ede7d 2022-07-02 | Enforce switch after config mux to active (sonic-net#95) [Longxiang Lyu] * 15dbc30 2022-06-30 | Add unittest to verify mux toggle active (sonic-net#94) [Longxiang Lyu] Signed-off-by: Ying Xie <ying.xie@microsoft.com>
…submodule head (#11705) Kernel: * 86c4b66 2022-07-28 | [Mellanox] Add new kernel patches from HW-MGMT package V.7.0020.3005 (#287) (HEAD -> 202205) [Kebo Liu] * 3a8416a 2022-07-05 | [patch] mlxsw: i2c: Prevent transaction execution for special chip (#279) [Stepan Blyshchak] swss: * 3f69944 2022-08-10 | Set internal class state to reflect the actual state (#2410) (HEAD -> 202205, tag: foo) [Prince Sunny] * 87e98eb 2022-08-09 | [portsorch] Expose supported FEC modes to STABE_DB and check whether FEC mode is supported before setting it (#2400) [Stephen Sun] * e71ab99 2022-07-29 | portsorch: initial support for link-training (#2359) [Dante (Kuo-Jung) Su] * ed5e5be 2022-07-08 | Port configuration incremental update support (#2305) [Junchao-Mellanox] utilities: * 0df3ba8 2022-08-12 | Revert "Improve the way to check port type of RJ45 port (#2249)" (HEAD -> 202205) [Ying Xie] * 9b21903 2022-08-12 | Fix test failure in dump table test in 202205 (#2307) (HEAD -> 202205, github/202205) [Stephen Sun] * 750d1db 2022-08-11 | Convert IPv6 addresses to lowercase in apply-patch (#2299) (HEAD -> 202205) [dbarashinvd] * 555947e 2022-08-09 | [config][muxcable] add support to enable/disable ycable telemetry (#2297) [vdahiya12] * 978f416 2022-08-09 | Fix GCU bug when backend service modifying config (#2295) [jingwenxie] * 8fed381 2022-08-02 | [intfutil] Check whether the FEC mode is supported on the platform before configuring it to CONFIG_DB (#2223) (github/202205) [Stephen Sun] * a1a09e4 2022-07-29 | Improve the way to check port type of RJ45 port (#2249) [Stephen Sun] * 9bdbfb8 2022-05-19 | sonic-utils: initial support for link-training (#2071) [Dante (Kuo-Jung) Su] * c088ec4 2022-08-10 | Support to enable fips for the command sonic_installer (#2154) (#2303) [xumia] platform-daemon: * 767cfb6 2022-08-09 | [ycabled] add capability to enable/disable telemetry (#279) (HEAD -> 202205) [vdahiya12] linkmgrd: * cf1ba2b 2022-08-12 | wait for handler to be completed (#114) (HEAD -> 202205, github/202205) [Jing Zhang] * e99026c 2022-08-11 | [lgtm]: add uuid-dev to lgtm prepare (#112) (HEAD -> 202205) [Jing Zhang] * bd1b7f0 2022-08-11 | Adjust `DbInterfaceRaceConditionCheck` to Wait Longer for Handlers to be executed (#111) (HEAD -> 202205, github/202205) [Jing Zhang] * e9dc6b2 2022-08-11 | Backoff mux probing for server down scenario (#106) [Jing Zhang] * 0d61171 2022-08-09 | Fix race condition caused by strand `wrap` method (#104) [Jing Zhang] * e9ede7d 2022-07-02 | Enforce switch after config mux to active (#95) [Longxiang Lyu] * 15dbc30 2022-06-30 | Add unittest to verify mux toggle active (#94) [Longxiang Lyu] Signed-off-by: Ying Xie <ying.xie@microsoft.com>
…submodule head (sonic-net#11705) Kernel: * 86c4b66 2022-07-28 | [Mellanox] Add new kernel patches from HW-MGMT package V.7.0020.3005 (sonic-net#287) (HEAD -> 202205) [Kebo Liu] * 3a8416a 2022-07-05 | [patch] mlxsw: i2c: Prevent transaction execution for special chip (sonic-net#279) [Stepan Blyshchak] swss: * 3f69944 2022-08-10 | Set internal class state to reflect the actual state (sonic-net#2410) (HEAD -> 202205, tag: foo) [Prince Sunny] * 87e98eb 2022-08-09 | [portsorch] Expose supported FEC modes to STABE_DB and check whether FEC mode is supported before setting it (sonic-net#2400) [Stephen Sun] * e71ab99 2022-07-29 | portsorch: initial support for link-training (sonic-net#2359) [Dante (Kuo-Jung) Su] * ed5e5be 2022-07-08 | Port configuration incremental update support (sonic-net#2305) [Junchao-Mellanox] utilities: * 0df3ba8 2022-08-12 | Revert "Improve the way to check port type of RJ45 port (sonic-net#2249)" (HEAD -> 202205) [Ying Xie] * 9b21903 2022-08-12 | Fix test failure in dump table test in 202205 (sonic-net#2307) (HEAD -> 202205, github/202205) [Stephen Sun] * 750d1db 2022-08-11 | Convert IPv6 addresses to lowercase in apply-patch (sonic-net#2299) (HEAD -> 202205) [dbarashinvd] * 555947e 2022-08-09 | [config][muxcable] add support to enable/disable ycable telemetry (sonic-net#2297) [vdahiya12] * 978f416 2022-08-09 | Fix GCU bug when backend service modifying config (sonic-net#2295) [jingwenxie] * 8fed381 2022-08-02 | [intfutil] Check whether the FEC mode is supported on the platform before configuring it to CONFIG_DB (sonic-net#2223) (github/202205) [Stephen Sun] * a1a09e4 2022-07-29 | Improve the way to check port type of RJ45 port (sonic-net#2249) [Stephen Sun] * 9bdbfb8 2022-05-19 | sonic-utils: initial support for link-training (sonic-net#2071) [Dante (Kuo-Jung) Su] * c088ec4 2022-08-10 | Support to enable fips for the command sonic_installer (sonic-net#2154) (sonic-net#2303) [xumia] platform-daemon: * 767cfb6 2022-08-09 | [ycabled] add capability to enable/disable telemetry (sonic-net#279) (HEAD -> 202205) [vdahiya12] linkmgrd: * cf1ba2b 2022-08-12 | wait for handler to be completed (sonic-net#114) (HEAD -> 202205, github/202205) [Jing Zhang] * e99026c 2022-08-11 | [lgtm]: add uuid-dev to lgtm prepare (sonic-net#112) (HEAD -> 202205) [Jing Zhang] * bd1b7f0 2022-08-11 | Adjust `DbInterfaceRaceConditionCheck` to Wait Longer for Handlers to be executed (sonic-net#111) (HEAD -> 202205, github/202205) [Jing Zhang] * e9dc6b2 2022-08-11 | Backoff mux probing for server down scenario (sonic-net#106) [Jing Zhang] * 0d61171 2022-08-09 | Fix race condition caused by strand `wrap` method (sonic-net#104) [Jing Zhang] * e9ede7d 2022-07-02 | Enforce switch after config mux to active (sonic-net#95) [Longxiang Lyu] * 15dbc30 2022-06-30 | Add unittest to verify mux toggle active (sonic-net#94) [Longxiang Lyu] Signed-off-by: Ying Xie <ying.xie@microsoft.com>
* Squashed commit of the following: commit 18632a3e84de380ad29a671a6496018cfd1cd540 Author: Dante Su <dante.su@broadcom.com> Date: Mon May 23 12:22:49 2022 +0000 optimize port state refresh logic Signed-off-by: Dante Su <dante.su@broadcom.com> commit 081d491c9bc3cda80343d1476b76c457bdeacb8e Author: ds952811 <ds952811@broadcom.com> Date: Mon May 23 02:33:56 2022 +0000 address review comments Signed-off-by: ds952811 <ds952811@broadcom.com> commit 84bdde4913cae37dc96ceb110cb2503633922847 Author: Dante Su <dante.su@broadcom.com> Date: Fri May 20 02:15:59 2022 +0000 update the default LT capability upon get failures Signed-off-by: Dante Su <dante.su@broadcom.com> commit 0f73666ba3b13af2116e55b0238e96c6e9c49270 Author: Dante Su <dante.su@broadcom.com> Date: Thu May 19 11:28:38 2022 +0000 Rename updatePortStatesXX as refreshPortStatesXX Signed-off-by: Dante Su <dante.su@broadcom.com> commit ddd57fe08f78f4463ee39a2075b0b0b0d56e9117 Author: Dante Su <dante.su@broadcom.com> Date: Thu May 19 04:03:13 2022 +0000 Have AN cap defaults to 1, and use AN attr for LT cap query Signed-off-by: Dante Su <dante.su@broadcom.com> commit 876e605b8462c4318f09af86767453907d055e5b Author: Dante Su <dante.su@broadcom.com> Date: Fri May 13 11:15:12 2022 +0000 drop LT capability query Signed-off-by: Dante Su <dante.su@broadcom.com> commit 55ced7db0155d161d5637f889453e7d53cdbbf10 Author: Dante Su <dante.su@broadcom.com> Date: Fri Apr 29 13:53:17 2022 +0000 incorporate autoneg support from PR#2215 Signed-off-by: Dante Su <dante.su@broadcom.com> commit a04594e6efee7d5f5e3b86f45c413196affc89a8 Author: Dante Su <dante.su@broadcom.com> Date: Thu Apr 28 16:33:14 2022 +0000 address review comments Signed-off-by: Dante Su <dante.su@broadcom.com> commit e9eeb9a87f27740ee692e0a1e86e4a10dd9e943f Author: Dante Su <dante.su@broadcom.com> Date: Thu Apr 28 15:00:04 2022 +0000 address review comments Signed-off-by: Dante Su <dante.su@broadcom.com> commit 4ff604da578b3fa2a40544c6f800c68cef4b9622 Author: Dante Su <dante.su@broadcom.com> Date: Fri Apr 22 03:51:56 2022 +0000 Stop the port state poll by default Signed-off-by: Dante Su <dante.su@broadcom.com> commit bdfb8d847fc81bc4771592d18e8e0747114688b3 Author: Dante Su <dante.su@broadcom.com> Date: Fri Apr 22 03:48:07 2022 +0000 address review comments Signed-off-by: Dante Su <dante.su@broadcom.com> commit 1c6bda8279bcdcce564bdf83c59dc6a3ac7e3f97 Author: Dante Su <dante.su@broadcom.com> Date: Mon Apr 18 08:46:21 2022 +0000 Restore pre-emphasis when LT is transitioned from ON to OFF Signed-off-by: Dante Su <dante.su@broadcom.com> commit 09a9b334f8f4b06d399e4b3af73443f4b16d5640 Author: Dante Su <dante.su@broadcom.com> Date: Mon Apr 18 02:33:11 2022 +0000 fix build failure due to SAI_PORT_ATTR_SUPPORTED_LINK_TRAINING_MODE Signed-off-by: Dante Su <dante.su@broadcom.com> commit b0bee3ec7bd1c00c976e812eae27f0e88d41f630 Author: Dante Su <dante.su@broadcom.com> Date: Thu Apr 14 07:54:14 2022 +0000 address review comments Signed-off-by: Dante Su <dante.su@broadcom.com> commit c4345efbafd1881ab6b80e878e2ecb9d7e637b3b Author: Dante Su <dante.su@broadcom.com> Date: Fri Mar 25 02:26:05 2022 +0000 portsorch: initial support for link-training - What I did Add Link-Training support to portsorch, while Gearbox is not in the scope - Why I did it In the case of DAC, static pre-calibrated pre-emphasis is rarely available on SONIC, as most of the ODM are expecting this to be done dynamically at runtime via link-training, hence we'll need this feature to improve the link quality - How I verified it Manual test Ran the Unit-tests to the corresponding changes Signed-off-by: Dante Su <dante.su@broadcom.com> * Add support for selected multiple tests Signed-off-by: Dante Su <dante.su@broadcom.com> * Revert "Add support for selected multiple tests" This reverts commit 8e2f7a4334278589581b2110e76f4252bbec03f0. * fix the comment for 'autoneg is not supported' Signed-off-by: Dante Su <dante.su@broadcom.com> * address review comments Signed-off-by: Dante Su <dante.su@broadcom.com> * validate AN cap only when there is an update to AN config Signed-off-by: Dante Su <dante.su@broadcom.com> * drop the changes to tests/conftest.py Signed-off-by: Dante Su <dante.su@broadcom.com> * fix link failure in p4orch_tests-fake_portorch.o Signed-off-by: Dante Su <dante.su@broadcom.com>
These 2 utilities poll data through bfshell.
- What I did
Add eeprom.py and psuutil.py to device for wedge100bf_32x of barefoot.
- How I did it
It needs 2 more debain packages, python-pexpect and python-ptyprocess.
Use pexpect to grab data from bfshell.
- How to verify it
By "decode-syseeprom" and "psuutil status"
- Description for the changelog