diff options
author | David Ahern <dsa@cumulusnetworks.com> | 2015-08-28 02:06:59 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-28 23:32:35 +0300 |
commit | 72afa352d6a3d4da7783b5ddee02b94be49e051a (patch) | |
tree | 6ed3a609f27a97668c757e36215e56fda458c9b7 /include/net/ip.h | |
parent | 8f58336d3f78aef61c8023c18546155f5fdf3224 (diff) | |
download | linux-72afa352d6a3d4da7783b5ddee02b94be49e051a.tar.xz |
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>
Diffstat (limited to 'include/net/ip.h')
-rw-r--r-- | include/net/ip.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/ip.h b/include/net/ip.h index bee5f3582e38..7b9e1c782aa3 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -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); /* |