summaryrefslogtreecommitdiffstats
path: root/net/ipv4/devinet.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-03-18 22:00:44 -0400
committerDavid S. Miller <davem@davemloft.net>2015-03-18 22:00:44 -0400
commitfdf9ef8999c0758bf622899e049f2be45ab1f4da (patch)
tree6ef039c1602a24c64549663d734d10d2a382f08e /net/ipv4/devinet.c
parent8f6320de5f6a817ba360be6ae39f721c7f9b26fb (diff)
parent08d2cc3b26554cae21f279b520ae5c2a3b2be421 (diff)
downloadop-kernel-dev-fdf9ef8999c0758bf622899e049f2be45ab1f4da.zip
op-kernel-dev-fdf9ef8999c0758bf622899e049f2be45ab1f4da.tar.gz
Merge branch 'listen_refactor_part_13'
Eric Dumazet says: ==================== inet: tcp listener refactoring, part 13 inet_hash functions are in a bad state : Too much IPv6/IPv4 copy/pasting. Lets refactor a bit. Idea is that we do not want to have an equivalent of inet_csk(sk)->icsk_af_ops for request socks in order to be able to use the right variant. In this patch series, I started to let IPv6/IPv4 converge to common helpers. Idea is to use ipv6_addr_set_v4mapped() even for AF_INET sockets, so that we can test if (sk->sk_family == AF_INET6 && !ipv6_addr_v4mapped(&sk->sk_v6_daddr)) to tell if we deal with an IPv6 socket, or IPv4 one, at least in slow paths. Ideally, we could save 8 bytes per struct sock_common, if we alias skc_daddr & skc_rcv_saddr to skc_v6_daddr[3]/skc_v6_rcv_saddr[3]. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r--net/ipv4/devinet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 5105759..375dc71 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -107,7 +107,7 @@ static const struct nla_policy ifa_ipv4_policy[IFA_MAX+1] = {
static struct hlist_head inet_addr_lst[IN4_ADDR_HSIZE];
-static u32 inet_addr_hash(struct net *net, __be32 addr)
+static u32 inet_addr_hash(const struct net *net, __be32 addr)
{
u32 val = (__force u32) addr ^ net_hash_mix(net);
OpenPOWER on IntegriCloud