summaryrefslogtreecommitdiffstats
path: root/include/net/ip.h
diff options
context:
space:
mode:
authorDavid Ahern <dsa@cumulusnetworks.com>2015-08-27 16:06:59 -0700
committerDavid S. Miller <davem@davemloft.net>2015-08-28 13:32:35 -0700
commit72afa352d6a3d4da7783b5ddee02b94be49e051a (patch)
tree6ed3a609f27a97668c757e36215e56fda458c9b7 /include/net/ip.h
parent8f58336d3f78aef61c8023c18546155f5fdf3224 (diff)
downloadlinux-72afa352d6a3d4da7783b5ddee02b94be49e051a.tar.bz2
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.h5
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);
/*