diff options
author | David Ahern | 2015-08-27 16:06:59 -0700 |
---|---|---|
committer | David S. Miller | 2015-08-28 13:32:35 -0700 |
commit | 72afa352d6a3d4da7783b5ddee02b94be49e051a (patch) | |
tree | 6ed3a609f27a97668c757e36215e56fda458c9b7 /include/net | |
parent | 8f58336d3f78aef61c8023c18546155f5fdf3224 (diff) |
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')
-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); /* |