net: Introduce ipv4_addr_hash and use it for tcp metrics

Refactors a common line into helper function.

Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David Ahern 2015-08-27 16:06:59 -07:00 committed by David S. Miller
parent 8f58336d3f
commit 72afa352d6
2 changed files with 11 additions and 6 deletions

View file

@ -458,6 +458,11 @@ static __inline__ void inet_reset_saddr(struct sock *sk)
#endif
static inline unsigned int ipv4_addr_hash(__be32 ip)
{
return (__force unsigned int) ip;
}
bool ip_call_ra_chain(struct sk_buff *skb);
/*