-
Notifications
You must be signed in to change notification settings - Fork 345
Description
The current FlexCounter.cpp implementation assumes that all interfaces share the same counter support. This is seen in:
sonic-sairedis/syncd/FlexCounter.cpp
Line 908 in 2457bb8
| updateSupportedCounters(rids[0]/*it is not really used*/, allCounterIds, effective_stats_mode); |
This works for some platforms but not all - for example, Broadcom platforms. Broadcom platforms have multiple types of interfaces, usually hooked up to separate cores on the ASIC. This gives the ports different counter capabilities.
The current implementation would check counter capability on the first port and assumes all other ports have the same capabilities. This causes any counter read to result in no counters being stored to COUNTERS_DB as the SAI counter read in VendorSai->getStats() will return a SAI_STATUS_FAILURE status.
sonic-sairedis/syncd/FlexCounter.cpp
Line 1680 in 2457bb8
| if (status != SAI_STATUS_SUCCESS) |
A way to dynamically discover the counter capabilities of each interface is needed for counters to work properly on Broadcom platforms.