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_jing2...@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; } }
_______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev