[ovs-dev] [PATCH] datapath: An expanded table should be larger than its predecessor
Simon Horman
horms at verge.net.au
Tue Jul 12 06:52:44 UTC 2011
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 at verge.net.au>
---
datapath/table.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/datapath/table.c b/datapath/table.c
index 725845d..76086ee 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;
--
1.7.5.4
More information about the dev
mailing list