datapath: Allow table to expand to have TBL_MAX_BUCKETS buckets
authorSimon Horman <horms@verge.net.au>
Wed, 3 Aug 2011 02:19:46 +0000 (11:19 +0900)
committerJesse Gross <jesse@nicira.com>
Wed, 3 Aug 2011 04:44:13 +0000 (21:44 -0700)
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 <horms@verge.net.au>
Signed-off-by: Jesse Gross <jesse@nicira.com>
datapath/table.c

index 76086ee466151f94a075fa4cb1ddfa30cd9d34ed..36613bd901aa84fb1894a14ff2c6e5a8fbf71318 100644 (file)
@@ -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;
        }