diff options
author | Eric Dumazet <edumazet@google.com> | 2015-10-05 06:08:11 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-05 11:45:27 +0200 |
commit | a1a5344ddbe8fd3e080013b317ac9a664490cfdf (patch) | |
tree | 75c793a05dd64db3df05f804e429bae45ead20d1 /include/net/inet_sock.h | |
parent | net: use sk_fullsock() in __netdev_pick_tx() (diff) | |
download | linux-a1a5344ddbe8fd3e080013b317ac9a664490cfdf.tar.xz linux-a1a5344ddbe8fd3e080013b317ac9a664490cfdf.zip |
tcp: avoid two atomic ops for syncookies
inet_reqsk_alloc() is used to allocate a temporary request
in order to generate a SYNACK with a cookie. Then later,
syncookie validation also uses a temporary request.
These paths already took a reference on listener refcount,
we can avoid a couple of atomic operations.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/inet_sock.h')
-rw-r--r-- | include/net/inet_sock.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index 47eb67b08abd..f5bf7310e334 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h @@ -245,7 +245,8 @@ static inline unsigned int __inet_ehashfn(const __be32 laddr, } struct request_sock *inet_reqsk_alloc(const struct request_sock_ops *ops, - struct sock *sk_listener); + struct sock *sk_listener, + bool attach_listener); static inline __u8 inet_sk_flowi_flags(const struct sock *sk) { |