diff options
author | David Miller <davem@davemloft.net> | 2011-07-25 02:01:17 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-01 00:46:43 +0100 |
commit | 1026fec8739663621d64216ba939c23bc1d089b7 (patch) | |
tree | d8ba40edf7952d1c2fa2b832fdfceeb537fcb145 /include/net/neighbour.h | |
parent | sfc: fix race in efx_enqueue_skb_tso() (diff) | |
download | linux-1026fec8739663621d64216ba939c23bc1d089b7.tar.xz linux-1026fec8739663621d64216ba939c23bc1d089b7.zip |
neigh: Create mechanism for generic neigh private areas.
The implementation private sits right after the primary_key memory.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | include/net/neighbour.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index 7ae5acff96e9..87c0e5ce6492 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h @@ -179,6 +179,13 @@ struct neigh_table { struct pneigh_entry **phash_buckets; }; +#define NEIGH_PRIV_ALIGN sizeof(long long) + +static inline void *neighbour_priv(const struct neighbour *n) +{ + return (char *)n + ALIGN(sizeof(*n) + n->tbl->key_len, NEIGH_PRIV_ALIGN); +} + /* flags for neigh_update() */ #define NEIGH_UPDATE_F_OVERRIDE 0x00000001 #define NEIGH_UPDATE_F_WEAK_OVERRIDE 0x00000002 |