diff options
| author | Eric Dumazet <[email protected]> | 2021-03-11 20:35:06 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2021-03-12 02:35:31 +0000 |
| commit | ac3959fd0dcc0e49298ea5cadfe257db0e58ef8b (patch) | |
| tree | 7c530d5490a1fc493fd3df9483501b01bd040d3a /net/ipv4/tcp_output.c | |
| parent | tcp: consider using standard rtx logic in tcp_rcv_fastopen_synack() (diff) | |
| download | kernel-ac3959fd0dcc0e49298ea5cadfe257db0e58ef8b.tar.gz kernel-ac3959fd0dcc0e49298ea5cadfe257db0e58ef8b.zip | |
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 <[email protected]>
Reported-by: Jakub Kicinski <[email protected]>
Cc: Neal Cardwell <[email protected]>
Cc: Yuchung Cheng <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv4/tcp_output.c')
| -rw-r--r-- | net/ipv4/tcp_output.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 0dbf208a4f2f..bde781f46b41 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -3151,14 +3151,6 @@ int __tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb, int segs) if (icsk->icsk_mtup.probe_size) icsk->icsk_mtup.probe_size = 0; - /* 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; - if (skb_still_in_host_queue(sk, skb)) return -EBUSY; |
