aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/inet_connection_sock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/inet_connection_sock.h')
-rw-r--r--include/net/inet_connection_sock.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
index 179609d1d1ea..ff40e1d08157 100644
--- a/include/net/inet_connection_sock.h
+++ b/include/net/inet_connection_sock.h
@@ -315,7 +315,7 @@ int inet_csk_compat_setsockopt(struct sock *sk, int level, int optname,
315 315
316struct dst_entry *inet_csk_update_pmtu(struct sock *sk, u32 mtu); 316struct dst_entry *inet_csk_update_pmtu(struct sock *sk, u32 mtu);
317 317
318#define TCP_PINGPONG_THRESH 1 318#define TCP_PINGPONG_THRESH 3
319 319
320static inline void inet_csk_enter_pingpong_mode(struct sock *sk) 320static inline void inet_csk_enter_pingpong_mode(struct sock *sk)
321{ 321{
@@ -331,4 +331,12 @@ static inline bool inet_csk_in_pingpong_mode(struct sock *sk)
331{ 331{
332 return inet_csk(sk)->icsk_ack.pingpong >= TCP_PINGPONG_THRESH; 332 return inet_csk(sk)->icsk_ack.pingpong >= TCP_PINGPONG_THRESH;
333} 333}
334
335static inline void inet_csk_inc_pingpong_cnt(struct sock *sk)
336{
337 struct inet_connection_sock *icsk = inet_csk(sk);
338
339 if (icsk->icsk_ack.pingpong < U8_MAX)
340 icsk->icsk_ack.pingpong++;
341}
334#endif /* _INET_CONNECTION_SOCK_H */ 342#endif /* _INET_CONNECTION_SOCK_H */