diff options
author | David S. Miller <davem@davemloft.net> | 2015-01-15 18:59:55 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-15 18:59:55 -0500 |
commit | 615612dc4e583ae5eeb8eb1ece2d3c70be72296d (patch) | |
tree | 214142887368fb130259e85cd136388b8754deb1 /drivers/net/ethernet/chelsio/cxgb4/clip_tbl.h | |
parent | 5055c371bfd53fd369b895051b541318c2bad495 (diff) | |
parent | 211a84e3c188c67bfa22f1e7e1cd228709f6299b (diff) | |
download | op-kernel-dev-615612dc4e583ae5eeb8eb1ece2d3c70be72296d.zip op-kernel-dev-615612dc4e583ae5eeb8eb1ece2d3c70be72296d.tar.gz |
Merge branch 'cxgb4-next'
Anish Bhatt says:
====================
cxgb4/cxgb4i : Update & use ipv6 handling api
This patch series consolidates and updates the ipv6 api, as well as exports
it for use by upper level drivers dependent on cxgb4
v2: Fix formatting issues in clip_tbl.c
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/clip_tbl.h')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/clip_tbl.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/clip_tbl.h b/drivers/net/ethernet/chelsio/cxgb4/clip_tbl.h new file mode 100644 index 0000000..2eaba01 --- /dev/null +++ b/drivers/net/ethernet/chelsio/cxgb4/clip_tbl.h @@ -0,0 +1,41 @@ +/* + * This file is part of the Chelsio T4 Ethernet driver for Linux. + * Copyright (C) 2003-2014 Chelsio Communications. All rights reserved. + * + * Written by Deepak (deepak.s@chelsio.com) + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the LICENSE file included in this + * release for licensing terms and conditions. + */ + +struct clip_entry { + spinlock_t lock; /* Hold while modifying clip reference */ + atomic_t refcnt; + struct list_head list; + u32 addr[4]; + int addr_len; +}; + +struct clip_tbl { + unsigned int clipt_start; + unsigned int clipt_size; + rwlock_t lock; + atomic_t nfree; + struct list_head ce_free_head; + void *cl_list; + struct list_head hash_list[0]; +}; + +enum { + CLIPT_MIN_HASH_BUCKETS = 2, +}; + +struct clip_tbl *t4_init_clip_tbl(unsigned int clipt_start, + unsigned int clipt_end); +int cxgb4_clip_get(const struct net_device *dev, const u32 *lip, u8 v6); +void cxgb4_clip_release(const struct net_device *dev, const u32 *lip, u8 v6); +int clip_tbl_show(struct seq_file *seq, void *v); +int cxgb4_update_root_dev_clip(struct net_device *dev); +void t4_cleanup_clip_tbl(struct adapter *adap); |