Skip to content

Populate the Voq system Port information for the local port when the Port is removed and created when the Speed is changed dynamically via GCU#3976

Merged
prsunny merged 7 commits intosonic-net:masterfrom
saksarav-nokia:saksarav-nokia-GCU-system-port
Nov 28, 2025
Merged

Populate the Voq system Port information for the local port when the Port is removed and created when the Speed is changed dynamically via GCU#3976
prsunny merged 7 commits intosonic-net:masterfrom
saksarav-nokia:saksarav-nokia-GCU-system-port

Conversation

@saksarav-nokia
Copy link
Copy Markdown
Contributor

@saksarav-nokia saksarav-nokia commented Nov 6, 2025

What I did
Fixed the issue reported in sonic-net/sonic-buildimage#24417
Added code to populate the system_port information in the New Port structure in orchagent portsorch after the Port is removed and created when the Port speed is changed via GCU patch.

Why I did it
When the switch is created, swss queries all the SYSTEM_PORTS from SAI and updates the PORT class/structure with the corresponding system_port info after the PortInitDone event is received from portsyncd.
Then the port speed is changed with 4 Lanes via GCU patch, the port is removed from SAI and created again in swss by calling deInitPort and initPort. But in initPort, the system_port info is not updated in the new PORT structure.
So when the RIF is created on local interface, the voqSyncAddIntf adds an entry in SYSTEM_INTERFACE table in CHASSIS_APP_DB with empty key since the system_port info is not populated for the local port. For the same reason, the SYSTEM_NEIGH info is also not updated in CHASSIS_APP_DB. This breaks the basic VOQ functionality

How I verified it
Verified that the VOQ functionality works as expected with the traffic with multi-asic after the GCU patch
Details if related

…Port is removed and created when the Speed is changed dynamically via GCU

Signed-off-by: saksarav <sakthivadivu.saravanaraj@nokia.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@saksarav-nokia
Copy link
Copy Markdown
Contributor Author

@arlakshm @vmittal-msft @deepak-singhal0408 @rlhui
I will open it for review after we do some basic testing with master image. We have tested only with msft-2405 and it looks good.

…e front panel port so the removePort will be successful

Signed-off-by: saksarav <sakthivadivu.saravanaraj@nokia.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@saksarav-nokia
Copy link
Copy Markdown
Contributor Author

/azpw run

@mssonicbld
Copy link
Copy Markdown
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: saksarav <sakthivadivu.saravanaraj@nokia.com>
@saksarav-nokia saksarav-nokia force-pushed the saksarav-nokia-GCU-system-port branch from 3d8f622 to 29019f9 Compare November 10, 2025 14:09
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@deepak-singhal0408
Copy link
Copy Markdown
Contributor

deepak-singhal0408 commented Nov 12, 2025

Thanks @saksarav-nokia . Solution looks good to me.

@saksarav-nokia
Copy link
Copy Markdown
Contributor Author

Verified the fix also in master

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@saksarav-nokia
Copy link
Copy Markdown
Contributor Author

saksarav-nokia commented Nov 13, 2025

Created Azure/sonic-swss.msft#167 for msft-2405

return;
}

if ((gMySwitchType == "voq") && (port.m_type == Port::PHY))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may need to be addressed as per this PR - #3847

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may need to be addressed as per this PR - #3847

@prsunny , The PR #3847 added the isChassisDbInUse check only if it needs to access the CHASSIS_DB. But the code changes in this PR doesn't read/write from CHASSIS_DB and it just reads from APP_DB and update the Port structure

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@prsunny prsunny merged commit 48e28b6 into sonic-net:master Nov 28, 2025
15 checks passed
kalash-nexthop pushed a commit to kalash-nexthop/sonic-swss that referenced this pull request Dec 16, 2025
…Port is removed and created when the Speed is changed dynamically via GCU (sonic-net#3976)

What I did
Fixed the issue reported in sonic-net/sonic-buildimage#24417
Added code to populate the system_port information in the New Port structure in orchagent portsorch after the Port is removed and created when the Port speed is changed via GCU patch.

Why I did it
When the switch is created, swss queries all the SYSTEM_PORTS from SAI and updates the PORT class/structure with the corresponding system_port info after the PortInitDone event is received from portsyncd.
Then the port speed is changed with 4 Lanes via GCU patch, the port is removed from SAI and created again in swss by calling deInitPort and initPort. But in initPort, the system_port info is not updated in the new PORT structure.
So when the RIF is created on local interface, the voqSyncAddIntf adds an entry in SYSTEM_INTERFACE table in CHASSIS_APP_DB with empty key since the system_port info is not populated for the local port. For the same reason, the SYSTEM_NEIGH info is also not updated in CHASSIS_APP_DB. This breaks the basic VOQ functionality

Signed-off-by: Kalash Nainwal <kalash@nexthop.ai>
Pterosaur pushed a commit to Janetxxx/sonic-swss that referenced this pull request Jan 6, 2026
…Port is removed and created when the Speed is changed dynamically via GCU (sonic-net#3976)

What I did
Fixed the issue reported in sonic-net/sonic-buildimage#24417
Added code to populate the system_port information in the New Port structure in orchagent portsorch after the Port is removed and created when the Port speed is changed via GCU patch.

Why I did it
When the switch is created, swss queries all the SYSTEM_PORTS from SAI and updates the PORT class/structure with the corresponding system_port info after the PortInitDone event is received from portsyncd.
Then the port speed is changed with 4 Lanes via GCU patch, the port is removed from SAI and created again in swss by calling deInitPort and initPort. But in initPort, the system_port info is not updated in the new PORT structure.
So when the RIF is created on local interface, the voqSyncAddIntf adds an entry in SYSTEM_INTERFACE table in CHASSIS_APP_DB with empty key since the system_port info is not populated for the local port. For the same reason, the SYSTEM_NEIGH info is also not updated in CHASSIS_APP_DB. This breaks the basic VOQ functionality
baorliu pushed a commit to baorliu/sonic-swss that referenced this pull request Feb 23, 2026
…Port is removed and created when the Speed is changed dynamically via GCU (sonic-net#3976)

What I did
Fixed the issue reported in sonic-net/sonic-buildimage#24417
Added code to populate the system_port information in the New Port structure in orchagent portsorch after the Port is removed and created when the Port speed is changed via GCU patch.

Why I did it
When the switch is created, swss queries all the SYSTEM_PORTS from SAI and updates the PORT class/structure with the corresponding system_port info after the PortInitDone event is received from portsyncd.
Then the port speed is changed with 4 Lanes via GCU patch, the port is removed from SAI and created again in swss by calling deInitPort and initPort. But in initPort, the system_port info is not updated in the new PORT structure.
So when the RIF is created on local interface, the voqSyncAddIntf adds an entry in SYSTEM_INTERFACE table in CHASSIS_APP_DB with empty key since the system_port info is not populated for the local port. For the same reason, the SYSTEM_NEIGH info is also not updated in CHASSIS_APP_DB. This breaks the basic VOQ functionality

Signed-off-by: Baorong Liu <96146196+baorliu@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

7 participants