[ovs-dev] [PATCH v5 06/13] lib/odp-util: Skip ignored fields when parsing and formatting.
Ben Pfaff
blp at nicira.com
Tue Sep 9 20:14:20 UTC 2014
On Tue, Sep 09, 2014 at 01:11:25PM -0700, Jarno Rajahalme wrote:
>
> On Sep 8, 2014, at 5:06 PM, Ben Pfaff <blp at nicira.com> wrote:
>
> > On Fri, Sep 05, 2014 at 04:05:13PM -0700, Jarno Rajahalme wrote:
> >> When a whole field of a key value is ignored, skip it when formatting
> >> the key, and allow it to be left out when parsing the key from a
> >> string. However, when the unmasked bits have non-zero values (as in
> >> keys received from a datapath), or when the 'verbose' formatting is
> >> requested those are still formatted, as it may help in debugging.
> >>
> >> Now the named key fields can also be given in arbitrary order.
> >> Duplicate field values are not checked for, so the last one will
> >> remain in effect.
> >>
> >> Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
> >
> > This makes the formatting and parsing code less disastery. Thank you.
> >
>
> (snip)
>
> > There's still some nastiness around the difference between an
> > all-one-bits mask and a null mask. It takes some real care to read
> > the code to see that it is correct, and I'm sure that it took at least
> > as much care to write it. Can we do something about that? One way
> > would be to always supply a mask, one that is all-one-bits if there
> > would otherwise be no mask. That could be done externally to the
> > format_*() functions, or it could be internally.
>
> How about this variation (I realized that ?verbose? covers the case
> when the key includes non-masked bits):
OK.
> > In *_bf(), what does "bf" stand for?
> >
> ?bitfield?, did not want to make the name longer?
OK.
More information about the dev
mailing list