[ovs-dev] [RFC PATCH v2 6/7] flow: Split miniflow's map.

Jarno Rajahalme jrajahalme at nicira.com
Wed Jul 15 23:37:47 UTC 2015


> On Jul 14, 2015, at 10:37 PM, Ben Pfaff <blp at nicira.com> wrote:
> 
> On Fri, Jul 10, 2015 at 10:35:24AM -0700, Jarno Rajahalme wrote:
>> Use two maps in miniflow to allow for expansion of struct flow past
>> 512 bytes.  We now have one map for tunnel related fields, and another
>> for the rest of the packet metadata and actual packet header fields.
>> This split has the benefit that for non-tunneled packets the overhead
>> should be minimal.
>> 
>> Some miniflow utilities now exist in two variants, new ones operating
>> over all the data, and the old ones operating only on a single 64-bit
>> map at a time.  The old ones require doubling of code but should
>> execute faster, so those are used in the datapath and classifier's
>> lookup path.
>> 
>> Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
> 
> I get sparse warnings:
> 
>    ../lib/classifier-private.h:244:41: warning: shift too big (4294967258) for type unsigned long long
>      CC       lib/flow.lo
>      CC       lib/learn.lo
>    ../lib/flow.c:461:9: warning: shift too big (98) for type unsigned long long
>    ../lib/flow.c:461:9: warning: shift too big (4294967258) for type unsigned long long
>    ../lib/flow.c:465:13: warning: shift too big (64) for type unsigned long long
>    ../lib/flow.c:465:13: warning: shift too big (4294967262) for type unsigned long long
> 

Is this on a 32-bit build? If so, did you get these on 64-bit build, too?

  Jarno

> miniflow_get_map_in_range() is pretty big, though it should optimize
> down a bit in particular cases.  Maybe you should mark it ALWAYS_INLINE
> to help the compiler with that.
> 
> If you don't mind, I'd like to carefully review a v3 with the above
> shifts fixed.




More information about the dev mailing list