Skip to content

Comments

[ssw][ha] add ACTION_COUNTER to acl table type#4068

Merged
prsunny merged 3 commits intosonic-net:masterfrom
zjswhhh:acl_pr
Dec 19, 2025
Merged

[ssw][ha] add ACTION_COUNTER to acl table type#4068
prsunny merged 3 commits intosonic-net:masterfrom
zjswhhh:acl_pr

Conversation

@zjswhhh
Copy link
Contributor

@zjswhhh zjswhhh commented Dec 17, 2025

What I did

Add action counter to acl table type when creating initializing tunnel termination acl table.

sign-off: Jing Zhang zhangjing@microsoft.com

Why I did it
It's added for the acl rules but not for the table today.

How I verified it
This change was there for our HA development (on a custom branch) but missed on the master branch. It's verified in many demo sessions.

Details if related

Error logs if missing this PR:

2025 Dec 12 00:50:02.269248 switch1 ERR syncd#syncd: SAI_LOG|SAI_API_ACL: src/acl/sai_acl_cmd.cpp:86: ACL Table 0x380000000000003 does not support action SAI_ACL_ACTION_TYPE_COUNTER
2025 Dec 12 00:50:02.269248 switch1 ERR syncd#syncd: :- sendApiResponse: api SAI_COMMON_API_CREATE failed in syncd mode: SAI_STATUS_INVALID_PARAMETER
2025 Dec 12 00:50:02.269366 switch1 ERR syncd#syncd: :- processQuadEvent: attr: SAI_ACL_ENTRY_ATTR_TABLE_ID: oid:0x7000000000661
2025 Dec 12 00:50:02.269366 switch1 ERR syncd#syncd: :- processQuadEvent: attr: SAI_ACL_ENTRY_ATTR_PRIORITY: 9998
2025 Dec 12 00:50:02.269384 switch1 ERR syncd#syncd: :- processQuadEvent: attr: SAI_ACL_ENTRY_ATTR_ADMIN_STATE: true
2025 Dec 12 00:50:02.269426 switch1 ERR syncd#syncd: :- processQuadEvent: attr: SAI_ACL_ENTRY_ATTR_ACTION_COUNTER: oid:0x9000000015a72
2025 Dec 12 00:50:02.269426 switch1 ERR syncd#syncd: :- processQuadEvent: attr: SAI_ACL_ENTRY_ATTR_FIELD_DST_IP: 3.2.1.0&mask:255.255.255.255
2025 Dec 12 00:50:02.269426 switch1 ERR syncd#syncd: :- processQuadEvent: attr: SAI_ACL_ENTRY_ATTR_FIELD_TUNNEL_TERMINATED: true
2025 Dec 12 00:50:02.269443 switch1 ERR syncd#syncd: :- processQuadEvent: attr: SAI_ACL_ENTRY_ATTR_ACTION_REDIRECT: oid:0x400000000065c
2025 Dec 12 00:50:02.269711 switch1 ERR swss#orchagent: :- create: create status: SAI_STATUS_INVALID_PARAMETER
2025 Dec 12 00:50:02.269711 switch1 ERR swss#orchagent: :- createRule: Failed to create ACL rule Vnet_55_3.2.1.0/32_TUNN_TERM, rv:-5

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zjswhhh zjswhhh changed the title [ssw]] [ssw][ha] add ACTION_COUNTER to acl table type Dec 17, 2025
@zjswhhh zjswhhh marked this pull request as ready for review December 17, 2025 00:57
@zjswhhh zjswhhh requested a review from prsunny as a code owner December 17, 2025 00:57
Copilot AI review requested due to automatic review settings December 17, 2025 00:57
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug in the VNet tunnel termination ACL table initialization by adding ACTION_COUNTER to the list of supported actions in the ACL table type definition. Without this fix, when ACL rules attempt to use counters, the SAI layer rejects them with SAI_STATUS_INVALID_PARAMETER because the table type doesn't declare counter support.

Key Changes:

  • Added ACTION_COUNTER to the action_list in the VNetTunnelTermAcl::lazyInit() method
  • Updated ACL_TABLE_TYPE_ACTIONS to use the concatenated actions string that includes both REDIRECT_ACTION and COUNTER

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@zjswhhh zjswhhh requested a review from yue-fred-gao December 17, 2025 01:15
prsunny
prsunny previously approved these changes Dec 18, 2025
@prsunny
Copy link
Collaborator

prsunny commented Dec 18, 2025

Can you add a test coverage?

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prsunny prsunny merged commit 8aca780 into sonic-net:master Dec 19, 2025
16 checks passed
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202511: #4078

@zjswhhh zjswhhh deleted the acl_pr branch December 19, 2025 19:52
balanokia pushed a commit to balanokia/sonic-swss that referenced this pull request Dec 20, 2025
What I did

Add action counter to acl table type when creating initializing tunnel termination acl table.

sign-off: Jing Zhang zhangjing@microsoft.com

Why I did it
It's added for the acl rules but not for the table today.

How I verified it
This change was there for our HA development (on a custom branch) but missed on the master branch. It's verified in many demo sessions.
saravanan-nexthop pushed a commit to saravanan-nexthop/sonic-swss that referenced this pull request Dec 23, 2025
What I did

Add action counter to acl table type when creating initializing tunnel termination acl table.

sign-off: Jing Zhang zhangjing@microsoft.com

Why I did it
It's added for the acl rules but not for the table today.

How I verified it
This change was there for our HA development (on a custom branch) but missed on the master branch. It's verified in many demo sessions.
saravanan-nexthop pushed a commit to saravanan-nexthop/sonic-swss that referenced this pull request Dec 23, 2025
What I did

Add action counter to acl table type when creating initializing tunnel termination acl table.

sign-off: Jing Zhang zhangjing@microsoft.com

Why I did it
It's added for the acl rules but not for the table today.

How I verified it
This change was there for our HA development (on a custom branch) but missed on the master branch. It's verified in many demo sessions.

Signed-off-by: Saravanan Sellappa <saravanan@nexthop.ai>
Pterosaur pushed a commit to Janetxxx/sonic-swss that referenced this pull request Jan 6, 2026
What I did

Add action counter to acl table type when creating initializing tunnel termination acl table.

sign-off: Jing Zhang zhangjing@microsoft.com

Why I did it
It's added for the acl rules but not for the table today.

How I verified it
This change was there for our HA development (on a custom branch) but missed on the master branch. It's verified in many demo sessions.
arpit-nexthop pushed a commit to nexthop-ai/sonic-swss that referenced this pull request Jan 21, 2026
What I did

Add action counter to acl table type when creating initializing tunnel termination acl table.

sign-off: Jing Zhang zhangjing@microsoft.com

Why I did it
It's added for the acl rules but not for the table today.

How I verified it
This change was there for our HA development (on a custom branch) but missed on the master branch. It's verified in many demo sessions.
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to msft-202506: Azure/sonic-swss.msft#201

baorliu pushed a commit to baorliu/sonic-swss that referenced this pull request Feb 23, 2026
What I did

Add action counter to acl table type when creating initializing tunnel termination acl table.

sign-off: Jing Zhang zhangjing@microsoft.com

Why I did it
It's added for the acl rules but not for the table today.

How I verified it
This change was there for our HA development (on a custom branch) but missed on the master branch. It's verified in many demo sessions.

Signed-off-by: Baorong Liu <96146196+baorliu@users.noreply.github.com>
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.

5 participants