diff --git a/include/net/neighbour.h b/include/net/neighbour.h index 629ee573c6d0307a4d394dcc16e9812e955a36d4..7e748ad8b50c71900bdcedaf09a8c69e41f567a3 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h @@ -181,6 +181,7 @@ struct neigh_table { }; #define NEIGH_PRIV_ALIGN sizeof(long long) +#define NEIGH_ENTRY_SIZE(size) ALIGN((size), NEIGH_PRIV_ALIGN) static inline void *neighbour_priv(const struct neighbour *n) { diff --git a/net/decnet/dn_neigh.c b/net/decnet/dn_neigh.c index 3aede1b459fd6bbe4d276606200a1965496de1e1..856636addd7618598be5c341cb6afd1de1ba971a 100644 --- a/net/decnet/dn_neigh.c +++ b/net/decnet/dn_neigh.c @@ -95,7 +95,7 @@ static u32 dn_neigh_hash(const void *pkey, struct neigh_table dn_neigh_table = { .family = PF_DECnet, - .entry_size = sizeof(struct dn_neigh), + .entry_size = NEIGH_ENTRY_SIZE(sizeof(struct dn_neigh)), .key_len = sizeof(__le16), .hash = dn_neigh_hash, .constructor = dn_neigh_construct,