aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
Diffstat (limited to 'include/net')
-rw-r--r--include/net/tcp.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 255ca35bea05..e54c76d75495 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -481,7 +481,16 @@ static inline void tcp_clear_xmit_timers(struct sock *sk)
481} 481}
482 482
483extern unsigned int tcp_sync_mss(struct sock *sk, u32 pmtu); 483extern unsigned int tcp_sync_mss(struct sock *sk, u32 pmtu);
484extern unsigned int tcp_current_mss(struct sock *sk, int large); 484extern unsigned int tcp_current_mss(struct sock *sk);
485
486/* Bound MSS / TSO packet size with the half of the window */
487static inline int tcp_bound_to_half_wnd(struct tcp_sock *tp, int pktsize)
488{
489 if (tp->max_window && pktsize > (tp->max_window >> 1))
490 return max(tp->max_window >> 1, 68U - tp->tcp_header_len);
491 else
492 return pktsize;
493}
485 494
486/* tcp.c */ 495/* tcp.c */
487extern void tcp_get_info(struct sock *, struct tcp_info *); 496extern void tcp_get_info(struct sock *, struct tcp_info *);
@@ -822,7 +831,7 @@ static inline void tcp_push_pending_frames(struct sock *sk)
822{ 831{
823 struct tcp_sock *tp = tcp_sk(sk); 832 struct tcp_sock *tp = tcp_sk(sk);
824 833
825 __tcp_push_pending_frames(sk, tcp_current_mss(sk, 1), tp->nonagle); 834 __tcp_push_pending_frames(sk, tcp_current_mss(sk), tp->nonagle);
826} 835}
827 836
828static inline void tcp_init_wl(struct tcp_sock *tp, u32 seq) 837static inline void tcp_init_wl(struct tcp_sock *tp, u32 seq)