]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
tcp: align tcp_xmit_size_goal() on tcp_tso_autosize()
authorEric Dumazet <edumazet@google.com>
Thu, 5 Mar 2015 16:03:06 +0000 (08:03 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Mar 2015 03:31:12 +0000 (22:31 -0500)
commit6c09fa09d468d730eecd7122122175da772d3b09
tree65209a0ed3e197683661a5c1ee7d60be634a9c2f
parente9647d1e74a9778539ad3232e58833210c1935f5
tcp: align tcp_xmit_size_goal() on tcp_tso_autosize()

With some mss values, it is possible tcp_xmit_size_goal() puts
one segment more in TSO packet than tcp_tso_autosize().

We send then one TSO packet followed by one single MSS.

It is not a serious bug, but we can do slightly better, especially
for drivers using netif_set_gso_max_size() to lower gso_max_size.

Using same formula avoids these corner cases and makes
tcp_xmit_size_goal() a bit faster.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Fixes: 605ad7f184b6 ("tcp: refine TSO autosizing")
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp.c