From 3a2fe1f354988b92aa8b4fa8a7c3bac04f8693ab Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 5 Apr 2010 09:37:46 -0700 Subject: [PATCH] ovs-ofctl: Add support for "resubmit" Nicira vendor extension. CC: Paul Ingram --- utilities/ovs-ofctl.8.in | 9 +++++++++ utilities/ovs-ofctl.c | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/utilities/ovs-ofctl.8.in b/utilities/ovs-ofctl.8.in index e7d7fc54d..da2ecd933 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 9a75969bc..0c977c790 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, "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")) { -- 2.43.0