Added gbsyncd infra for multi-ASIC, multi-PHY mode#9722
Added gbsyncd infra for multi-ASIC, multi-PHY mode#9722jimmyzhai merged 1 commit intosonic-net:masterfrom
Conversation
- External PHY is managed via gearbox (gbsybcd
docker container) in SONiC
- Enhanced 'External PHY management' from SONiC's
single-ASIC environment to multi-ASIC
- Enhanced gbsyncd docker container from single
Namespace to multi-Namspace mode
- Added gbsyncd.service.j2 on per_namespace
basis.
- Each namepace/ASIC now to have its unique
gbsyncd<ASIC#> docker container with its
own Gearbox table, redis-DB
Signed-off-by: Shyam Kumar <[email protected]>
| [Unit] | ||
| Description={{docker_container_name}} service | ||
| Requires=database{% if multi_instance == 'true' %}@%i{% endif %}.service updategraph.service | ||
| ConditionPathExists=!/usr/share/sonic/hwsku/gearbox_config.json |
There was a problem hiding this comment.
does this condition hold true for all asic ?
There was a problem hiding this comment.
Yes.
one can confirm the same from UT logs attached (which shows that required 3 gbsyncd@<asic#> got spawned for LC with 3 ASICs)
|
Can you add any changes made to these files gearbox_config.json/context_config.json file in PR description as reference. |
@judyjoseph
Also added following Key notes to Description section:
|
|
One observation, may not be related to this PR, I see the gearbox/phy_config's in the hwsku directory also, are this needed ? ls -ltr /usr/share/sonic/hwsku/ |
- External PHY is managed via gearbox (gbsybcd docker container) in SONiC
- Enhanced 'External PHY management' from SONiC's single-ASIC environment to multi-ASIC
- Enhanced gbsyncd docker container from single Namespace to multi-Namspace mode
- Added gbsyncd.service.j2 on per_namespace basis.
- Each namepace/ASIC now to have its unique gbsyncd<ASIC#> docker container with its
own Gearbox table, redis-DB
Signed-off-by: Shyam Kumar <[email protected]>
Signed-off-by: Shyam Kumar [email protected]
Why I did it
Added gbsyncd.service.j2 on per_namespace basis.
Presently (in current codebase), only one instance of gbsyncd docker container is spawned so it works for/in LC in single-ASIC mode. However, for multi-ASIC mode, where there is a unique/separate Namespace for each ASIC, gbsyncd docker container too has to uniquely spawn in each Namespace.
How I did it
Created gbsyncd.service.j2 under per_namespace.
How to verify it
Key points:
Note: represents unique file for each PHY belonging to particular ASIC
Validated this on Cisco's 36x400G LC which has 3 ASICs.
root@localhost:/usr/share/sonic/device# docker ps | grep gbsyncdEnsured that unique gbsyncd (docker container) gets spawned in each ASIC Namespace.
Also checked that all required config files - gearbox related etc. - are placed under respective ASIC namespace.
effef3fd0000 docker-gbsyncd-cisco:latest "/usr/local/bin/supe…" 3 weeks ago Up 3 hours gbsyncd1
e3502dc0b08f docker-gbsyncd-cisco:latest "/usr/local/bin/supe…" 3 weeks ago Up 3 hours gbsyncd2
3191c2a51b43 docker-gbsyncd-cisco:latest "/usr/local/bin/supe…" 3 weeks ago Up 3 hours gbsyncd0
root@localhost:/usr/share/sonic/device#
root@localhost:/usr/share/sonic/device# docker exec -it gbsyncd1 bash
root@localhost:/#
root@localhost:/#
root@localhost:/# ls -ltr /usr/share/sonic/hwsku/
total 1113
-rw-r--r-- 1 root root 61 Feb 20 2017 sai.profile
-rw-r--r-- 1 root root 9237 Feb 20 2017 phy9_config_1.json
-rw-r--r-- 1 root root 9237 Feb 20 2017 phy8_config_1.json
-rw-r--r-- 1 root root 9237 Feb 20 2017 phy11_config_1.json
-rw-r--r-- 1 root root 9237 Feb 20 2017 phy10_config_1.json
-rw-r--r-- 1 root root 0 Feb 20 2017 pai.profile
-rw-r--r-- 1 root root 4233 Feb 20 2017 gearbox_config.json
-rw-r--r-- 1 root root 1634 Feb 20 2017 context_config.json
-rw-r--r-- 1 root root 8699 Jul 21 20:02 port_config.ini
-rw-r--r-- 1 root root 1052867 Jul 21 20:28 silicon_one.json
-rw-r--r-- 1 root root 9237 Jul 21 20:35 phy6_config_1.json
-rw-r--r-- 1 root root 9237 Jul 21 20:36 phy7_config_1.json
root@localhost:/#
Please refer to detail logs in this attachment:
Following is the output from Cisco's 36x400G LC loaded with gbsyncd multi-namespace changes:
UT-logs-gbsyncd-config-files-per-namespace.txt
It contains:
Which release branch to backport (provide reason below if selected)
Description for the changelog
Enhanced 'External PHY management' (gearbox) from SONiC's single-ASIC environment to multi-ASIC.
A picture of a cute animal (not mandatory but encouraged)