From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] tcp: defer SACK compression after DupThresh Date: Wed, 21 Nov 2018 15:50:51 -0800 (PST) Message-ID: <20181121.155051.1200147906934774148.davem@davemloft.net> References: <20181120135359.7539-1-edumazet@google.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, jean-louis@dupond.be, ncardwell@google.com, ycheng@google.com, eric.dumazet@gmail.com To: edumazet@google.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:47962 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388144AbeKVK12 (ORCPT ); Thu, 22 Nov 2018 05:27:28 -0500 In-Reply-To: <20181120135359.7539-1-edumazet@google.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Eric Dumazet Date: Tue, 20 Nov 2018 05:53:59 -0800 > Jean-Louis reported a TCP regression and bisected to recent SACK > compression. > > After a loss episode (receiver not able to keep up and dropping > packets because its backlog is full), linux TCP stack is sending > a single SACK (DUPACK). > > Sender waits a full RTO timer before recovering losses. > > While RFC 6675 says in section 5, "Algorithm Details", > > (2) If DupAcks < DupThresh but IsLost (HighACK + 1) returns true -- > indicating at least three segments have arrived above the current > cumulative acknowledgment point, which is taken to indicate loss > -- go to step (4). > ... > (4) Invoke fast retransmit and enter loss recovery as follows: > > there are old TCP stacks not implementing this strategy, and > still counting the dupacks before starting fast retransmit. > > While these stacks probably perform poorly when receivers implement > LRO/GRO, we should be a little more gentle to them. > > This patch makes sure we do not enable SACK compression unless > 3 dupacks have been sent since last rcv_nxt update. > > Ideally we should even rearm the timer to send one or two > more DUPACK if no more packets are coming, but that will > be work aiming for linux-4.21. > > Many thanks to Jean-Louis for bisecting the issue, providing > packet captures and testing this patch. > > Fixes: 5d9f4262b7ea ("tcp: add SACK compression") > Reported-by: Jean-Louis Dupond > Tested-by: Jean-Louis Dupond > Signed-off-by: Eric Dumazet > Acked-by: Neal Cardwell Applied and queued up for -stable. Thanks Eric.