Skip to content

[AclOrch] Dereg ACL Counters during ACL_TABLE Del Op#2574

Merged
prsunny merged 1 commit intosonic-net:masterfrom
vivekrnv:acl_dereg_flex
Dec 16, 2022
Merged

[AclOrch] Dereg ACL Counters during ACL_TABLE Del Op#2574
prsunny merged 1 commit intosonic-net:masterfrom
vivekrnv:acl_dereg_flex

Conversation

@vivekrnv
Copy link
Contributor

@vivekrnv vivekrnv commented Dec 16, 2022

Signed-off-by: Vivek Reddy Karri vkarri@nvidia.com

What I did

Deleting ACL Tables deletes all the associated Rules but it doesn't delete the associated counters.

Why I did it

{
    "ACL_TABLE_TYPE": {
        "CUSTOM_L3": {
            "MATCHES": [
                "IN_PORTS",
                "OUT_PORTS",
                "SRC_IP"
            ],
            "ACTIONS": [
                "PACKET_ACTION",
                "MIRROR_INGRESS_ACTION",
                "COUNTER"
            ],
            "BIND_POINTS": [
                "PORT"
            ]
        }
    },
    "ACL_RULE": {
        "DATAACL|RULE0": {
            "PRIORITY": "999",
            "PACKET_ACTION": "DROP",
            "SRC_IP": "1.1.1.1/32"
        }
    }
}

config acl add table DATAACL CUSTOM_L3 --description="DATAACL table" --stage=ingress

Delete the ACL Table: sudo config acl remove table DATAACL

Flex Counter Object is not removed

Dec 16 02:21:04.343646 r-leopard-32 ERR syncd#SDK: [SAI_ACL.ERR] mlnx_sai_acl.c[14363]- mlnx_acl_counter_get:  Failure to get counter in SDK - Entry Not Found
Dec 16 02:21:04.343646 r-leopard-32 ERR syncd#SDK: [SAI_UTILS.ERR] mlnx_sai_utils.c[1937]- get_dispatch_attribs_handler: Failed getting attrib SAI_ACL_COUNTER_ATTR_BYTES
Dec 16 02:21:04.343706 r-leopard-32 ERR syncd#SDK: [SAI_UTILS.ERR] mlnx_sai_utils.c[2074]- sai_get_attributes: Failed attribs dispatch
Dec 16 02:21:04.343706 r-leopard-32 WARNING syncd#SDK: :- collectAclCounterAttrs: Failed to get attr of ACL counter oid:0x90000000007ab: SAI_STATUS_ITEM_NOT_FOUND
root@r-leopard-32:/home/admin# redis-cli -n 2 hgetall "ACL_COUNTER_RULE_MAP"
1) "DATAACL:RULE0"
2) "oid:0x90000000007ab"

How I verified it

Applied the same config and verified if the Counter objects are deleted from the APPL_DB.

Details if related

Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
@prsunny prsunny merged commit 6185324 into sonic-net:master Dec 16, 2022
@vivekrnv vivekrnv deleted the acl_dereg_flex branch December 16, 2022 22:16
vivekrnv added a commit to vivekrnv/sonic-swss that referenced this pull request Dec 20, 2022
*Deleting ACL Tables deletes all the associated Rules but it doesn't delete the associated counters.
volodymyrsamotiy added a commit to volodymyrsamotiy/sonic-swss that referenced this pull request Dec 28, 2022
volodymyrsamotiy added a commit to volodymyrsamotiy/sonic-swss that referenced this pull request Dec 29, 2022
liat-grozovik pushed a commit that referenced this pull request Jan 3, 2023
…2582)

Backport #2574
*Deleting ACL Tables deletes all the associated Rules but it doesn't delete the associated counters.
StormLiangMS pushed a commit that referenced this pull request Feb 10, 2023
*Deleting ACL Tables deletes all the associated Rules but it doesn't delete the associated counters.
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
*Deleting ACL Tables deletes all the associated Rules but it doesn't delete the associated counters.
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