From: Simon Horman Date: Wed, 3 Aug 2011 02:19:46 +0000 (+0900) Subject: datapath: Allow table to expand to have TBL_MAX_BUCKETS buckets X-Git-Tag: v1.3.0~497 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;ds=sidebyside;h=d1993ffea5d91f28f39838e8bcb1c67bc6bec790;p=sliver-openvswitch.git datapath: Allow table to expand to have TBL_MAX_BUCKETS buckets This resolves what appears to be a logic error whereby the maximum number of buckets is limited to only half of TBL_MAX_BUCKETS. Signed-off-by: Simon Horman Signed-off-by: Jesse Gross --- diff --git a/datapath/table.c b/datapath/table.c index 76086ee46..36613bd90 100644 --- a/datapath/table.c +++ b/datapath/table.c @@ -333,7 +333,7 @@ struct tbl *tbl_expand(struct tbl *table) int n_buckets = table->n_buckets * 2; struct tbl *new_table; - if (n_buckets >= TBL_MAX_BUCKETS) { + if (n_buckets > TBL_MAX_BUCKETS) { err = -ENOSPC; goto error; }