[ONOS-6480] Bug fix in NewAdaptiveFlowStatsCollector.java
Change-Id: I2750fda80ed1951256c5d71d923141979e39d876
diff --git a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/NewAdaptiveFlowStatsCollector.java b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/NewAdaptiveFlowStatsCollector.java
index 8d885a1..392dbcc 100644
--- a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/NewAdaptiveFlowStatsCollector.java
+++ b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/NewAdaptiveFlowStatsCollector.java
@@ -230,7 +230,7 @@
callCountCalAndShortFlowsTask += CAL_AND_POLL_TIMES;
isFirstTimeStart = false;
- } else if (callCountCalAndShortFlowsTask == ENTIRE_POLL_TIMES) {
+ } else if (callCountCalAndShortFlowsTask >= ENTIRE_POLL_TIMES) {
// entire_poll_times, get entire flow stats from a given switch sw
log.trace("CalAndShortFlowsTask Collecting Entire AdaptiveStats for {}", sw.getStringId());
ofFlowStatsRequestAllSend();
@@ -347,7 +347,7 @@
log.trace("MidFlowsTask Collecting AdaptiveStats for {}", sw.getStringId());
// skip collecting because CalAndShortFlowsTask collects entire flow stats from a given switch sw
- if (callCountMidFlowsTask == ENTIRE_POLL_TIMES) {
+ if (callCountMidFlowsTask >= ENTIRE_POLL_TIMES) {
callCountMidFlowsTask = MID_POLL_TIMES;
} else {
midFlowsTaskInternal();
@@ -368,7 +368,7 @@
log.trace("LongFlowsTask Collecting AdaptiveStats for {}", sw.getStringId());
// skip collecting because CalAndShortFlowsTask collects entire flow stats from a given switch sw
- if (callCountLongFlowsTask == ENTIRE_POLL_TIMES) {
+ if (callCountLongFlowsTask >= ENTIRE_POLL_TIMES) {
callCountLongFlowsTask = LONG_POLL_TIMES;
} else {
longFlowsTaskInternal();