[ovs-dev] [PATCH] ofproto-dpif-xlate: Fix handling of write_actions(group(5), output(10)).

Ben Pfaff blp at nicira.com
Thu Jul 23 22:47:19 UTC 2015


Without the fix added by this commit, the test case as updated by this
commit fails.

Found by inspection.

Signed-off-by: Ben Pfaff <blp at nicira.com>
---
 ofproto/ofproto-dpif-xlate.c | 1 +
 tests/ofproto-dpif.at        | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
index 52395a7..ed5c824 100644
--- a/ofproto/ofproto-dpif-xlate.c
+++ b/ofproto/ofproto-dpif-xlate.c
@@ -4022,6 +4022,7 @@ xlate_write_actions(struct xlate_ctx *ctx, const struct ofpact *a)
             } else if (inner->type == OFPACT_GROUP) {
                 ctx->xin->flow.actset_output = OFPP_UNSET;
                 ctx->action_set_has_group = true;
+                break;
             }
         }
     }
diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
index 5b063d2..cfe7294 100644
--- a/tests/ofproto-dpif.at
+++ b/tests/ofproto-dpif.at
@@ -632,8 +632,9 @@ table=2,priority=10                  actions=5,goto_table(3)
 table=3,priority=20,xreg0=2  actions=6,goto_table(4)
 table=3,priority=10          actions=7,goto_table(4)
 
-# Verify that adding a group action unsets actset_output.
-table=4 actions=write_actions(group(5)),goto_table(5)
+# Verify that adding a group action unsets actset_output,
+# even if output follows group.
+table=4 actions=write_actions(group(5),output(10)),goto_table(5)
 table=5,priority=20,actset_output=unset  actions=8,goto_table(6)
 table=5,priority=10                      actions=9,goto_table(6)
 
-- 
2.1.3




More information about the dev mailing list