[acl mirror action] Mirror session ref count fix at acl rule attachment#1761
Merged
prsunny merged 6 commits intosonic-net:masterfrom Jul 3, 2021
Merged
[acl mirror action] Mirror session ref count fix at acl rule attachment#1761prsunny merged 6 commits intosonic-net:masterfrom
prsunny merged 6 commits intosonic-net:masterfrom
Conversation
Signed-off-by: Wenda Ni <[email protected]>
Signed-off-by: wenda.ni <[email protected]>
prsunny
approved these changes
Jun 2, 2021
Collaborator
prsunny
left a comment
There was a problem hiding this comment.
lgtm, request @qiluo-msft to sign-off as original reviewer of #1486
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
qiluo-msft
approved these changes
Jun 3, 2021
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
@wendani , can you force-push? |
qiluo-msft
pushed a commit
to sonic-net/sonic-buildimage
that referenced
this pull request
Jul 5, 2021
[flex-counters] Delay flex counters stats init for faster boot time (sonic-net/sonic-swss#1803) [mirror] Detach session dst ip from route orch LPM calculation regardless of session status at session CONFIG DB removal (sonic-net/sonic-swss#1800) [Dynamic Buffer Calc] Support dynamic buffer calculation on top of port auto negotiation (sonic-net/sonic-swss#1762) [neighorch] VOQ encap index change handling (sonic-net/sonic-swss#1729) [neighorch] Mac for voq neighbors in VS platforms (sonic-net/sonic-swss#1724) [acl mirror action] Mirror session ref count fix at acl rule attachment (sonic-net/sonic-swss#1761)
judyjoseph
pushed a commit
to sonic-net/sonic-buildimage
that referenced
this pull request
Aug 7, 2021
[flex-counters] Delay flex counters stats init for faster boot time (sonic-net/sonic-swss#1803) [mirror] Detach session dst ip from route orch LPM calculation regardless of session status at session CONFIG DB removal (sonic-net/sonic-swss#1800) [Dynamic Buffer Calc] Support dynamic buffer calculation on top of port auto negotiation (sonic-net/sonic-swss#1762) [neighorch] VOQ encap index change handling (sonic-net/sonic-swss#1729) [neighorch] Mac for voq neighbors in VS platforms (sonic-net/sonic-swss#1724) [acl mirror action] Mirror session ref count fix at acl rule attachment (sonic-net/sonic-swss#1761)
carl-nokia
pushed a commit
to carl-nokia/sonic-buildimage
that referenced
this pull request
Aug 7, 2021
[flex-counters] Delay flex counters stats init for faster boot time (sonic-net/sonic-swss#1803) [mirror] Detach session dst ip from route orch LPM calculation regardless of session status at session CONFIG DB removal (sonic-net/sonic-swss#1800) [Dynamic Buffer Calc] Support dynamic buffer calculation on top of port auto negotiation (sonic-net/sonic-swss#1762) [neighorch] VOQ encap index change handling (sonic-net/sonic-swss#1729) [neighorch] Mac for voq neighbors in VS platforms (sonic-net/sonic-swss#1724) [acl mirror action] Mirror session ref count fix at acl rule attachment (sonic-net/sonic-swss#1761)
judyjoseph
pushed a commit
that referenced
this pull request
Aug 10, 2021
…nt (#1761) * Fix mirror session ref count at acl rule attachement Signed-off-by: wenda.ni <[email protected]>
qiluo-msft
pushed a commit
that referenced
this pull request
Sep 1, 2021
…nt (#1761) * Fix mirror session ref count at acl rule attachement Signed-off-by: wenda.ni <[email protected]>
raphaelt-nvidia
pushed a commit
to raphaelt-nvidia/sonic-swss
that referenced
this pull request
Oct 5, 2021
…nt (sonic-net#1761) * Fix mirror session ref count at acl rule attachement Signed-off-by: wenda.ni <[email protected]>
Janetxxx
pushed a commit
to Janetxxx/sonic-swss
that referenced
this pull request
Nov 10, 2025
…nt (sonic-net#1761) * Fix mirror session ref count at acl rule attachement Signed-off-by: wenda.ni <[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.
Why I did it
Retry logic was introduced to ACL rule mirror action in #1486
This assumes that mirror session may not be ready when the associated ACL rule is processed.
If mirror entry exists (CONFIG_DB processed) but mirror session is not created in sai/asic,
AclRuleMirror::create()is called twice, one at processing CONFIG_DB ACL rule config, and one at later mirror session activation notify (i.e., mirror session creation event in sai/asic). In this case, mirror session reference count is incremented twice for the same rule, and mirror session removal will fail due to non-zero ref count even if ACL rule is removed.What I did
This PR fixes the above scenario.
How I verified it
Fix is validated by developing vs test, which is piggy-backed onto
test_AclBindMirrorDetails if related
vs test failure before the change