[syncd] Add pre match logic for acl entry#1240
Conversation
|
|
||
| if (obj.second->getObjectType() == SAI_OBJECT_TYPE_ACL_TABLE_GROUP) | ||
| if (obj.second->getObjectType() == SAI_OBJECT_TYPE_ACL_TABLE_GROUP || | ||
| obj.second->getObjectType() == SAI_OBJECT_TYPE_ACL_ENTRY) |
There was a problem hiding this comment.
Why is this change needed? Wouldn't cretePreMatchForAclEntries be sufficient to match right ACLs?
There was a problem hiding this comment.
no, since ACL_ENTRY is leaf object
| auto cPrio = cAclEntry->getSaiAttr(SAI_ACL_ENTRY_ATTR_PRIORITY); | ||
| auto tPrio = tAclEntry->getSaiAttr(SAI_ACL_ENTRY_ATTR_PRIORITY); | ||
|
|
||
| if (cPrio->getStrAttrValue() != tPrio->getStrAttrValue()) |
There was a problem hiding this comment.
Rookie question: are ACL priorities guaranteed to be always unique? If not, then we will likely run into same issue again.
There was a problem hiding this comment.
no they are not guaranteed in general, but sonic make sure that they are, since we want to control the right order of the acl, so having 2 acls with the same priority not guarantee the order of them
vaibhavhd
left a comment
There was a problem hiding this comment.
Please wait for Ying or Sai's review before merge.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
this will test scenario where we have 1 acl entry with counter and after warm boot 2 acl entries and 2 counters the same which could end up matching wrong acl counter and causing fail "object exist" on broadcom acl entry set, which will require improve pre match logic for acl entry
|
This commit could not be cleanly cherry-picked to 202012. Please submit another PR. |
|
@kcudnik please raise a separate PR for 202012 branch |
this will test scenario where we have 1 acl entry with counter and after warm boot 2 acl entries and 2 counters the same which could end up matching wrong acl counter and causing fail "object exist" on broadcom acl entry set, which will require improve pre match logic for acl entry
|
Manually cherry-pick PR created: #1257 |
this will test scenario where we have 1 acl entry with counter and after warm boot 2 acl entries and 2 counters the same which could end up matching wrong acl counter and causing fail "object exist" on broadcom acl entry set, which will require improve pre match logic for acl entry
this will test scenario where we have 1 acl entry with counter and after warm boot 2 acl entries and 2 counters the same which could end up matching wrong acl counter and causing fail "object exist" on broadcom acl entry set, which will require improve pre match logic for acl entry
this will test scenario where we have 1 acl entry with counter and after warm boot 2 acl entries and 2 counters the same which could end up matching wrong acl counter and causing fail "object exist" on broadcom acl entry set, which will require improve pre match logic for acl entry
…3333) Description Add a check for ensuring mirror session ACLs are programmed to ASIC What is the issue? This fix is to address an issue where an ACL is added to CONFIG_DB, but before it could be programmed to ASIC, Orchagent is paused. This leads to APPLY_VIEW failure when base image OA could not process this ACL entry and target image's OA still creates it. The issue has an image fix available at sonic-net/sonic-sairedis#1240 This issue is very rare, and has been caught by upgrade path tests only once in thousands of iterations. What is this fix? A new logic is added to check if mirror session ACLs for arp and nd are added to ASIC.. ACLs are looked into ASIC_DB and matched using SAI_ACL_ENTRY_ATTR_PRIORITY attribute. SAI_ACL_ENTRY_ATTR_PRIORITY for arp ACL is 8888 and for nd is 8887 If one of the ACLs is found missing then warmboot is aborted. Tested on physical testbed running 202311 and master
…onic-net#3333) Description Add a check for ensuring mirror session ACLs are programmed to ASIC What is the issue? This fix is to address an issue where an ACL is added to CONFIG_DB, but before it could be programmed to ASIC, Orchagent is paused. This leads to APPLY_VIEW failure when base image OA could not process this ACL entry and target image's OA still creates it. The issue has an image fix available at sonic-net/sonic-sairedis#1240 This issue is very rare, and has been caught by upgrade path tests only once in thousands of iterations. What is this fix? A new logic is added to check if mirror session ACLs for arp and nd are added to ASIC.. ACLs are looked into ASIC_DB and matched using SAI_ACL_ENTRY_ATTR_PRIORITY attribute. SAI_ACL_ENTRY_ATTR_PRIORITY for arp ACL is 8888 and for nd is 8887 If one of the ACLs is found missing then warmboot is aborted. Tested on physical testbed running 202311 and master
…onic-net#3333) Description Add a check for ensuring mirror session ACLs are programmed to ASIC What is the issue? This fix is to address an issue where an ACL is added to CONFIG_DB, but before it could be programmed to ASIC, Orchagent is paused. This leads to APPLY_VIEW failure when base image OA could not process this ACL entry and target image's OA still creates it. The issue has an image fix available at sonic-net/sonic-sairedis#1240 This issue is very rare, and has been caught by upgrade path tests only once in thousands of iterations. What is this fix? A new logic is added to check if mirror session ACLs for arp and nd are added to ASIC.. ACLs are looked into ASIC_DB and matched using SAI_ACL_ENTRY_ATTR_PRIORITY attribute. SAI_ACL_ENTRY_ATTR_PRIORITY for arp ACL is 8888 and for nd is 8887 If one of the ACLs is found missing then warmboot is aborted. Tested on physical testbed running 202311 and master
this will test scenario where we have 1 acl entry with counter and after
warm boot 2 acl entries and 2 counters the same which could end up
matching wrong acl counter and causing fail "object exist" on broadcom
acl entry set, which will require improve pre match logic for acl entry
ADO: 17914573