[COPP]If copp group is configured using cfgdb, duplicate trapids will… #2509
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.
… appear in appdb.
Signed-off-by: qiuyupeng qiuyupeng@git.asterfusion.com
What I did
deleting some code about updating cache in coppmgr
Why I did it
It is repetitive and affects subsequent logical judgments
The same code in the next few lines,so i delete it。
1、creating a copp trap group in cfg_db
hset COPP_GROUP|queue7_group7 trap_action copy trap_priority 7 queue 7 "meter_type" "bytes" "mode" "tr_tcm" "cir" "4096000" "cbs" "64000" "pir" "8192000" "pbs" "128000" "red_action" "drop"
2、let arp bind the new group
HSET COPP_TRAP|arp trap_group queue7_group7
3、the old group not del the trap_id(arp) in app db.
127.0.0.1:6379> hgetall "COPP_TABLE:queue7_group7"
127.0.0.1:6379> hgetall "COPP_TABLE:queue5_group1"
127.0.0.1:6379>
How I verified it
1、creating a copp trap group in cfg_db
hset COPP_GROUP|queue7_group7 trap_action copy trap_priority 7 queue 7 "meter_type" "bytes" "mode" "tr_tcm" "cir" "4096000" "cbs" "64000" "pir" "8192000" "pbs" "128000" "red_action" "drop"
2、let arp bind the new group
HSET COPP_TRAP|arp trap_group queue7_group7
3、arp only appears in queue7_group7
127.0.0.1:6379> hgetall "COPP_TABLE:queue5_group1"
127.0.0.1:6379> hgetall "COPP_TABLE:queue7_group7"
Details if related