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-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1993ffea5d91f28f39838e8bcb1c67bc6bec790;p=openvswitch 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 76086ee4..36613bd9 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; }