aboutsummaryrefslogtreecommitdiff
path: root/datapath/table.c
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2011-07-12 15:52:44 +0900
committerJesse Gross <jesse@nicira.com>2011-07-12 09:15:16 -0700
commit1b3a91b5a35e6ffdc85ec373896532d266a6b795 (patch)
treec82bd76a1c8c66b22956c86b93262dba961ddb68 /datapath/table.c
parent643c0c3491764075e8b21239fd88a2bdae4b8417 (diff)
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>
Diffstat (limited to 'datapath/table.c')
-rw-r--r--datapath/table.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/datapath/table.c b/datapath/table.c
index 725845de..76086ee4 100644
--- a/datapath/table.c
+++ b/datapath/table.c
@@ -339,7 +339,7 @@ struct tbl *tbl_expand(struct tbl *table)
}
err = -ENOMEM;
- new_table = tbl_create(TBL_MIN_BUCKETS);
+ new_table = tbl_create(n_buckets);
if (!new_table)
goto error;