aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ipv6.h
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-03-25 13:26:21 -0400
committerYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-03-25 15:39:55 -0400
commit3b1e0a655f8eba44ab1ee2a1068d169ccfb853b9 (patch)
tree09edb35f32ebcfb1b4dad904425128a110ef16ee /include/linux/ipv6.h
parentc346dca10840a874240c78efe3f39acf4312a1f2 (diff)
[NET] NETNS: Omit sock->sk_net without CONFIG_NET_NS.
Introduce per-sock inlines: sock_net(), sock_net_set() and per-inet_timewait_sock inlines: twsk_net(), twsk_net_set(). Without CONFIG_NET_NS, no namespace other than &init_net exists. Let's explicitly define them to help compiler optimizations. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'include/linux/ipv6.h')
-rw-r--r--include/linux/ipv6.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index c9ba0da16ce9..b90d3d461d4e 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -481,7 +481,7 @@ static inline struct raw6_sock *raw6_sk(const struct sock *sk)
481#endif /* defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */ 481#endif /* defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */
482 482
483#define INET6_MATCH(__sk, __net, __hash, __saddr, __daddr, __ports, __dif)\ 483#define INET6_MATCH(__sk, __net, __hash, __saddr, __daddr, __ports, __dif)\
484 (((__sk)->sk_hash == (__hash)) && ((__sk)->sk_net == (__net)) && \ 484 (((__sk)->sk_hash == (__hash)) && sock_net((__sk)) == (__net) && \
485 ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \ 485 ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \
486 ((__sk)->sk_family == AF_INET6) && \ 486 ((__sk)->sk_family == AF_INET6) && \
487 ipv6_addr_equal(&inet6_sk(__sk)->daddr, (__saddr)) && \ 487 ipv6_addr_equal(&inet6_sk(__sk)->daddr, (__saddr)) && \
@@ -489,7 +489,7 @@ static inline struct raw6_sock *raw6_sk(const struct sock *sk)
489 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) 489 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif))))
490 490
491#define INET6_TW_MATCH(__sk, __net, __hash, __saddr, __daddr, __ports, __dif) \ 491#define INET6_TW_MATCH(__sk, __net, __hash, __saddr, __daddr, __ports, __dif) \
492 (((__sk)->sk_hash == (__hash)) && ((__sk)->sk_net == (__net)) && \ 492 (((__sk)->sk_hash == (__hash)) && sock_net((__sk)) == (__net) && \
493 (*((__portpair *)&(inet_twsk(__sk)->tw_dport)) == (__ports)) && \ 493 (*((__portpair *)&(inet_twsk(__sk)->tw_dport)) == (__ports)) && \
494 ((__sk)->sk_family == PF_INET6) && \ 494 ((__sk)->sk_family == PF_INET6) && \
495 (ipv6_addr_equal(&inet6_twsk(__sk)->tw_v6_daddr, (__saddr))) && \ 495 (ipv6_addr_equal(&inet6_twsk(__sk)->tw_v6_daddr, (__saddr))) && \