ovs-ofctl: Support "send_flow_rem" in "learn" actions.
authorBen Pfaff <blp@nicira.com>
Fri, 6 Jun 2014 04:37:04 +0000 (21:37 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 6 Jun 2014 20:54:47 +0000 (13:54 -0700)
This flag was overlooked when support for the "learn" action was added.
(It was always supported in the OpenFlow code, just not in the ovs-ofctl
interface.)

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
lib/learn.c
utilities/ovs-ofctl.8.in

index 8727a55..ef9fab9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, 2013 Nicira, Inc.
+ * Copyright (c) 2011, 2012, 2013, 2014 Nicira, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -580,6 +580,8 @@ learn_parse__(char *orig, char *arg, struct ofpbuf *ofpacts)
             learn->fin_hard_timeout = atoi(value);
         } else if (!strcmp(name, "cookie")) {
             learn->cookie = strtoull(value, NULL, 0);
+        } else if (!strcmp(name, "send_flow_rem")) {
+            learn->flags |= OFPFF_SEND_FLOW_REM;
         } else {
             struct ofpact_learn_spec *spec;
             char *error;
@@ -654,7 +656,7 @@ learn_format(const struct ofpact_learn *learn, struct ds *s)
         ds_put_format(s, ",priority=%"PRIu16, learn->priority);
     }
     if (learn->flags & OFPFF_SEND_FLOW_REM) {
-        ds_put_cstr(s, ",OFPFF_SEND_FLOW_REM");
+        ds_put_cstr(s, ",send_flow_rem");
     }
     if (learn->cookie != 0) {
         ds_put_format(s, ",cookie=%#"PRIx64, learn->cookie);
index d26d484..ad9fe78 100644 (file)
@@ -1477,8 +1477,9 @@ specified.
 .IQ \fBhard_timeout=\fIseconds\fR
 .IQ \fBpriority=\fIvalue\fR
 .IQ \fBcookie=\fIvalue\fR
-These key-value pairs have the same meaning as in the usual
-\fBovs\-ofctl\fR flow syntax.
+.IQ \fBsend_flow_rem\fR
+These arguments have the same meaning as in the usual \fBovs\-ofctl\fR
+flow syntax.
 .
 .IP \fBfin_idle_timeout=\fIseconds\fR
 .IQ \fBfin_hard_timeout=\fIseconds\fR