ovs-ofctl: Add support for "resubmit" Nicira vendor extension.
authorBen Pfaff <blp@nicira.com>
Mon, 5 Apr 2010 16:37:46 +0000 (09:37 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 5 Apr 2010 16:37:59 +0000 (09:37 -0700)
CC: Paul Ingram <paul@nicira.com>
utilities/ovs-ofctl.8.in
utilities/ovs-ofctl.c

index e7d7fc54dfa01ed3c763bef13c6c968162e8a894..da2ecd93331f908e13efe9670daad935fa4e34fa 100644 (file)
@@ -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
index 9a75969bc828a24f43b1519122f69996b9c023ea..0c977c790b77b48f23a1124a80ac06a68ffb4cf0 100644 (file)
@@ -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, "resubmit")) {
+            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")) {