[ovs-dev] [PATCH 03/16] ovs-ofctl: Support "send_flow_rem" in "learn" actions.

Ben Pfaff blp at nicira.com
Fri Jun 6 05:01:57 UTC 2014


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 at nicira.com>
---
 lib/learn.c              | 6 ++++--
 utilities/ovs-ofctl.8.in | 5 +++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/lib/learn.c b/lib/learn.c
index 8727a55..ef9fab9 100644
--- a/lib/learn.c
+++ b/lib/learn.c
@@ -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);
diff --git a/utilities/ovs-ofctl.8.in b/utilities/ovs-ofctl.8.in
index d26d484..ad9fe78 100644
--- a/utilities/ovs-ofctl.8.in
+++ b/utilities/ovs-ofctl.8.in
@@ -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
-- 
1.9.1




More information about the dev mailing list