提交 76cc714e 编写于 作者: D David Miller 提交者: David S. Miller

neigh: Do not set tbl->entry_size in ipv4/ipv6 neigh tables.

Let the core self-size the neigh entry based upon the key length.
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 596b9b68
...@@ -322,7 +322,6 @@ static u32 clip_hash(const void *pkey, const struct net_device *dev, __u32 rnd) ...@@ -322,7 +322,6 @@ static u32 clip_hash(const void *pkey, const struct net_device *dev, __u32 rnd)
static struct neigh_table clip_tbl = { static struct neigh_table clip_tbl = {
.family = AF_INET, .family = AF_INET,
.entry_size = sizeof(struct neighbour)+sizeof(struct atmarp_entry),
.key_len = 4, .key_len = 4,
.hash = clip_hash, .hash = clip_hash,
.constructor = clip_constructor, .constructor = clip_constructor,
......
...@@ -164,7 +164,6 @@ static const struct neigh_ops arp_broken_ops = { ...@@ -164,7 +164,6 @@ static const struct neigh_ops arp_broken_ops = {
struct neigh_table arp_tbl = { struct neigh_table arp_tbl = {
.family = AF_INET, .family = AF_INET,
.entry_size = sizeof(struct neighbour) + 4,
.key_len = 4, .key_len = 4,
.hash = arp_hash, .hash = arp_hash,
.constructor = arp_constructor, .constructor = arp_constructor,
......
...@@ -126,7 +126,6 @@ static const struct neigh_ops ndisc_direct_ops = { ...@@ -126,7 +126,6 @@ static const struct neigh_ops ndisc_direct_ops = {
struct neigh_table nd_tbl = { struct neigh_table nd_tbl = {
.family = AF_INET6, .family = AF_INET6,
.entry_size = sizeof(struct neighbour) + sizeof(struct in6_addr),
.key_len = sizeof(struct in6_addr), .key_len = sizeof(struct in6_addr),
.hash = ndisc_hash, .hash = ndisc_hash,
.constructor = ndisc_constructor, .constructor = ndisc_constructor,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册