diff options
author | David Ahern <dsa@cumulusnetworks.com> | 2015-08-28 01:06:59 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-28 22:32:35 +0200 |
commit | 72afa352d6a3d4da7783b5ddee02b94be49e051a (patch) | |
tree | 6ed3a609f27a97668c757e36215e56fda458c9b7 /include/net/ip.h | |
parent | net: Add ethernet header for pass through VRF device (diff) | |
download | linux-72afa352d6a3d4da7783b5ddee02b94be49e051a.tar.xz linux-72afa352d6a3d4da7783b5ddee02b94be49e051a.zip |
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); /* |