-
Notifications
You must be signed in to change notification settings - Fork 525
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
[acl mirror action] Mirror session ref count fix at acl rule attachment #1761
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: Wenda Ni <wonda.ni@gmail.com>
Signed-off-by: wenda.ni <wenda.ni@bytedance.com>
wendani
changed the title
[mirror] Mirror session ref count fix at acl rule attachment
[acl mirror action] Mirror session ref count fix at acl rule attachment
Jun 1, 2021
prsunny
approved these changes
Jun 2, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, request @qiluo-msft to sign-off as original reviewer of #1486
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
qiluo-msft
approved these changes
Jun 3, 2021
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@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 <wenda.ni@bytedance.com>
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 <wenda.ni@bytedance.com>
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 <wenda.ni@bytedance.com>
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_AclBindMirror
Details if related
vs test failure before the change