Enhance CMIS DP decommissioning to be on a per-logical-port basis - #663
Open
longhuan-cisco wants to merge 4 commits into
Open
Enhance CMIS DP decommissioning to be on a per-logical-port basis#663longhuan-cisco wants to merge 4 commits into
longhuan-cisco wants to merge 4 commits into
Conversation
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
longhuan-cisco
force-pushed
the
decomm_p2
branch
from
August 17, 2025 00:11
90fc06a to
f7377f2
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances CMIS decommissioning to operate on a per-logical-port basis instead of per-physical-port, and fixes a port event caching issue that could drop DEL events.
- Implements per-logical-port decommissioning by identifying minimal host lanes requiring decommission for each logical port
- Fixes PortChangeObserver event caching to prevent DEL events from being dropped in back-to-back DEL/SET sequences
- Adds validation to check Active Control Set for correct application code updates
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| sonic-xcvrd/xcvrd/xcvrd_utilities/port_event_helper.py | Updates event caching to use deque with maxlen=2 and preserves DEL events followed by SET events |
| sonic-xcvrd/xcvrd/xcvrd.py | Refactors decommissioning logic to work per-logical-port, adds new methods for host lane mask calculation and active application validation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Contributor
Author
|
Hi @prgeor @mihirpat1 could you please review, thanks |
Contributor
|
@longhuan-cisco Are you planning to update the patch with latest code, code seems to have changed a lot and this patch doesn't apply? I would like to try the changes if its available? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Will update/add UT code later
Description
For each logical port, identify the configured data path(s) (in Active Control Set) that share host lanes with this logical port and have conflicting appl codes. Then mark as decomm_pending for the lanes belonging to the conflicting data path(s), and this would be the minimal set of host lanes that require decommissioning to allow the given logical port to apply its new appl code without facing config error. If other logical ports are already in the progress of decommission on the lanes overlapping with this logical port, put it on hold util other logical ports' done decommissioning.
Motivation and Context
How Has This Been Tested?
Additional Information (Optional)