]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: remove obsolete check in __tcp_retransmit_skb()
authorEric Dumazet <edumazet@google.com>
Thu, 11 Mar 2021 20:35:06 +0000 (12:35 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 12 Mar 2021 02:35:31 +0000 (18:35 -0800)
commitf84591747fcd6693dd4c466b2fd671bd18fecf16
tree7c530d5490a1fc493fd3df9483501b01bd040d3a
parentee314065d310ce74acf850078fd0a96f2727d1a4
tcp: remove obsolete check in __tcp_retransmit_skb()

TSQ provides a nice way to avoid bufferbloat on individual socket,
including retransmit packets. We can get rid of the old
heuristic:

/* Do not sent more than we queued. 1/4 is reserved for possible
 * copying overhead: fragmentation, tunneling, mangling etc.
 */
if (refcount_read(&sk->sk_wmem_alloc) >
    min_t(u32, sk->sk_wmem_queued + (sk->sk_wmem_queued >> 2),
  sk->sk_sndbuf))
return -EAGAIN;

This heuristic was giving false positives according to Jakub,
whenever TX completions are delayed above RTT. (Ack packets
are processed by TCP stack before clones are orphaned/freed)

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Jakub Kicinski <kuba@kernel.org>
Cc: Neal Cardwell <ncardwell@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_output.c