Skip to content
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

sonic-sairedis: Add support to sonic-sairedis for gearbox phys #632

Merged
merged 2 commits into from
Jun 29, 2020

Conversation

sydlogan
Copy link
Contributor

sonic-sairedis: Add support to sonic-sairedis for gearbox phys

* builds on support for multiple switches in sonic-sairedis
* new vslib switch BCM81724 implements a virtual gearbox phy.
* support for launching second (BCM81724 is supported by its own syncd)
* simple refactoring of tests to support switches by part number, still working with
  sairedis to support multiple switch in tests so BCM81724 will be a separate pull request)
* changed example context_config.json to reflect renaming of phy REDIS tables (see sonic-swss-common
  commit 292b08a3a80b24b23663020b37e6260039a311c0)

Note that a future commit to sonic-buildimage will be required to trigger launch of physyncd
(launching is based on device config files which are currently not present in sonic-buildimage).

Testing done in multiple environments (broadcom fork and pure upstream). Example CLI output
based on changes pushed to sonic-utilities (commit a6c4456f6965b79bf9d02ff1962070a5eae6ea55)
running in VS switch supporting BCM81724:

root@sonic:/home/admin# show gearbox interfaces  status
  PHY Id    Interface    MAC Lanes    MAC Lane Speed    PHY Lanes    PHY Lane Speed    Line Lanes    Line Lane Speed    Oper    Admin
--------  -----------  -----------  ----------------  -----------  ----------------  ------------  -----------------  ------  -------
       1    Ethernet0  25,26,27,28               10G      200,201               20G           206                40G      up       up
       1    Ethernet4  29,30,31,32               10G      202,203               20G           207                40G      up       up
       1    Ethernet8  33,34,35,36               10G      204,205               20G           208                40G      up       up

HLD is located at https://github.com/Azure/SONiC/blob/b817a12fd89520d3fd26bbc5897487928e7f6de7/doc/gearbox/gearbox_mgr_design.md

  Signed-off-by: syd.logan@broadcom.com

sydlogan and others added 2 commits June 28, 2020 21:39
…-net#624)

* sonic-sairedis: Add support to sonic-sairedis for gearbox phys

* builds on support for multiple switches in sonic-sairedis
* new vslib switch BCM81724 implements a virtual gearbox phy.
* support for launching second (BCM81724 is supported by its own syncd)
* simple refactoring of tests to support switches by part number, still working with
  sairedis to support multiple switch in tests so BCM81724 will be a separate pull request)
* changed example context_config.json to reflect renaming of phy REDIS tables (see sonic-swss-common
  commit 292b08a3a80b24b23663020b37e6260039a311c0)

Note that a future commit to sonic-buildimage will be required to trigger launch of physyncd
(launching is based on device config files which are currently not present in sonic-buildimage).

Testing done in multiple environments (broadcom fork and pure upstream). Example CLI output
based on changes pushed to sonic-utilities (commit a6c4456f6965b79bf9d02ff1962070a5eae6ea55)
running in VS switch supporting BCM81724:

root@sonic:/home/admin# show gearbox interfaces  status
  PHY Id    Interface    MAC Lanes    MAC Lane Speed    PHY Lanes    PHY Lane Speed    Line Lanes    Line Lane Speed    Oper    Admin
--------  -----------  -----------  ----------------  -----------  ----------------  ------------  -----------------  ------  -------
       1    Ethernet0  25,26,27,28               10G      200,201               20G           206                40G      up       up
       1    Ethernet4  29,30,31,32               10G      202,203               20G           207                40G      up       up
       1    Ethernet8  33,34,35,36               10G      204,205               20G           208                40G      up       up

HLD is located at https://github.com/Azure/SONiC/blob/b817a12fd89520d3fd26bbc5897487928e7f6de7/doc/gearbox/gearbox_mgr_design.md

  Signed-off-by: syd.logan@broadcom.com

* Address review comments

* recode syncd_init_common.sh to support physyncd

* revert syncd_init_common.sh to support only launching syncd, modify physyncd_start.sh to launch via python script bypassing syncd_init_common

Co-authored-by: Syd Logan <slogan621@gmail.com>
…H_TYPE_NPU. override to SAI_SWITCH_TYPE_PHY in SwitchBCM81724
@daall
Copy link
Contributor

daall commented Jun 29, 2020

retest this please

@daall
Copy link
Contributor

daall commented Jun 29, 2020

Fix looks good from my end. What I did was:

  1. Download the latest docker-sonic-vs from here.
  2. Ran the ACL and VLAN tests. Everything passed as expected.
  3. I then installed all the debs from the initial gearbox PR here.
  4. Ran the ACL and VLAN tests. The tests failed with the same symptoms I described in the revert PR.
  5. I installed all the debs from this PR with the fix here.
  6. Ran the ACL and VLAN tests. The tests all passed as expected.

I'm running the rest of the testbed now to confirm there aren't any more surprises, but so far so good. 🚀

@daall
Copy link
Contributor

daall commented Jun 29, 2020

All swss tests pass, LGTM.

@sydlogan sydlogan marked this pull request as ready for review June 29, 2020 16:15
@sydlogan
Copy link
Contributor Author

Thanks for all the help @daall appreciate the extra effort to help test this over the weekend.

@kcudnik - only difference between this pull request and merge reverted is commit 8b2d815 - could you please review that part of this change and approve/merge? Sorry for the inconvenience, and thanks.

@daall daall requested review from kcudnik and lguohan June 29, 2020 17:48
@lguohan lguohan merged commit 449a092 into sonic-net:master Jun 29, 2020
pettershao-ragilenetworks pushed a commit to pettershao-ragilenetworks/sonic-sairedis that referenced this pull request Nov 18, 2022
…-net#632)

* builds on support for multiple switches in sonic-sairedis
* new vslib switch BCM81724 implements a virtual gearbox phy.
* support for launching second (BCM81724 is supported by its own syncd)
* simple refactoring of tests to support switches by part number, still working with
  sairedis to support multiple switch in tests so BCM81724 will be a separate pull request)
* changed example context_config.json to reflect renaming of phy REDIS tables (see sonic-swss-common
  commit 292b08a3a80b24b23663020b37e6260039a311c0)

Note that a future commit to sonic-buildimage will be required to trigger launch of physyncd
(launching is based on device config files which are currently not present in sonic-buildimage).

Testing done in multiple environments (broadcom fork and pure upstream). Example CLI output
based on changes pushed to sonic-utilities (commit a6c4456f6965b79bf9d02ff1962070a5eae6ea55)
running in VS switch supporting BCM81724:

root@sonic:/home/admin# show gearbox interfaces  status
  PHY Id    Interface    MAC Lanes    MAC Lane Speed    PHY Lanes    PHY Lane Speed    Line Lanes    Line Lane Speed    Oper    Admin
--------  -----------  -----------  ----------------  -----------  ----------------  ------------  -----------------  ------  -------
       1    Ethernet0  25,26,27,28               10G      200,201               20G           206                40G      up       up
       1    Ethernet4  29,30,31,32               10G      202,203               20G           207                40G      up       up
       1    Ethernet8  33,34,35,36               10G      204,205               20G           208                40G      up       up

HLD is located at https://github.com/Azure/SONiC/blob/master/doc/gearbox/gearbox_mgr_design.md

Signed-off-by: syd.logan@broadcom.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants