2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

ofproto-dpif-xlate: Keep track of the last action

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 <azhou@ovn.org>
Tested-by: Greg Rose <gvrose8192@gmail.com>
Reviewed-by: Greg Rose <gvrose8192@gmail.com>
This commit is contained in:
Andy Zhou
2017-08-28 17:01:28 -07:00
parent c9f0a445a0
commit feee58b958
2 changed files with 140 additions and 81 deletions

View File

@@ -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)