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

Fix issues related to credo gbsyncd warm-reboot #3465

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

byu343
Copy link
Contributor

@byu343 byu343 commented Jan 13, 2025

What I did
Notify apply_view to all contexts for credo gbsyncd warm-reboot, which was only applied to the switch chip context by setting the target switch id to SAI_NULL_OBJECT_ID

In the init view mode in warm-reboot, port creation is not allowed because of https://github.com/sonic-net/sonic-sairedis/blob/master/syncd/Syncd.cpp#L2313. In warm-reboot, the ports for gearbox are firstly recovered on the driver layer
when create_switch happens based on the dump file of the driver layer. So for orchagent instead of re-creating the ports, querying SAI_SWITCH_ATTR_PORT_LIST on the switch object would obtain the list of ports available in the driver layer, and orchagent only needs to populate its data structures for ports based on the return and set certain attributes to the ports.

Why I did it
This is to fix issues in sonic-swss that block the warm-reboot support of credo gbsyncd.

How I verified it
We tested warm-reboot on x86_64-arista_7060dx5_64s which needs the credo gbsyncd.

Details if related

Change the target switch id to null to executing applying view on all contexts,
which was only executed on the ASIC syncd context
In init view mode which is part of warm-reboot, port creation is not allowed
because of https://opengrok.infra.corp.arista.io/source/xref/arsonic-202405/sonic-buildimage/src/sonic-sairedis/syncd/Syncd.cpp?r=&mo=71237&fi=2169#2240

In warm-reboot, the ports for gearbox are firstly recovered on the driver layer
by create_switch based on the dump file of the driver layer.
Then in orchagent, instead of re-creating the ports, querying SAI_SWITCH_ATTR_PORT_LIST
on the switch object would obtain the list of ports available in the driver layer, and
orchagent only needs to populate its data structures for ports based on the return and
set certain attributes to the ports.
@byu343 byu343 requested a review from prsunny as a code owner January 13, 2025 23:57
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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.

2 participants