[acl/tc]: Add SET_TC (TC_ACTION) ACL rule action tests#26099
Open
AnantKishorSharma wants to merge 1 commit into
Open
[acl/tc]: Add SET_TC (TC_ACTION) ACL rule action tests#26099AnantKishorSharma wants to merge 1 commit into
AnantKishorSharma wants to merge 1 commit into
Conversation
Cover the TC_ACTION action (SAI SET_TC): - programmed (ipv4/ipv6): a FORWARD + TC_ACTION rule goes Active with SAI_ACL_ENTRY_ATTR_ACTION_SET_TC in ASIC_DB. - invalid_rejected: an out-of-range or non-numeric TC never goes Active. - dataplane (ipv4/ipv6): matched traffic egresses on the TC-mapped queue (UC<tc>); an unmatched flow does not. A custom TC_L3 table type advertises TC_ACTION (built-in L3 types do not). Signed-off-by: Anant Kishor Sharma <anant.kishor-sharma@hpe.com>
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This was referenced Jul 13, 2026
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
Add end-to-end tests for the
TC_ACTIONACL rule action (SAISAI_ACL_ENTRY_ATTR_ACTION_SET_TC) added in sonic-net/sonic-swss#4726.How I did it
Add
tests/acl/tc:test_acl_tc_action_programmed(ipv4/ipv6): aFORWARD+TC_ACTIONrule goes Active and the ASIC_DB ACL entry carriesSAI_ACL_ENTRY_ATTR_ACTION_SET_TC.test_acl_tc_action_invalid_rejected: an out-of-range (256) or non-numeric (ABC) TC value is rejected and never becomes Active.test_acl_tc_action_dataplane(ipv4/ipv6): matched traffic egresses on the TC-mapped unicast queue (e.g. UC3 for TC 3), while an unmatched control flow does not.A custom
TC_L3ACL table type advertisesTC_ACTION(the built-in L3 types do not);tc_acl_table.json/tc_acl_rules.jsondefine the table type and theFORWARD+TC_ACTIONrules.How to verify it
Run on a t0 testbed:
./run_tests.sh -c acl/tc/test_acl_tc.py -n <testbed> -d <dut>.Validated on a Broadcom TH5 (QFX5241) — 5/5 passed:
A composed
FORWARD+TC_ACTIONrule goes Active with ASIC_DBSAI_ACL_ENTRY_ATTR_ACTION_SET_TC = 3, invalid TC values are rejected, and all matched IPv4/IPv6 traffic lands on queue UC3.Related PRs: