From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: [PATCH net-next 3/7] net/ipv4: Move arp_hashfn into arp_hash Date: Wed, 5 Dec 2018 15:34:10 -0800 Message-ID: <20181205233414.1386-4-dsahern@kernel.org> References: <20181205233414.1386-1-dsahern@kernel.org> Cc: davem@davemloft.net, David Ahern To: netdev@vger.kernel.org Return-path: Received: from mail.kernel.org ([198.145.29.99]:53892 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728772AbeLEXd1 (ORCPT ); Wed, 5 Dec 2018 18:33:27 -0500 In-Reply-To: <20181205233414.1386-1-dsahern@kernel.org> Sender: netdev-owner@vger.kernel.org List-ID: From: David Ahern There are no more direct references to arp_hashfn so fold it into arp_hash, the hash callback for arp. Signed-off-by: David Ahern --- include/net/arp.h | 8 -------- net/ipv4/arp.c | 5 ++++- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/include/net/arp.h b/include/net/arp.h index a5091f13cd3e..9f433c077b67 100644 --- a/include/net/arp.h +++ b/include/net/arp.h @@ -10,14 +10,6 @@ extern struct neigh_table arp_tbl; -static inline u32 arp_hashfn(const void *pkey, const struct net_device *dev, u32 *hash_rnd) -{ - u32 key = *(const u32 *)pkey; - u32 val = key ^ hash32_ptr(dev); - - return val * hash_rnd[0]; -} - static inline struct neighbour *__ipv4_neigh_lookup_noref(struct net_device *dev, u32 key) { if (dev->flags & (IFF_LOOPBACK | IFF_POINTOPOINT)) diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 850a6f13a082..6b88211287ae 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c @@ -213,7 +213,10 @@ static u32 arp_hash(const void *pkey, const struct net_device *dev, __u32 *hash_rnd) { - return arp_hashfn(pkey, dev, hash_rnd); + u32 key = *(const u32 *)pkey; + u32 val = key ^ hash32_ptr(dev); + + return val * hash_rnd[0]; } static bool arp_key_eq(const struct neighbour *neigh, const void *pkey) -- 2.11.0