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

Copp: trap group SET, DEL and SET fails #1187

Open
rajkumar38 opened this issue Jan 29, 2020 · 0 comments
Open

Copp: trap group SET, DEL and SET fails #1187

rajkumar38 opened this issue Jan 29, 2020 · 0 comments

Comments

@rajkumar38
Copy link
Contributor

Steps:

  1. Load 00-copp.config.json.

  2. Initiate DEL for one of the trap group.
    root@sonic:/# cat arp.json
    [
    {
    "COPP_TABLE:trap.group.arp": {
    "trap_ids": "arp_req,arp_resp,neigh_discovery",
    "trap_action":"copy",
    "trap_priority":"4",
    "queue": "3",
    "meter_type":"packets",
    "mode":"sr_tcm",
    "cir":"900",
    "cbs":"900",
    "red_action":"drop"
    },
    "OP": "DEL"
    }
    ]

  3. Re-Create the trap group
    root@sonic:/# cat arp.json
    [
    {
    "COPP_TABLE:trap.group.arp": {
    "trap_ids": "arp_req,arp_resp,neigh_discovery",
    "trap_action":"copy",
    "trap_priority":"4",
    "queue": "3",
    "meter_type":"packets",
    "mode":"sr_tcm",
    "cir":"900",
    "cbs":"900",
    "red_action":"drop"
    },
    "OP": "SET"
    }
    ]

Looking copporch.cpp, after Step(2), trap-ids are mapped to default trap group and while adding back we may have to remove from default trap-group and add it in new trap-group.

Logs:
Dec 13 23:15:04.558399 sonic NOTICE swss#orchagent: :- removePolicer: Remove policer for trap group trap.group.arp

Dec 13 23:47:37.116287 sonic NOTICE swss#swssconfig: :- main: Loading config from JSON file:arp.json...
Dec 13 23:47:37.120427 sonic NOTICE swss#orchagent: :- processCoppRule: Create host interface trap group trap.group.arp
Dec 13 23:47:37.121070 sonic NOTICE swss#orchagent: :- createPolicer: Create policer for trap group trap.group.arp
Dec 13 23:47:37.121070 sonic NOTICE swss#orchagent: :- createPolicer: Bind policer to trap group trap.group.arp:
Dec 13 23:47:37.121070 sonic ERR swss#orchagent: :- meta_generic_validation_create: attribute key SAI_HOSTIF_TRAP_ATTR_TRAP_TYPE:8192; already exists, can't create
Dec 13 23:47:37.121391 sonic ERR swss#orchagent: :- applyAttributesToTrapIds: Failed to create trap 8192, rv:-5
Dec 13 23:47:37.121552 sonic ERR swss#orchagent: :- doTask: Processing copp task item failed, exiting.

EdenGri pushed a commit to EdenGri/sonic-swss that referenced this issue Feb 28, 2022
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

No branches or pull requests

1 participant