-
Notifications
You must be signed in to change notification settings - Fork 547
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
[copporch]: fix the error when removing the copp group table. #1039
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: wangshengjun <wangshengjun@asterfusion.com>
a08ffe4
to
8939593
Compare
Right now we don't have COPP removal logic. Could you help add the corresponding unit tests? |
Signed-off-by: wangshengjun <wangshengjun@asterfusion.com>
The unit tests have committed, please take a review. To test the removal logic, #1038 must be merged. Or the copporch will trap into endless loop. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please check the comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you check the comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments
Signed-off-by: wangshengjun <wangshengjun@asterfusion.com>
…et#1039) generate xml, html and term report Signed-off-by: Guohan Lu <lguohan@gmail.com>
Signed-off-by: wangshengjun wangshengjun@asterfusion.com
What I did
Removing the trap ids first when removing the copp group table entry.
Why I did it
When the copporch received a DEL event from redis DB, it just recreate the trap id with defaul attribute.The creation operation fails because that it already exists.
If the copp group table was removed, the trap ids which associated with the table group should delete too, no just recreate them with default attribute.
How I verified it
root@48S-sdd:/etc/swss/config.d# cat 00-copp.config_add.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":"tr_tcm",
"cir":"600",
"cbs":"600",
"pir":"600",
"pbs":"600",
"red_action":"drop"
},
"OP": "SET"
}
]
root@48S-sdd:/etc/swss/config.d# cat 00-copp.config_del.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":"tr_tcm",
"cir":"600",
"cbs":"600",
"pir":"600",
"pbs":"600",
"red_action":"drop"
},
"OP": "DEL"
}
]
When i load the delection configuration, it throws out error as follows:
Aug 27 19:56:43.853405 48S-sdd NOTICE swss#orchagent: :- removePolicer: Remove policer for trap group trap.group.arp
Aug 27 19:56:43.853506 48S-sdd ERR swss#orchagent: :- meta_generic_validation_create: attribute key SAI_HOSTIF_TRAP_ATTR_TRAP_TYPE:8192; already exists, can't create
Aug 27 19:56:43.853608 48S-sdd ERR swss#orchagent: :- applyAttributesToTrapIds: Failed to create trap 8192, rv:-5
Aug 27 19:56:43.853699 48S-sdd ERR swss#orchagent: :- processCoppRule: Failed to reset traps to default trap group with default attributes
Aug 27 19:56:43.853788 48S-sdd ERR swss#orchagent: :- doTask: Processing copp task item failed, exiting
Details if related