Skip to content

Commit

Permalink
Merge "Define minimum value for number of flow entries to be audited …
Browse files Browse the repository at this point in the history
…per iteration"
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Aug 18, 2016
2 parents b1503ea + 4814619 commit d5ef51b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/vnsw/agent/vrouter/ksync/ksync_flow_memory.cc
Expand Up @@ -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));
Expand Down
2 changes: 2 additions & 0 deletions src/vnsw/agent/vrouter/ksync/ksync_flow_memory.h
Expand Up @@ -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();
Expand Down

0 comments on commit d5ef51b

Please sign in to comment.