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

Jarno Rajahalme jrajahalme at nicira.com
Tue Aug 26 00:19:26 UTC 2014

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=,dst=,proto=5/0xff,tos=0x80/0,ttl=128/0xff,frag=no/0xff))
>> +set(ipv4(src=,dst=,proto=5/0xff,tos=0x80/0xff,ttl=128/0xff,frag=no/0xff))
>> +set(ipv4(src=,dst=,proto=5/0,tos=0x80/0xff,ttl=128/0xff,frag=no/0xff))
>> +set(ipv4(src=,dst=,proto=5/0,tos=0x80/0x3,ttl=128/0,frag=no/0))
>> +set(ipv4(src=,dst=,proto=5/0,tos=0x80/0xfc,ttl=128/0,frag=no/0))
>> +set(ipv4(src=,dst=,proto=5/0,tos=0x80/0,ttl=128/0xff,frag=no/0x3))
>> +set(ipv4(src=,dst=,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:


we could have:


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.


More information about the dev mailing list