datapath: An expanded table should be larger than its predecessor
authorSimon Horman <horms@verge.net.au>
Tue, 12 Jul 2011 06:52:44 +0000 (15:52 +0900)
committerBen Pfaff <blp@nicira.com>
Wed, 13 Jul 2011 17:07:28 +0000 (10:07 -0700)
commitf63c7f457b3ab8bbcba448294630ef7c3d8b5c21
treeb1cb0567da48b29acccd97cdc4bff8fd97682fd1
parentbaac62663e6f7990a9d60d95896287507b0eab36
datapath: An expanded table should be larger than its predecessor

This resolves what appears to be a think-o in tbl_expand()

* Old Logic: Always create tables with TBL_MIN_BUCKETS buckets
* New Logic: Create tables twice as big as their predecessor

When sending 10,000 flows through ovs-vswitchd:
* Old Logic: CPU bound in tbl_lookup(), significant packet loss
* New Logic: ~10% of one core used, negligible packet loss

Tested with an Intel E5520 @ 2.27GHz,
flows from an ethernet device to to a dummy interface with
no address configured.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Jesse Gross <jesse@nicira.com>
datapath/table.c