diff options
author | Seymour, Shane M <shane.seymour@hpe.com> | 2016-06-28 23:06:48 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-30 08:17:21 -0400 |
commit | 2631b79f6cb8b634fe41b77de9c4add0ec6b3cae (patch) | |
tree | aa9f2dde1f090f20fbe28e555c41d4f36d7409c4 /include/net | |
parent | b1ed4c4fa9a5ccf325184fd90edc50978ef6e33a (diff) |
tcp: increase size at which tcp_bound_to_half_wnd bounds to > TCP_MSS_DEFAULT
In previous commit 01f83d69844d307be2aa6fea88b0e8fe5cbdb2f4
the following comments were added:
"When peer uses tiny windows, there is no use in packetizing to sub-MSS
pieces for the sake of SWS or making sure there are enough packets in
the pipe for fast recovery."
The test should be > TCP_MSS_DEFAULT not >= 512. This allows low end
devices that send an MSS of 536 (TCP_MSS_DEFAULT) to see better network
performance by sending it 536 bytes of data at a time instead of bounding
to half window size (268). Other network stacks work this way, e.g. HP-UX.
Signed-off-by: Shane Seymour <shane.seymour@hpe.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/tcp.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index a79894b66726..d825858fe4f1 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -589,7 +589,7 @@ static inline int tcp_bound_to_half_wnd(struct tcp_sock *tp, int pktsize) * On the other hand, for extremely large MSS devices, handling * smaller than MSS windows in this way does make sense. */ - if (tp->max_window >= 512) + if (tp->max_window > TCP_MSS_DEFAULT) cutoff = (tp->max_window >> 1); else cutoff = tp->max_window; |