From patchwork Mon Jul 25 10:01:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Miller X-Patchwork-Id: 1004082 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6PA4EG3031054 for ; Mon, 25 Jul 2011 10:04:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752005Ab1GYKEA (ORCPT ); Mon, 25 Jul 2011 06:04:00 -0400 Received: from shards.monkeyblade.net ([198.137.202.13]:45777 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751554Ab1GYKDb (ORCPT ); Mon, 25 Jul 2011 06:03:31 -0400 Received: from localhost (74-93-104-98-Washington.hfc.comcastbusiness.net [74.93.104.98]) (authenticated bits=0) by shards.monkeyblade.net (8.14.4/8.14.4) with ESMTP id p6PA1TBb011191 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 25 Jul 2011 03:01:29 -0700 Date: Mon, 25 Jul 2011 03:01:28 -0700 (PDT) Message-Id: <20110725.030128.1460147436708203536.davem@davemloft.net> To: roland@kernel.org CC: linux-rdma@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 4/7] neigh: Do not set tbl->entry_size in ipv4/ipv6 neigh tables. From: David Miller X-Mailer: Mew version 6.3 on Emacs 23.2 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 25 Jul 2011 10:04:14 +0000 (UTC) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (shards.monkeyblade.net [198.137.202.13]); Mon, 25 Jul 2011 03:01:29 -0700 (PDT) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Let the core self-size the neigh entry based upon the key length. Signed-off-by: David S. Miller --- net/atm/clip.c | 1 - net/ipv4/arp.c | 1 - net/ipv6/ndisc.c | 1 - 3 files changed, 0 insertions(+), 3 deletions(-) diff --git a/net/atm/clip.c b/net/atm/clip.c index 5dc4f4e..e19a0e7 100644 --- a/net/atm/clip.c +++ b/net/atm/clip.c @@ -315,7 +315,6 @@ static u32 clip_hash(const void *pkey, const struct net_device *dev, __u32 rnd) static struct neigh_table clip_tbl = { .family = AF_INET, - .entry_size = sizeof(struct neighbour)+sizeof(struct atmarp_entry), .key_len = 4, .hash = clip_hash, .constructor = clip_constructor, diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 96a164a..43f0d15 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c @@ -164,7 +164,6 @@ static const struct neigh_ops arp_broken_ops = { struct neigh_table arp_tbl = { .family = AF_INET, - .entry_size = sizeof(struct neighbour) + 4, .key_len = 4, .hash = arp_hash, .constructor = arp_constructor, diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 9da6e02..2582431 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c @@ -126,7 +126,6 @@ static const struct neigh_ops ndisc_direct_ops = { struct neigh_table nd_tbl = { .family = AF_INET6, - .entry_size = sizeof(struct neighbour) + sizeof(struct in6_addr), .key_len = sizeof(struct in6_addr), .hash = ndisc_hash, .constructor = ndisc_constructor,