COPP_DEL_fix: op="DEL" for one trap group from SONIC is resetting all the … #1273
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.
…trap IDs
What I did
Called hostif trap remove only for those trap IDs which belong to the trap group for which op="DEL" is set.
Why I did it
hostif trap remove was being called for all the trap IDs belonging to all trap groups. It was resetting all trap IDs to the default trap group configurations.
How I verified it
Followed below steps:
1)Loaded the COPP configuration "00-copp.config.json".
2)Verified that the rate limit and queue mapping for every trap ID is correct .
3)Loaded the below mentioned configuration (with op = "DEL") for the trap group(arp) using
swssconfig command.
[(no_arp.json)]
[
{
"COPP_TABLE:trap.group.arp": {
"trap_ids": "arp_req,arp_resp,neigh_discovery",
"trap_action":"copy",
"trap_priority":"4",
"queue": "4",
"meter_type":"packets",
"mode":"sr_tcm",
"cir":"600",
"cbs":"600",
"red_action":"drop"
},
"OP": "DEL"
}
]
4) Only the trap IDs belonging to the arp trap group are getting reset to the default trap group configuration. Rest of the trap IDs belonging to other trap groups still have their corresponding configuration.
5) All these verification are done through the ASIC CLI and sending corresponding packets.
Details if related