[ovs-dev] [PATCH] ovs-ofctl: Add support for "resubmit" Nicira vendor extension.

Ben Pfaff blp at nicira.com
Fri Apr 2 21:26:55 UTC 2010


CC: Paul Ingram <paul at nicira.com>
---
 utilities/ovs-ofctl.8.in |    9 +++++++++
 utilities/ovs-ofctl.c    |    6 ++++++
 2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/utilities/ovs-ofctl.8.in b/utilities/ovs-ofctl.8.in
index e7d7fc5..c9e2860 100644
--- a/utilities/ovs-ofctl.8.in
+++ b/utilities/ovs-ofctl.8.in
@@ -391,6 +391,15 @@ Sets the IP ToS/DSCP field to \fItos\fR.  Valid values are between 0 and
 255, inclusive.  Note that the two lower reserved bits are never
 modified.
 .
+.IP \fBresubmit\fB:\fIport\fR
+Re-searches the OpenFlow flow table with the \fBin_port\fR field
+replaced by \fIport\fR and executes the actions found, if any, in
+addition to any other actions in this flow entry.  Recursive
+\fBresubmit\fR actions are ignored.
+.IP
+This action is a Nicira vendor extension that as of this writing is
+only known to be implemented by Open vSwitch.
+.
 .RE
 .
 .IP
diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c
index 9a75969..33d3d23 100644
--- a/utilities/ovs-ofctl.c
+++ b/utilities/ovs-ofctl.c
@@ -627,6 +627,12 @@ str_to_action(char *str, struct ofpbuf *b)
             struct ofp_action_nw_tos *nt;
             nt = put_action(b, sizeof *nt, OFPAT_SET_NW_TOS);
             nt->nw_tos = str_to_u32(arg);
+        } else if (!strcasecmp(act, "submit")) {
+            struct nx_action_resubmit *nar;
+            nar = put_action(b, sizeof *nar, OFPAT_VENDOR);
+            nar->vendor = htonl(NX_VENDOR_ID);
+            nar->subtype = htons(NXAST_RESUBMIT);
+            nar->in_port = htons(str_to_u32(arg));
         } else if (!strcasecmp(act, "output")) {
             put_output_action(b, str_to_u32(arg));
         } else if (!strcasecmp(act, "drop")) {
-- 
1.6.6.1





More information about the dev mailing list