From: Ben Pfaff Date: Wed, 15 Sep 2010 22:21:03 +0000 (-0700) Subject: ovs-ofctl, ovs-controller: Disable flow idle timeout by default. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a154533795474bd8d13a2a935c4b6719215d6907;p=openvswitch ovs-ofctl, ovs-controller: Disable flow idle timeout by default. Until now, flows set up by ovs-ofctl and by "ovs-controller --with-flows" by default expired after 60 seconds of inactivity. This was surprising, especially in the latter case where one is normally trying to set up permanent flows. Even in the former case, however, we can't think of a good reason that flows added by ovs-ofctl should expire by default. So this commit make flows permanent by default. Reported-by: Michael Mao --- diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c index 06d5bd11..405008c6 100644 --- a/lib/ofp-parse.c +++ b/lib/ofp-parse.c @@ -33,8 +33,6 @@ VLOG_DEFINE_THIS_MODULE(ofp_parse) -#define DEFAULT_IDLE_TIMEOUT 60 - static uint32_t str_to_u32(const char *str) { @@ -402,7 +400,7 @@ parse_ofp_str(char *string, struct ofp_match *match, struct ofpbuf *actions, *priority = OFP_DEFAULT_PRIORITY; } if (idle_timeout) { - *idle_timeout = DEFAULT_IDLE_TIMEOUT; + *idle_timeout = OFP_FLOW_PERMANENT; } if (hard_timeout) { *hard_timeout = OFP_FLOW_PERMANENT; diff --git a/utilities/ovs-ofctl.8.in b/utilities/ovs-ofctl.8.in index 7de788e1..bbe747b2 100644 --- a/utilities/ovs-ofctl.8.in +++ b/utilities/ovs-ofctl.8.in @@ -495,8 +495,8 @@ optional fields: .TP \fBidle_timeout=\fIseconds\fR Causes the flow to expire after the given number of seconds of -inactivity. A value of 0 prevents a flow from expiring due to -inactivity. The default is 60 seconds. +inactivity. A value of 0 (the default) prevents a flow from expiring due to +inactivity. . .IP \fBhard_timeout=\fIseconds\fR Causes the flow to expire after the given number of seconds,