Skip to content
Commit 6c09fa09 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

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: default avatarEric Dumazet <edumazet@google.com>
Fixes: 605ad7f1

 ("tcp: refine TSO autosizing")
Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e9647d1e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment