• Eric Dumazet's avatar
    tcp: remove obsolete check in __tcp_retransmit_skb() · ac3959fd
    Eric Dumazet authored
    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: default avatarEric Dumazet <edumazet@google.com>
    Reported-by: default avatarJakub Kicinski <kuba@kernel.org>
    Cc: Neal Cardwell <ncardwell@google.com>
    Cc: Yuchung Cheng <ycheng@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    ac3959fd
tcp_output.c 119 KB