commit 9279f2ef9ddb2eb39fc8756f342d19a46e6abd18
parent a7f69a111118f472a4723163d32d3b304fe813f3
Author: Broadcom SDK Release <sdk.releases@broadcom.com>
Date: Tue, 2 Apr 2019 16:45:09 -0700
SDK-175125: Resolve the incorrect mutex unlock for MMU counters reside in mul...
Devices: 56980_B0
Module: stat
Symptom:
Drop Counters has random high number even when no traffic through
logical port 1 on Tomahawk3
Resolve the incorrect mutex unlock for MMU counters reside in multiple-
instance counter tables, where the incorrect mutex unlcok causes DMA
buffer overwritten by other counter collection routines.
Diffstat:
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/sdk-6.5.16/src/soc/common/counter.c b/sdk-6.5.16/src/soc/common/counter.c
@@ -15193,6 +15193,16 @@ soc_counter_collect_th_non_dma_entries(int unit,
non_dma++;
continue;
}
+#ifdef BCM_TOMAHAWK3_SUPPORT
+ if (SOC_IS_TOMAHAWK3(unit)) {
+ if ((non_dma->flags & _SOC_COUNTER_NON_DMA_DO_DMA) &&
+ count == 0) {
+ COUNTER_UNLOCK(unit);
+ sal_thread_yield();
+ COUNTER_LOCK(unit);
+ }
+ } else
+#endif
if (non_dma->flags & _SOC_COUNTER_NON_DMA_DO_DMA) {
COUNTER_UNLOCK(unit);
sal_thread_yield();