[ovs-dev] [RFC 05/14] udpif: Separate ukey maps from revalidators.

Joe Stringer joestringer at nicira.com
Mon Aug 25 04:34:18 UTC 2014

On 23 August 2014 07:59, Ben Pfaff <blp at nicira.com> wrote:

> n_umaps is now a hard-coded constant, but a lot of the code assumes
> that it can vary.  It would be very slightly simpler to actually use a
> macro or enum to define the fixed size instead of a variable.  It
> would also allow better code generation in ukey_lookup() and
> ukey_acquire() since hash % 128 is just hash & 0x7f, which ought to be
> much cheaper than a general-purpose modulo operation.  I suggest
> making the change for that latter reason.
> upcall_unixctl_show() assert-fails if n_revalidators > 64, but nothing
> in the code, that I see, limits the number of revalidators to that
> number.  We should limit the revalidators or just dynamically allocate
> 'elements'.  Actually, here's a simpler solution: get rid of
> 'elements' and have the loop that read it construct each element as it
> goes using a loop like the one in revalidator_sweep__().
> Acked-by: Ben Pfaff <blp at nicira.com>

Thanks for the review, I'll make these changes for v2.

More information about the dev mailing list