summaryrefslogtreecommitdiff
path: root/include/openvswitch/meta-flow.h
diff options
context:
space:
mode:
authorJarno Rajahalme <jarno@ovn.org>2016-07-29 16:52:03 -0700
committerJarno Rajahalme <jarno@ovn.org>2016-07-29 16:52:03 -0700
commitaff49b8c66beaf509f6d165164696c14bba4247f (patch)
tree7a6c3fd72ac27194cf205ff0a334103a1b742676 /include/openvswitch/meta-flow.h
parent5cd4ead5c9fb0e0b60ec1bfd5063b25c20124830 (diff)
downloadopenvswitch-aff49b8c66beaf509f6d165164696c14bba4247f.tar.gz
meta-flow: Clean up masking with prerequisities checking.
Change mf_are_prereqs_ok() take a flow_wildcards pointer, so that the wildcards can be set at the same time as the prerequisiteis are checked. This makes it easier to write more obviously correct code. Remove the functions mf_mask_field_and_prereqs() and mf_mask_field_and_prereqs__(), and make the callers first check the prerequisites, while supplying 'wc' to mf_are_prereqs_ok(), and if successful, mask the bits of the field that were read or set using mf_mask_field_masked(). Signed-off-by: Jarno Rajahalme <jarno@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'include/openvswitch/meta-flow.h')
-rw-r--r--include/openvswitch/meta-flow.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/include/openvswitch/meta-flow.h b/include/openvswitch/meta-flow.h
index 900cd6ad0..10e1f771c 100644
--- a/include/openvswitch/meta-flow.h
+++ b/include/openvswitch/meta-flow.h
@@ -2060,12 +2060,8 @@ void mf_get_mask(const struct mf_field *, const struct flow_wildcards *,
union mf_value *mask);
/* Prerequisites. */
-bool mf_are_prereqs_ok(const struct mf_field *, const struct flow *);
-void mf_mask_field_and_prereqs(const struct mf_field *,
- struct flow_wildcards *);
-void mf_mask_field_and_prereqs__(const struct mf_field *,
- const union mf_value *,
- struct flow_wildcards *);
+bool mf_are_prereqs_ok(const struct mf_field *mf, const struct flow *flow,
+ struct flow_wildcards *wc);
void mf_bitmap_set_field_and_prereqs(const struct mf_field *mf, struct
mf_bitmap *bm);