sonic-swss
sonic-swss copied to clipboard
After reboot, ACL bound to VLAN interface does not work
when ACL is bound to VLAN interface and then user saves config and gives reboot. ACL will not work.
What I did ISSUE: when ACL is bound to VLAN interface and then user saves config and gives reboot. ACL will not work. RCA: After reboot, ACL is configured first and then VLAN is created. Due to this ordering issue, ACL table is created without being bound to the VLAN interface. FIX: When the VLAN interface is created, notification of port change is sent to ACLOrch Class. ACLOrch handles the notification and binds the ACL table to the VLAN interface post creation. Similarly, ACL needs to be removed from the VLAN before deleting the VLAN interface. Otherwise, VLAN deletion will fail due to reference count error.
Why I did it If Issue is not fixed, after reboot ACL bound to VLAN interface will not work. How I verified it Create ACL table with ACL rule to drop matching traffic Bind ACL table to Vlan interface <Vlan 25> Create VLAN 25 and bind members to VLAN after this. ACL counters bound to the VLAN interface should increment and packet should get dropped. root@sonic:~# aclshow -a RULE NAME TABLE NAME PRIO PACKETS COUNT BYTES COUNT acl_rule_001 acl_table_001 1 51560 5089600
Remove the ACL table Delete the VLAN interface. On deleting VLAN interface with ACL bound to it, error is seen in syslog and VLAN deletion fails. Details if related