From f63c7f457b3ab8bbcba448294630ef7c3d8b5c21 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Tue, 12 Jul 2011 15:52:44 +0900 Subject: [PATCH] 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 Signed-off-by: Jesse Gross --- datapath/table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datapath/table.c b/datapath/table.c index 47fa01690..0eccab04d 100644 --- a/datapath/table.c +++ b/datapath/table.c @@ -337,7 +337,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; -- 2.43.0