From 46b442a414ee28cdebac89a63e69e3265e874dab Mon Sep 17 00:00:00 2001 From: David Miller Date: Mon, 25 Jul 2011 00:01:17 +0000 Subject: [PATCH] --- yaml --- r: 278297 b: refs/heads/master c: 1026fec8739663621d64216ba939c23bc1d089b7 h: refs/heads/master i: 278295: e8d4b73af4ac48caf8c64e92538a6683bd116ec0 v: v3 --- [refs] | 2 +- trunk/include/net/neighbour.h | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 56864a0b7781..694234ddbce1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 449fa023bca5b53bd924d91a27ffd34807fdeb80 +refs/heads/master: 1026fec8739663621d64216ba939c23bc1d089b7 diff --git a/trunk/include/net/neighbour.h b/trunk/include/net/neighbour.h index 7ae5acff96e9..87c0e5ce6492 100644 --- a/trunk/include/net/neighbour.h +++ b/trunk/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