OSDN Git Service

tcp: Refactor pingpong code
authorWei Wang <weiwan@google.com>
Fri, 25 Jan 2019 18:53:19 +0000 (10:53 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 27 Jan 2019 21:29:43 +0000 (13:29 -0800)
commit31954cd8bb667030b1c0d3d77f28fe71f06999f9
treef00b43f2669ac70db625d8babe06e89cd0a731e2
parentfb1b69999130e9800c4e341a2b0f0991cdd8fcfc
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>
include/net/inet_connection_sock.h
net/dccp/input.c
net/dccp/timer.c
net/ipv4/tcp.c
net/ipv4/tcp_input.c
net/ipv4/tcp_ipv4.c
net/ipv4/tcp_output.c
net/ipv4/tcp_timer.c
net/ipv6/tcp_ipv6.c