aboutsummaryrefslogtreecommitdiff
path: root/datapath/table.c
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2010-11-02 21:35:14 +0900
committerJesse Gross <jesse@nicira.com>2010-11-02 11:50:44 -0700
commitac0ceab6e39da04d146b41a8a2828c7288941a00 (patch)
tree0645bb6da0985778c6c479184dc2b25801dda962 /datapath/table.c
parentded8fe209ff51df31ce6e7b74787584edfe00724 (diff)
datapath: The definition of struct tbl is needed by rcu_dereference()
Due to the use of typeof(*p) by __rcu_dereference_check(), which was introduced by the Linux changeset ca5ecddfa8fcbd948c95530e7e817cee9fb43a3d (rcu: define __rcu address space modifier for sparse) the definition of the type of a the parameter to rcu_dereference() is needed. In terms of the datapath, this means that the definition of struct tbl needs to be available wherever rcu_dereference(dp->table) is called. Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'datapath/table.c')
-rw-r--r--datapath/table.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/datapath/table.c b/datapath/table.c
index 5ea2c93b..61118090 100644
--- a/datapath/table.c
+++ b/datapath/table.c
@@ -16,30 +16,6 @@
#include <asm/pgtable.h>
/**
- * struct tbl - hash table
- * @n_buckets: number of buckets (a power of 2 between %TBL_L1_SIZE and
- * %TBL_MAX_BUCKETS)
- * @buckets: pointer to @n_buckets/%TBL_L1_SIZE pointers to %TBL_L1_SIZE pointers
- * to buckets
- * @rcu: RCU callback structure
- * @obj_destructor: Called on each element when the table is destroyed.
- *
- * The @buckets array is logically an array of pointers to buckets. It is
- * broken into two levels to avoid the need to kmalloc() any object larger than
- * a single page or to use vmalloc(). @buckets is always nonnull, as is each
- * @buckets[i], but each @buckets[i][j] is nonnull only if the specified hash
- * bucket is nonempty (for 0 <= i < @n_buckets/%TBL_L1_SIZE, 0 <= j <
- * %TBL_L1_SIZE).
- */
-struct tbl {
- struct rcu_head rcu;
- unsigned int n_buckets;
- struct tbl_bucket ***buckets;
- unsigned int count;
- void (*obj_destructor)(struct tbl_node *);
-};
-
-/**
* struct tbl_bucket - single bucket within a hash table
* @rcu: RCU callback structure
* @n_objs: number of objects in @objs[] array