-
Notifications
You must be signed in to change notification settings - Fork 165
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
Mark sub-port interfaces as invalid ports in xcvrd #412
Merged
Conversation
This file contains 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
Signed-off-by: Mihir Patel <[email protected]>
@abdosi is there a better way to check for sub interface? |
@Junchao-Mellanox @keboliu could you review? |
@snider-nokia Please help to review this PR |
prgeor
approved these changes
Dec 15, 2023
@StormLiangMS, @yxieca - Can you please help in merging this to 202205, 202305 and 202311? |
mssonicbld
pushed a commit
to mssonicbld/sonic-platform-daemons
that referenced
this pull request
Dec 18, 2023
Signed-off-by: Mihir Patel <[email protected]>
Cherry-pick PR to 202305: #413 |
mssonicbld
pushed a commit
that referenced
this pull request
Dec 18, 2023
Signed-off-by: Mihir Patel <[email protected]>
mssonicbld
pushed a commit
to mssonicbld/sonic-platform-daemons
that referenced
this pull request
Jan 25, 2024
Signed-off-by: Mihir Patel <[email protected]>
Cherry-pick PR to 202205: #425 |
mssonicbld
pushed a commit
that referenced
this pull request
Jan 25, 2024
Signed-off-by: Mihir Patel <[email protected]>
mssonicbld
pushed a commit
to mssonicbld/sonic-platform-daemons
that referenced
this pull request
Feb 2, 2024
Signed-off-by: Mihir Patel <[email protected]>
Cherry-pick PR to 202311: #426 |
prgeor
pushed a commit
to mssonicbld/sonic-platform-daemons
that referenced
this pull request
Feb 15, 2024
Signed-off-by: Mihir Patel <[email protected]>
mssonicbld
pushed a commit
to mssonicbld/sonic-platform-daemons
that referenced
this pull request
Mar 4, 2024
Signed-off-by: Mihir Patel <[email protected]>
mssonicbld
pushed a commit
that referenced
this pull request
Mar 4, 2024
Signed-off-by: Mihir Patel <[email protected]>
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.
Description
Currently, the CmisManagerTask thread crashes with the below traceback when subport interfaces are created.
The above traceback is also seen while executing the sonic-mgmt sub_port_interfaces/test_show_subinterface.py::test_subinterface_status[port] testcase.
Motivation and Context
As part of dynamic sub-port interfaces creation (sub-port interfaces such as Ethernet1.X, Ethernet2.X are created), the STATE_DB gets a SET event and hence, CmisManagerTask handles the event.
However, since the get_port_mapping function (responsible for updating port relevant data such as asic_id, logical_to_asic etc) is only called during xcvrd boot-up, asic_id remains undefined for the sub-port interfaces ports as they are dynamically created.
Due to this, CmisManagerTask thread crashes since the asic_index is None for the sub-port interfaces ports.
sonic-platform-daemons/sonic-xcvrd/xcvrd/xcvrd.py
Line 1098 in 1c9b01d
In order to fix this issue, I am planning to mark the sub-port interfaces (port name contains '.') as invalid in port_mapping.py file since xcvrd does not need to handle such ports.
How Has This Been Tested?
Verified that xcvrd remains stable after sub-port interfaces are created dynamically.
Also ensure that the sonic-mgmt sub_port_interfaces/test_show_subinterface.py::test_subinterface_status[port] testcase is passing now.
Additional Information (Optional)
MSFT ADO - 25745106