diff options
author | Wei Wang <weiwan@google.com> | 2019-01-25 13:53:19 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-01-27 16:29:43 -0500 |
commit | 31954cd8bb667030b1c0d3d77f28fe71f06999f9 (patch) | |
tree | f00b43f2669ac70db625d8babe06e89cd0a731e2 /net/ipv4/tcp_ipv4.c | |
parent | fb1b69999130e9800c4e341a2b0f0991cdd8fcfc (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/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index efc6fef692ff..662b034f1795 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -2437,7 +2437,7 @@ static void get_tcp4_sock(struct sock *sk, struct seq_file *f, int i) | |||
2437 | refcount_read(&sk->sk_refcnt), sk, | 2437 | refcount_read(&sk->sk_refcnt), sk, |
2438 | jiffies_to_clock_t(icsk->icsk_rto), | 2438 | jiffies_to_clock_t(icsk->icsk_rto), |
2439 | jiffies_to_clock_t(icsk->icsk_ack.ato), | 2439 | jiffies_to_clock_t(icsk->icsk_ack.ato), |
2440 | (icsk->icsk_ack.quick << 1) | icsk->icsk_ack.pingpong, | 2440 | (icsk->icsk_ack.quick << 1) | inet_csk_in_pingpong_mode(sk), |
2441 | tp->snd_cwnd, | 2441 | tp->snd_cwnd, |
2442 | state == TCP_LISTEN ? | 2442 | state == TCP_LISTEN ? |
2443 | fastopenq->max_qlen : | 2443 | fastopenq->max_qlen : |