On 2 February 2017 at 13:40, Joe Stringer <j...@ovn.org> wrote: > On 1 February 2017 at 11:06, Joe Stringer <j...@ovn.org> wrote: >> On 31 January 2017 at 16:57, Joe Stringer <j...@ovn.org> wrote: >>> /* Returns true if a variable length meta-flow field 'mff' is not mapped in >>> * the 'vl_mff_map'. */ >>> bool >>> -mf_vl_mff_not_mapped(const struct mf_field *mff, >>> - const struct vl_mff_map *vl_mff_map) >>> +mf_vl_mff_mapped(const struct mf_field *mff, const struct vl_mff_map *map) >>> { >>> - if (mff && vl_mff_map) { >>> - if (mff->variable_len && !mff->mapped) { >>> - return true; >>> - } >>> - } >>> - >>> - return false; >>> + return !(map && mff && mff->variable_len && !mff->mapped); >>> } >> >> Yi-Hung pointed out offline that this reversal doesn't quite sit right >> logically; this function is searching for a specific set of invalid >> conditions, where there is a vl_mff_map, and the field is >> variable-length, and it's not mapped. It's misleading to have all of >> this covered by a function named "...mapped()". >> >> I suggest we retain the original logic but rename the function to >> something like mf_vl_mff_invalid(). > > I applied this to master.
Also cherry-picked to branch-2.7. _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev