From: Ben Pfaff Date: Mon, 6 Feb 2012 18:43:50 +0000 (-0800) Subject: ovs-ofctl: Allow priority and timeout to be specified on mod-flows. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fdb3539e0108dff4ffd48b5b860786b2ab27046c;p=openvswitch ovs-ofctl: Allow priority and timeout to be specified on mod-flows. These options do have an effect if the mod-flows command creates a new flow. Signed-off-by: Ben Pfaff --- diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c index 3a1fcb7d..7a91a02e 100644 --- a/lib/ofp-parse.c +++ b/lib/ofp-parse.c @@ -517,11 +517,11 @@ parse_ofp_str(struct ofputil_flow_mod *fm, int command, const char *str_, break; case OFPFC_MODIFY: - fields = F_ACTIONS; + fields = F_ACTIONS | F_TIMEOUT | F_PRIORITY; break; case OFPFC_MODIFY_STRICT: - fields = F_ACTIONS | F_PRIORITY; + fields = F_ACTIONS | F_TIMEOUT | F_PRIORITY; break; default: diff --git a/utilities/ovs-ofctl.8.in b/utilities/ovs-ofctl.8.in index d72d8abf..794e4584 100644 --- a/utilities/ovs-ofctl.8.in +++ b/utilities/ovs-ofctl.8.in @@ -1034,7 +1034,11 @@ The following additional field sets the priority for flows added by the \fBadd\-flow\fR and \fBadd\-flows\fR commands. For \fBmod\-flows\fR and \fBdel\-flows\fR when \fB\-\-strict\fR is specified, priority must match along with the rest of the flow -specification. Other commands do not allow priority to be specified. +specification. For \fBmod\-flows\fR without \fB\-\-strict\fR, +priority is only significant if the command creates a new flow, that +is, non-strict \fBmod\-flows\fR does not match on priority and will +not change the priority of existing flows. Other commands do not +allow priority to be specified. . .IP \fBpriority=\fIvalue\fR The priority at which a wildcarded entry will match in comparison to @@ -1045,14 +1049,17 @@ priority value of 65535. When adding a flow, if the field is not specified, the flow's priority will default to 32768. . .PP -The \fBadd\-flow\fR and \fBadd\-flows\fR commands support additional -optional fields: +The \fBadd\-flow\fR, \fBadd\-flows\fR, and \fBmod\-flows\fR commands +support the following additional options. These options affect only +new flows. Thus, for \fBadd\-flow\fR and \fBadd\-flows\fR, these +options are always significant, but for \fBmod\-flows\fR they are +significant only if the command creates a new flow, that is, their +values do not update existing flows. . -.TP -\fBidle_timeout=\fIseconds\fR +.IP "\fBidle_timeout=\fIseconds\fR" Causes the flow to expire after the given number of seconds of -inactivity. A value of 0 (the default) prevents a flow from expiring due to -inactivity. +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,