diff options
author | Alex Wang <alexw@nicira.com> | 2014-06-19 18:31:19 -0700 |
---|---|---|
committer | Alex Wang <alexw@nicira.com> | 2014-06-22 20:33:01 -0700 |
commit | cc545357bd0a1604be7457f06e5505617d24cdd4 (patch) | |
tree | 33b89de870a36207acb7cc155513d97a7e91f83c /ofproto/ofproto-dpif.c | |
parent | c736bbc1d3b87677af5ed2bd11b914f26939d390 (diff) | |
download | openvswitch-branch-1.10.tar.gz |
ofproto-dpif: Configure datapath max-idle through ovs-vsctl.branch-1.10
This patch adds a new configuration option, "max-idle" to the
Bridge "other-config" column. This sets how long datapath flows,
for the configured bridge, are cached in the datapath before
ovs-vswitchd thread expires them.
This commit is a backport of commit 72310b04 (upcall: Configure
datapath max-idle through ovs-vsctl.).
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
Diffstat (limited to 'ofproto/ofproto-dpif.c')
-rw-r--r-- | ofproto/ofproto-dpif.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index b0e94435a..a2dc2019b 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -4387,6 +4387,12 @@ subfacet_max_idle(const struct ofproto_dpif *ofproto) long long int now; int i; + /* If 'max_idle' is specified, uses it instead of doing the + * calculation. */ + if (ofproto->up.max_idle) { + return ofproto->up.max_idle; + } + total = hmap_count(&ofproto->subfacets); if (total <= ofproto->up.flow_eviction_threshold) { return N_BUCKETS * BUCKET_WIDTH; |