Skip to content

Commit

Permalink
ofproto-dpif-xlate: Fix handling of write_actions(group(5),output(10)).
Browse files Browse the repository at this point in the history
This keeps actset_output as OFPP_UNSET in the special case where a single
write_actions() contains a group action followed by an output action.  The
presumably more common case where instructions in separate action lists
contained output and group actions was already properly handled.

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@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
  • Loading branch information
blp committed Jul 24, 2015
1 parent 2338727 commit 9055ca9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions ofproto/ofproto-dpif-xlate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions tests/ofproto-dpif.at
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 9055ca9

Please sign in to comment.