summaryrefslogtreecommitdiff
path: root/net/dccp/input.c
diff options
context:
space:
mode:
authorWei Wang <weiwan@google.com>2019-01-25 10:53:19 -0800
committerDavid S. Miller <davem@davemloft.net>2019-01-27 13:29:43 -0800
commit31954cd8bb667030b1c0d3d77f28fe71f06999f9 (patch)
treef00b43f2669ac70db625d8babe06e89cd0a731e2 /net/dccp/input.c
parentfb1b69999130e9800c4e341a2b0f0991cdd8fcfc (diff)
tcp: Refactor pingpong code
Instead of using pingpong as a single bit information, we refactor the code to treat it as a counter. When interactive session is detected, we set pingpong count to TCP_PINGPONG_THRESH. And when pingpong count is >= TCP_PINGPONG_THRESH, we consider the session in pingpong mode. This patch is a pure refactor and sets foundation for the next patch. This patch itself does not change any pingpong logic. Signed-off-by: Wei Wang <weiwan@google.com> Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/input.c')
-rw-r--r--net/dccp/input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dccp/input.c b/net/dccp/input.c
index 85d6c879383d..8d03707abdac 100644
--- a/net/dccp/input.c
+++ b/net/dccp/input.c
@@ -480,7 +480,7 @@ static int dccp_rcv_request_sent_state_process(struct sock *sk,
sk_wake_async(sk, SOCK_WAKE_IO, POLL_OUT);
}
- if (sk->sk_write_pending || icsk->icsk_ack.pingpong ||
+ if (sk->sk_write_pending || inet_csk_in_pingpong_mode(sk) ||
icsk->icsk_accept_queue.rskq_defer_accept) {
/* Save one ACK. Data will be ready after
* several ticks, if write_pending is set.