[ovs-dev] [PATCH 05/19] tunneling: Update port pools on config change.

Jesse Gross jesse at nicira.com
Thu Dec 9 19:44:14 UTC 2010


On Thu, Dec 9, 2010 at 9:48 AM, Ben Pfaff <blp at nicira.com> wrote:
> On Wed, Dec 08, 2010 at 10:14:03PM -0800, Jesse Gross wrote:
>> We keep track of the number of tunnels using the different types of
>> matching in order to avoid doing the lookup when there are no ports
>> of that type.  However, when updating the configuration we weren't
>> changing the port pool counts, which could lead to incorrectly not
>> finding a tunnel on receive.
>>
>> Signed-off-by: Jesse Gross <jesse at nicira.com>
>
> I think that this still leaves the counters off if the remove succeeds
> but the insert fails.

Thanks, fixed.

>
> You know, it would be cleaner to just have four "port_table"s instead of
> one.  Then we wouldn't need separate counters at all.

I guess but I don't really want to do this now since I'm planning to
change a couple things in this area.  The first is that I'm planning
on dropping local_ip, which will cut the number of tables in half.
The second is to migrate away from using our hash table implementation
at all here and just use the normal kernel hlist.

The primary benefit to combining things like this is to save memory
when multiple port types are in use.

>
> (tbl_count() should be inlined though.)
>

Probably but it doesn't really matter - it's not used anywhere
performance critical.  All of the hash table stuff is going to be
changing soon anyways.




More information about the dev mailing list