Thanks. To make this invariant really clear, I added a comment:
*
* (As usually true for value/mask pairs in OVS, any 1-bit in a value must have
* a corresponding 1-bit in its mask.) */
On Wed, Apr 15, 2015 at 12:36:40PM -0700, Andy Zhou wrote:
> Thanks for explaining. Given av == av & am i
Thanks for explaining. Given av == av & am is a prerequisite, this
function looks fine.
For the patch:
Acked-by: Andy Zhou
On Wed, Apr 15, 2015 at 11:35 AM, Ben Pfaff wrote:
> This combination of av with am is invalid because av has a 1-bit (its
> least-significant bit) where am has a 0-bit.
This combination of av with am is invalid because av has a 1-bit (its
least-significant bit) where am has a 0-bit. Suppose that we pretend
that am is instead 1001, which would make av/am valid. Then av/am
requires the least-significant bit to be 1 and bv/bm requires it to be
0. This is the "impo
assume av=1001, am = 1000, bv=1000, bm=1001.
Should dv's last bit be zero? if not, then my interpretation of what
this function does
is wrong.
On Mon, Apr 6, 2015 at 9:31 PM, Ben Pfaff wrote:
> On Mon, Apr 06, 2015 at 03:28:37PM -0700, Andy Zhou wrote:
>> On Tue, Mar 31, 2015 at 9:52 PM, Ben Pfa
On Mon, Apr 06, 2015 at 03:28:37PM -0700, Andy Zhou wrote:
> On Tue, Mar 31, 2015 at 9:52 PM, Ben Pfaff wrote:
> > To be first used in upcoming commits.
> >
> > Signed-off-by: Ben Pfaff
>
> > +/* Consider the two value/mask pairs 'a_value/a_mask' and 'b_value/b_mask'
> > as
> > + * restrictions
On Tue, Mar 31, 2015 at 9:52 PM, Ben Pfaff wrote:
> To be first used in upcoming commits.
>
> Signed-off-by: Ben Pfaff
> +/* Consider the two value/mask pairs 'a_value/a_mask' and 'b_value/b_mask' as
> + * restrictions on a field's value. Then, this function initializes
> + * 'dst_value/dst_mas