Skip to content
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

[202205][cherry-pick] Fix mux_acl_rule adding issue #2358

Merged
merged 1 commit into from
Jun 28, 2022

Conversation

bingwang-ms
Copy link
Contributor

What I did
This PR is to cherry-pick #2356 to 202205 branch. The cherry-pick is clean, no conflict is found.
This PR is to fix the issue of adding mux_acl_rule into IngressTableDrop.
The error log is

 Jun 25 08:02:37.159020 svcstr-7050-acs-4 ERR swss#orchagent: :- validateAclRuleMatch: Match SAI_ACL_ENTRY_ATTR_FIELD_IN_PORTS in rule mux_acl_rule is not supported by table IngressTableDrop

PR #2341 added support for different matching field in different stage (INGRESS/EGRESS). For example, SAI_ACL_ENTRY_ATTR_FIELD_IN_PORTS is only supported at INGRESS stage.

However, PR #2341 only handled one path for creating ACL table, that is by CONFIG_DB entry.
There is a case that addAclTable is directly called from other orch, such as MuxOrch. In that case, the stage dependent matcing field is not added. As a resule, we will see the above error logs.
To address the issue, I moved the call of addStageMandatoryMatchFields from doAclTableTask to addAclTable to ensure addStageMandatoryMatchFields is always called.
Please be noted that addMandatoryActions is called from both doAclTableTask and addAclTable to ensure the validation of ACL table is passing.

Why I did it
To fix ACL rule issue for mux.

How I verified it

  1. Verified by running test_pfcwd
  2. Verified by checking syslog

Details if related

Signed-off-by: bingwang <wang.bing@microsoft.com>
@bingwang-ms bingwang-ms changed the title Fix mux_acl_rule adding issue [202205][cherry-pick] Fix mux_acl_rule adding issue Jun 28, 2022
@yxieca yxieca merged commit 5ab84cf into sonic-net:202205 Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants