diff options
author | David S. Miller <davem@davemloft.net> | 2015-10-05 02:46:26 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-05 02:46:26 -0700 |
commit | 2472186f58ee1e4b9ca194245fef03931f6de90a (patch) | |
tree | 75c793a05dd64db3df05f804e429bae45ead20d1 /include/linux/ipv6.h | |
parent | Merge branch 'bridge-netlink' (diff) | |
parent | tcp: avoid two atomic ops for syncookies (diff) | |
download | linux-dev-2472186f58ee1e4b9ca194245fef03931f6de90a.tar.xz linux-dev-2472186f58ee1e4b9ca194245fef03931f6de90a.zip |
Merge branch 'tcp-listener-fixes-and-improvement'
Eric Dumazet says:
====================
tcp: lockless listener fixes and improvement
This fixes issues with TCP FastOpen vs lockless listeners,
and SYNACK being attached to request sockets.
Then, last patch brings performance improvement for
syncookies generation and validation.
Tested under a 4.3 Mpps SYNFLOOD attack, new perf profile looks
like :
12.11% [kernel] [k] sha_transform
5.83% [kernel] [k] tcp_conn_request
4.59% [kernel] [k] __inet_lookup_listener
4.11% [kernel] [k] ipt_do_table
3.91% [kernel] [k] tcp_make_synack
3.05% [kernel] [k] fib_table_lookup
2.74% [kernel] [k] sock_wfree
2.66% [kernel] [k] memcpy_erms
2.12% [kernel] [k] tcp_v4_rcv
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/ipv6.h')
-rw-r--r-- | include/linux/ipv6.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index f1f32af6d9b9..0ef2a97ccdb5 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h @@ -264,9 +264,9 @@ struct tcp6_timewait_sock { }; #if IS_ENABLED(CONFIG_IPV6) -static inline struct ipv6_pinfo * inet6_sk(const struct sock *__sk) +static inline struct ipv6_pinfo *inet6_sk(const struct sock *__sk) { - return inet_sk(__sk)->pinet6; + return sk_fullsock(__sk) ? inet_sk(__sk)->pinet6 : NULL; } static inline struct raw6_sock *raw6_sk(const struct sock *sk) |