[VOL-3461] Lowering flow chunk size because of lager flow size in TT workflow

Change-Id: I840619c3a153cf3106f333198fbca809c1c4cca9
diff --git a/internal/pkg/openflow/stats.go b/internal/pkg/openflow/stats.go
index d50fc14..096e731 100644
--- a/internal/pkg/openflow/stats.go
+++ b/internal/pkg/openflow/stats.go
@@ -383,7 +383,9 @@
 	n := 0
 	for n <= total {
 
-		chunk := flows[n*chunkSize : min((n*chunkSize)+chunkSize, len(flows))]
+		limit := (n * chunkSize) + chunkSize
+
+		chunk := flows[n*chunkSize : min(limit, len(flows))]
 
 		if len(chunk) == 0 {
 			break
@@ -393,7 +395,7 @@
 		response.SetXid(request.GetXid())
 		response.SetVersion(4)
 		response.SetFlags(ofp.StatsReplyFlags(request.GetFlags()))
-		if total != n {
+		if limit < len(flows) {
 			response.SetFlags(ofp.StatsReplyFlags(ofp.OFPSFReplyMore))
 		}
 		response.SetEntries(chunk)