This is in preparation for adding recirculation where it will be used to test if load, move and set_field actions require recirculation to be performed first.
Signed-off-by: Simon Horman <ho...@verge.net.au> --- lib/meta-flow.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/meta-flow.h b/lib/meta-flow.h index cf92556..cd00a25 100644 --- a/lib/meta-flow.h +++ b/lib/meta-flow.h @@ -87,6 +87,8 @@ enum OVS_PACKED_ENUM mf_field_id { MFF_MPLS_BOS, /* u8 */ /* L3. */ + /* Update mf_is_l3_or_higher() if MFF_IPV4_SRC is + * no longer the first element for a field of layer 3 or higher */ MFF_IPV4_SRC, /* be32 */ MFF_IPV4_DST, /* be32 */ @@ -359,6 +361,12 @@ void mf_get_mask(const struct mf_field *, const struct flow_wildcards *, bool mf_are_prereqs_ok(const struct mf_field *, const struct flow *); void mf_mask_field_and_prereqs(const struct mf_field *, struct flow *mask); +static inline bool +mf_is_l3_or_higher(const struct mf_field *mf) +{ + return mf->id >= MFF_IPV4_SRC; +} + /* Field values. */ bool mf_is_value_valid(const struct mf_field *, const union mf_value *value); -- 1.8.5.2 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev