sonic-buildimage
sonic-buildimage copied to clipboard
ERR syncd1#syncd: :- collectData: Failed to get attr of SAI_OBJECT_TYPE_ACL_COUNTER 0x109000000000ef2: -7
Description
When the everflow test everflow/test_everflow_testbed.py::TestEverflowV4IngressAclIngressMirror::test_everflow_basic_forwarding is run in master, the following errors messages are logged in syslog ERR syncd1#syncd: [07:00.0] SAI_API_ACL:brcm_sai_dnx_get_acl_counter_attribute:3768 Cannot read stats, counter not attached ACL entry acl_counter_id 0x300900000006, count 2 ERR syncd1#syncd: :- collectData: Failed to get attr of SAI_OBJECT_TYPE_ACL_COUNTER 0x109000000000ef2: -7
Steps to reproduce the issue:
- Run everflow/test_everflow_testbed.py::TestEverflowV4IngressAclIngressMirror::test_everflow_basic_forwarding
Describe the results you received:
Error messages in syslog
Describe the results you expected:
No error message
Output of show version
:
latest master with SAI 10.1.13.0
(paste your output here)
Output of show techsupport
:
(paste your output here or download and attach the file here )
Additional information you deem important (e.g. issue happens only occasionally):
In this test , bgp is shutdown first and then ever flow mirror with destination 2.2.2.2 is created. Since there is no route to mirror destination 2.2.2.2, the mirror is not activated and the mirror session is not created in sairedis/SAI. Then when the Acl rule is created with the action as the above everflow mirror created, the acl counter is created first in sairedis/SAI. But since the mirror was not activated, the acl rule is not created in sairedis/SAI . But the orchagent code registers the acl counter with flexcounter and the counter is polled every polling interval. But since the acl counter is not attached to any Acl rule, the BCM SAI prints error and returns SAI_STATUS_ITEM_NOT_FOUND. When the syncd/fleccounter.cpp sees this error, it prints the "collectData: Failed to get attr of SAI_OBJECT_TYPE_ACL_COUNTER " error. Both syslogs are introduced in master.
Possible fixes:
- Mask the syslogs
- Don't register the acl counter with flexcounter until the acl rule is created
The issue is seen only on master. not seen on 202205
Counters installed even though rule is not active