[ovs-dev] [PATCH] ofp-actions: Allow write_metadata instruction before goto_table instruction.

Jing Ai ai_jing2000 at hotmail.com
Thu Jan 3 06:41:37 UTC 2013


In the current codes, when running "ovs-ofctl add-flow br0 <match conditions>,actions=write_metadata:<64-bit metadata>,goto_table:<table_id>", it gives the following error:2012-12-29T00:23:23Z|00001|ofp_actions|WARN|write_metadata instruction must be specified after other instructions/actionsovs-ofctl: Incorrect instruction orderingAccording to OpenFlow spec 1.2, only goto_table instruction could go after write_metadata instruction. This patch intends to address the above issue.
Signed-off-by: Jing Ai <ai_jing2000 at hotmail.com>lib/ofp-actions.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c
index 6468cac..b1c3389 100644
--- a/lib/ofp-actions.c
+++ b/lib/ofp-actions.c
@@ -1160,9 +1160,10 @@ ofpacts_verify(const struct ofpact ofpacts[], size_t ofpacts_len)
             if (a->type == OFPACT_WRITE_METADATA) {
                 VLOG_WARN("duplicate write_metadata instruction specified");
                 return OFPERR_OFPBAC_UNSUPPORTED_ORDER;
-            } else {
+            } else if (a->type != OFPACT_GOTO_TABLE) {
                 VLOG_WARN("write_metadata instruction must be specified after "
-                          "other instructions/actions");
+                          "other instructions/actions except goto_table "
+                          "instruction");
                 return OFPERR_OFPBAC_UNSUPPORTED_ORDER;
             }
         }

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20130103/a4e91a7c/attachment-0003.html>


More information about the dev mailing list