diff options
author | Eric Dumazet <edumazet@google.com> | 2016-04-29 14:16:47 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-05-02 17:02:25 -0400 |
commit | c10d9310edf5aa4a676991139d1a43ec7d87e56b (patch) | |
tree | 8ba2a9ec1a83011976369f96481220cd7945eab6 /net/ipv4/tcp.c | |
parent | 5e59c83f2335d634946e1a4fe7bc1e921930f132 (diff) | |
download | blackbird-op-linux-c10d9310edf5aa4a676991139d1a43ec7d87e56b.tar.gz blackbird-op-linux-c10d9310edf5aa4a676991139d1a43ec7d87e56b.zip |
tcp: do not assume TCP code is non preemptible
We want to to make TCP stack preemptible, as draining prequeue
and backlog queues can take lot of time.
Many SNMP updates were assuming that BH (and preemption) was disabled.
Need to convert some __NET_INC_STATS() calls to NET_INC_STATS()
and some __TCP_INC_STATS() to TCP_INC_STATS()
Before using this_cpu_ptr(net->ipv4.tcp_sk) in tcp_v4_send_reset()
and tcp_v4_send_ack(), we add an explicit preempt disabled section.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index cb4d1cabb42c..b24c6ed4a04f 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -3095,7 +3095,7 @@ void tcp_done(struct sock *sk) struct request_sock *req = tcp_sk(sk)->fastopen_rsk; if (sk->sk_state == TCP_SYN_SENT || sk->sk_state == TCP_SYN_RECV) - __TCP_INC_STATS(sock_net(sk), TCP_MIB_ATTEMPTFAILS); + TCP_INC_STATS(sock_net(sk), TCP_MIB_ATTEMPTFAILS); tcp_set_state(sk, TCP_CLOSE); tcp_clear_xmit_timers(sk); |