提交 1026fec8 编写于 作者: D David Miller 提交者: David S. Miller

neigh: Create mechanism for generic neigh private areas.

The implementation private sits right after the primary_key memory.
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 449fa023
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册