]> git.proxmox.com Git - ovs.git/commit
meta-flow: Clean up masking with prerequisities checking.
authorJarno Rajahalme <jarno@ovn.org>
Fri, 29 Jul 2016 23:52:03 +0000 (16:52 -0700)
committerJarno Rajahalme <jarno@ovn.org>
Fri, 29 Jul 2016 23:52:03 +0000 (16:52 -0700)
commitaff49b8c66beaf509f6d165164696c14bba4247f
tree7a6c3fd72ac27194cf205ff0a334103a1b742676
parent5cd4ead5c9fb0e0b60ec1bfd5063b25c20124830
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>
include/openvswitch/meta-flow.h
lib/classifier.c
lib/flow.h
lib/meta-flow.c
lib/nx-match.c
lib/ofp-actions.c
lib/ofp-parse.c
ofproto/ofproto-dpif-xlate.c
ofproto/ofproto.c
utilities/ovs-ofctl.c