[ovs-dev] [PATCH v4 1/4] lib/odp: Masked set action execution and printing.

Jesse Gross jesse at nicira.com
Tue Aug 26 01:10:13 UTC 2014


On Mon, Aug 25, 2014 at 7:19 PM, Jarno Rajahalme <jrajahalme at nicira.com> wrote:
>
> On Aug 11, 2014, at 3:46 PM, Jesse Gross <jesse at nicira.com> wrote:
>
>> On Mon, Aug 11, 2014 at 9:14 AM, Jarno Rajahalme <jrajahalme at nicira.com> wrote:
>>> diff --git a/tests/odp.at b/tests/odp.at
>>> index e725f70..58e3ff1 100644
>>> --- a/tests/odp.at
>>> +++ b/tests/odp.at
>> +set(ipv4(src=35.8.2.41/255.255.255.255,dst=172.16.0.20/255.255.255.255,proto=5/0xff,tos=0x80/0,ttl=128/0xff,frag=no/0xff))
>>> +set(ipv4(src=35.8.2.41/255.255.255.0,dst=172.16.0.20/255.255.255.255,proto=5/0xff,tos=0x80/0xff,ttl=128/0xff,frag=no/0xff))
>>> +set(ipv4(src=35.8.2.41/255.255.255.0,dst=172.16.0.20/0.0.0.0,proto=5/0,tos=0x80/0xff,ttl=128/0xff,frag=no/0xff))
>>> +set(ipv4(src=35.8.2.41/0.0.0.0,dst=172.16.0.20/0.0.0.0,proto=5/0,tos=0x80/0x3,ttl=128/0,frag=no/0))
>>> +set(ipv4(src=35.8.2.41/0.0.0.0,dst=172.16.0.20/0.0.0.0,proto=5/0,tos=0x80/0xfc,ttl=128/0,frag=no/0))
>>> +set(ipv4(src=35.8.2.41/0.0.0.0,dst=172.16.0.20/0.0.0.0,proto=5/0,tos=0x80/0,ttl=128/0xff,frag=no/0x3))
>>> +set(ipv4(src=35.8.2.41/0.0.0.0,dst=172.16.0.20/0.0.0.0,proto=5/0,tos=0x80/0,ttl=128/0,frag=no/0xff))
>>
>> This isn't a review but it seems like it would be nice to have a
>> shorthand for the common cases where the mask is either fully
>> wildcarded or fully exact. Maybe we don't print the attribute at all
>> if it is fully wildcarded and just print the value if it is fully
>> exact.
>
> I think we do that already. I all of the cases above the mask is non-zero but not exact. However, I started testing on printing and parsing flow keys so that individual wildcarded attribute fields would be left out. Is that what you meant? I.e.,
>
> instead of:
>
> set(ipv4(src=35.8.2.41/0.0.0.0,dst=172.16.0.20/0.0.0.0,proto=6/0xff,tos=0x80/0,ttl=128/0,frag=no/0))
>
> we could have:
>
> set(ipv4(proto=6))

Yes, that's what I was thinking.

> Similarly, we could skip printing out wildcarded parts of flow keys, especially if the key bits are also zeros. It seems that printing key fields actually derived from the packet, even though wildcarded still have considerable debugging value.

For debugging, I think you could probably make the same argument about
attributes that are completely masked out, right? I believe that we
already have a verbose mode to print everything so we could just add
this as well.



More information about the dev mailing list