diff --git a/src/vnsw/agent/vrouter/ksync/ksync_flow_memory.cc b/src/vnsw/agent/vrouter/ksync/ksync_flow_memory.cc index 87e658afde0..3a8fbe47ad8 100644 --- a/src/vnsw/agent/vrouter/ksync/ksync_flow_memory.cc +++ b/src/vnsw/agent/vrouter/ksync/ksync_flow_memory.cc @@ -77,6 +77,8 @@ void KSyncFlowMemory::Init() { audit_yield_ = flow_table_count / timer_per_sweep; if (audit_yield_ > kAuditYieldMax) audit_yield_ = kAuditYieldMax; + if (audit_yield_ < kAuditYieldMin) + audit_yield_ = kAuditYieldMin; audit_timer_->Start(audit_interval_, boost::bind(&KSyncFlowMemory::AuditProcess, this)); diff --git a/src/vnsw/agent/vrouter/ksync/ksync_flow_memory.h b/src/vnsw/agent/vrouter/ksync/ksync_flow_memory.h index fe172d90b67..3d8c600b988 100644 --- a/src/vnsw/agent/vrouter/ksync/ksync_flow_memory.h +++ b/src/vnsw/agent/vrouter/ksync/ksync_flow_memory.h @@ -26,6 +26,8 @@ class KSyncFlowMemory { static const uint32_t kAuditTimeout = (5 * 1000 * 1000); // in usec // Upper limit on number of entries to visit per timer static const uint32_t kAuditYieldMax = (1024); + // Lower limit on number of entries to visit per timer + static const uint32_t kAuditYieldMin = (100); KSyncFlowMemory(KSync *ksync); ~KSyncFlowMemory();