switch-trimming global config capability check#3730
Open
anilkpan wants to merge 5 commits intosonic-net:masterfrom
Open
switch-trimming global config capability check#3730anilkpan wants to merge 5 commits intosonic-net:masterfrom
anilkpan wants to merge 5 commits intosonic-net:masterfrom
Conversation
Allow switch trimming global config even when some parameters capabilities are not supported.
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This reverts commit 417eb61.
Collaborator
|
/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). |
Collaborator
|
can you check on coverage? |
developfast
requested changes
Jun 30, 2025
|
|
||
| bool SwitchTrimmingCapabilities::isSwitchTrimmingQueueSetSupported() const | ||
| { | ||
| return capabilities.mode.isStaticModeSupported && capabilities.queue.isAttrSupported; |
Contributor
There was a problem hiding this comment.
why does queue index setting require static mode support specifically?
| if (trimCap.isSwitchTrimmingSizeSetSupported()) | ||
| { | ||
| if (!tObj.size.is_set || (tObj.size.value != trim.size.value)) | ||
| if (trim.size.is_set) |
Contributor
There was a problem hiding this comment.
this doesn't handle the case where trim.queue.index.is_set is false but tObj.queue.index.is_set is true. possibly add an else block with appropriate error handling for consistency.
Collaborator
|
These changes violate the original HLD proposal. I would prefer to avoid such a changes. In case some vendor needs to bypass it - we might need to think about the vendor specific capabilities check. |
Collaborator
|
Please rebase the PR on top of: #3705 |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Allow switch trimming global config even when some parameters capabilities are not supported.
What I did
Included changes from the following PR:
#3594