1
2
3
4
5
6
7
8
9
10
11
12
13 #include <linux/refcount.h>
14
15 struct clip_entry {
16 spinlock_t lock;
17 refcount_t refcnt;
18 struct list_head list;
19 union {
20 struct sockaddr_in addr;
21 struct sockaddr_in6 addr6;
22 };
23 };
24
25 struct clip_tbl {
26 unsigned int clipt_start;
27 unsigned int clipt_size;
28 rwlock_t lock;
29 atomic_t nfree;
30 struct list_head ce_free_head;
31 void *cl_list;
32 struct list_head hash_list[0];
33 };
34
35 enum {
36 CLIPT_MIN_HASH_BUCKETS = 2,
37 };
38
39 struct clip_tbl *t4_init_clip_tbl(unsigned int clipt_start,
40 unsigned int clipt_end);
41 int cxgb4_clip_get(const struct net_device *dev, const u32 *lip, u8 v6);
42 void cxgb4_clip_release(const struct net_device *dev, const u32 *lip, u8 v6);
43 int clip_tbl_show(struct seq_file *seq, void *v);
44 int cxgb4_update_root_dev_clip(struct net_device *dev);
45 void t4_cleanup_clip_tbl(struct adapter *adap);