Skip to content

Commit

Permalink
ofproto-dpif-xlate: Keep track of the last action
Browse files Browse the repository at this point in the history
When Openflow clone is last action of an action list, it does not
make sense for xlated actions to generate datapath clone action.

This patch attemps to Keep track of last clone action, but not
necessarily for every case.

Signed-off-by: Andy Zhou <[email protected]>
Tested-by: Greg Rose <[email protected]>
Reviewed-by: Greg Rose <[email protected]>
  • Loading branch information
azhou-nicira committed Sep 27, 2017
1 parent c9f0a44 commit feee58b
Show file tree
Hide file tree
Showing 2 changed files with 140 additions and 81 deletions.
7 changes: 7 additions & 0 deletions include/openvswitch/ofp-actions.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,13 @@ ofpact_end(const struct ofpact *ofpacts, size_t ofpacts_len)
return ALIGNED_CAST(struct ofpact *, (uint8_t *) ofpacts + ofpacts_len);
}

static inline bool
ofpact_last(const struct ofpact *a, const struct ofpact *ofpacts,
size_t ofpact_len)
{
return ofpact_next(a) == ofpact_end(ofpacts, ofpact_len);
}

static inline const struct ofpact *
ofpact_find_type_flattened(const struct ofpact *a, enum ofpact_type type,
const struct ofpact * const end)
Expand Down
Loading

0 comments on commit feee58b

Please sign in to comment.