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

[ACL] Display rule and table info written to APP DB #61

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vivekrnv
Copy link
Owner

What I did

Currently, show and dump CLI only show entries from CONFIG_DB. A lot of new features write ACL Rules to APPL_DB. Thus it is imperative that the CLI's should be updated to display ACL tables and rules from APPL_DB

How I did it

How to verify it

  1. UT's
  2. Manual Testing by writing ACL rules to APPL_DB

ACl rules written to APPL_DB

root@sonic:/home/admin# sonic-db-cli APPL_DB KEYS "*ENI*"
ACL_TABLE_TYPE_TABLE:ENI_REDIRECT
ACL_RULE_TABLE:ENI:Vnet100_F4939FEFC47E_OUT
ACL_TABLE_TABLE:ENI
ACL_RULE_TABLE:ENI:Vnet100_F4939FEFC47E_IN

Show CLI

root@sonic/home/admin# show acl table ENI
Name    Type          Binding      Description                                  Stage    Status
------  ------------  -----------  -------------------------------------------  -------  --------
ENI     ENI_REDIRECT  Ethernet64   Contains Rule for DASH ENI Based Forwarding  ingress  Active
                      Ethernet72
                      Ethernet104
                      Ethernet112
                      Ethernet120
                      Ethernet128
                      Ethernet136
                      Ethernet144
                      Ethernet152
                      Ethernet160
                      Ethernet168
                      Ethernet176
                      Ethernet184
                      Ethernet192
                      Ethernet200
                      Ethernet208
                      Ethernet216

root@sonic:/home/admin# show acl rule
Table    Rule                      Priority    Action              Match                Status
-------  ------------------------  ----------  ------------------  -------------------  --------
ENI      Vnet100_F4939FEFC47E_OUT  9997        REDIRECT: 10.0.0.1  DST_IP: 10.2.0.1/32  Active
                                                                   TUNNEL_VNI: 4321
ENI      Vnet100_F4939FEFC47E_IN   9996        REDIRECT: 10.0.0.1  DST_IP: 10.2.0.1/32  Active

Dump CLI

root@sonic:/home/admin# dump state acl_rule ENI:Vnet100_F4939FEFC47E_IN --key-map
{
    "ENI:Vnet100_F4939FEFC47E_IN": {
        "CONFIG_DB": {
            "keys": [],
            "tables_not_found": []
        },
        "APPL_DB": {
            "keys": [
                "ACL_RULE_TABLE:ENI:Vnet100_F4939FEFC47E_IN"
            ],
            "tables_not_found": []
        },
        "ASIC_DB": {
            "keys": [
                "ASIC_STATE:SAI_OBJECT_TYPE_ACL_COUNTER:oid:0x9000000000694",
                "ASIC_STATE:SAI_OBJECT_TYPE_ACL_ENTRY:oid:0x8000000000695",
                "ASIC_STATE:SAI_OBJECT_TYPE_ACL_ENTRY:oid:0x8000000000697"
            ],
            "tables_not_found": [],
            "vidtorid": {
                "oid:0x9000000000694": "oid:0x381ff000f0009",
                "oid:0x8000000000695": "oid:0x30008",
                "oid:0x8000000000697": "oid:0x100030008"
            }
        }
    }
}

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

Signed-off-by: Vivek Reddy <vkarri@nvidia.com>
@vivekrnv vivekrnv requested a review from dgsudharsan December 31, 2024 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant