diff options
author | Jarno Rajahalme <jarno@ovn.org> | 2017-03-08 17:18:22 -0800 |
---|---|---|
committer | Jarno Rajahalme <jarno@ovn.org> | 2017-03-08 17:22:27 -0800 |
commit | 67210a5510703df8311ce5e836c3c7ac92505cae (patch) | |
tree | 93bf36f989b979a85ba47a7d3b9db931898df9d1 /include/openvswitch/meta-flow.h | |
parent | fcbf7e1ed3ef7d3f144fbd3c1ae3064939e8dfb5 (diff) | |
download | openvswitch-67210a5510703df8311ce5e836c3c7ac92505cae.tar.gz |
lib: Check match and action prerequisities with 'match'.
Supply the match mask to prerequisities checking when available. This
allows checking for zero-valued matches. Non-zero valued matches
imply the presense of corresponding mask bits, but for zero valued
matches we must explicitly check the mask, too.
This is required now only for conntrack validity checking due to the
conntrack state having and 'invalid' bit, but not 'valid' bit. One
way to match an valid conntrack state is to match on the 'tracked' bit
being one and 'invalid' bit being zero. The latter requires the
corresponding mask bit be verified.
Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Joe Stringer <joe@ovn.org>
Diffstat (limited to 'include/openvswitch/meta-flow.h')
-rw-r--r-- | include/openvswitch/meta-flow.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/openvswitch/meta-flow.h b/include/openvswitch/meta-flow.h index 53d3b41b3..2986c82b3 100644 --- a/include/openvswitch/meta-flow.h +++ b/include/openvswitch/meta-flow.h @@ -1899,6 +1899,7 @@ void mf_get_mask(const struct mf_field *, const struct flow_wildcards *, /* Prerequisites. */ bool mf_are_prereqs_ok(const struct mf_field *mf, const struct flow *flow, struct flow_wildcards *wc); +bool mf_are_match_prereqs_ok(const struct mf_field *, const struct match *); static inline bool mf_is_l3_or_higher(const struct mf_field *mf) @@ -1960,8 +1961,8 @@ void mf_subfield_swap(const struct mf_subfield *, const struct mf_subfield *, struct flow *flow, struct flow_wildcards *); -enum ofperr mf_check_src(const struct mf_subfield *, const struct flow *); -enum ofperr mf_check_dst(const struct mf_subfield *, const struct flow *); +enum ofperr mf_check_src(const struct mf_subfield *, const struct match *); +enum ofperr mf_check_dst(const struct mf_subfield *, const struct match *); /* Parsing and formatting. */ char *mf_parse(const struct mf_field *, const char *, |