[aclorch] add generic AclOrch::updateAclRule() method#1993
Merged
liat-grozovik merged 19 commits intosonic-net:masterfrom Nov 22, 2021
Merged
[aclorch] add generic AclOrch::updateAclRule() method#1993liat-grozovik merged 19 commits intosonic-net:masterfrom
liat-grozovik merged 19 commits intosonic-net:masterfrom
Conversation
Signed-off-by: Stepan Blyshchak <[email protected]>
Signed-off-by: Stepan Blyshchak <[email protected]>
Signed-off-by: Stepan Blyshchak <[email protected]>
Signed-off-by: Stepan Blyshchak <[email protected]>
Signed-off-by: Stepan Blyshchak <[email protected]>
Signed-off-by: Stepan Blyshchak <[email protected]>
Signed-off-by: Stepan Blyshchak <[email protected]>
Collaborator
|
@stepanblyschak, the changes looks to be significant. Is there any document covering this new change? Request @bingwang-ms and @anish-n to sign-off |
Contributor
Author
Contributor
|
Reviewing |
Contributor
Author
|
/azpw run |
Collaborator
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
bingwang-ms
reviewed
Nov 10, 2021
Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
…s into acl-rule-update
Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
…date Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
Contributor
|
Please ping me when the PR is ready for review. Thanks |
Contributor
Author
|
@bingwang-ms This PR is ready. |
bingwang-ms
reviewed
Nov 18, 2021
Signed-off-by: Stepan Blyshchak <[email protected]>
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This reverts commit eacb0c8.
Signed-off-by: Stepan Blyshchak <[email protected]>
This reverts commit 5b26cbc.
Contributor
Author
|
There is some issue with LGTM: |
bingwang-ms
approved these changes
Nov 19, 2021
Contributor
Author
|
/azpw run |
Collaborator
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azpw run |
Collaborator
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azpw run |
Collaborator
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
5 tasks
Janetxxx
pushed a commit
to Janetxxx/sonic-swss
that referenced
this pull request
Nov 10, 2025
- What I did I added generic AclOrch::updateAclRule() implementation. This implementation takes a newly constructed shared_ptr<AclRule> provided by the user, calculates a difference between priority, matches and actions and calls sai_acl_api->set_acl_entry_attribute() for those attributes that were changed. The derivatives of AclRule can customize the behaviour of AclRule::update(const AclRule& updatedRule) by polymorphic override, although in that case the derivative needs dynamic_cast the updatedRule to a concrete derivative type. Added unit test to cover update scenario. Currently this new API is not used by any clients nor handling ACL_RULE table updates. This API will be used by PBH ACL rule update flow. - Why I did it To support the scenario for updating PBH ACL rule in the future. - How I verified it Temporary changed the ACL_RULE table update to leverage this new API and tested updates through CONFIG_DB and unit test coverage. Signed-off-by: Stepan Blyshchak <[email protected]>
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.
What I did
I added generic AclOrch::updateAclRule() implementation. This implementation takes a newly constructed shared_ptr<AclRule> provided by the user, calculates a difference between priority, matches and actions and calls sai_acl_api->set_acl_entry_attribute() for those attributes that were changed. The derivatives of AclRule can customize the behaviour of AclRule::update(const AclRule& updatedRule) by polymorphic override, although in that case the derivative needs dynamic_cast the updatedRule to a concrete derivative type.
Added unit test to cover update scenario. Currently this new API is not used by any clients nor handling ACL_RULE table updates. This API will be used by PBH ACL rule update flow.
Why I did it
To support the scenario for updating PBH ACL rule in the future.
How I verified it
Temporary changed the ACL_RULE table update to leverage this new API and tested updates through CONFIG_DB and unit test coverage.
Details if related