mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 17:11:46 +00:00
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>
This commit is contained in:
parent
fb1b699991
commit
31954cd8bb
9 changed files with 35 additions and 18 deletions
|
@ -2437,7 +2437,7 @@ static void get_tcp4_sock(struct sock *sk, struct seq_file *f, int i)
|
|||
refcount_read(&sk->sk_refcnt), sk,
|
||||
jiffies_to_clock_t(icsk->icsk_rto),
|
||||
jiffies_to_clock_t(icsk->icsk_ack.ato),
|
||||
(icsk->icsk_ack.quick << 1) | icsk->icsk_ack.pingpong,
|
||||
(icsk->icsk_ack.quick << 1) | inet_csk_in_pingpong_mode(sk),
|
||||
tp->snd_cwnd,
|
||||
state == TCP_LISTEN ?
|
||||
fastopenq->max_qlen :
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue