Hello! On 03/09/2018 05:10 PM, Ilpo Järvinen wrote:
> A miscalculation for the number of acknowledged packets occurs during > RTO recovery whenever SACK is not enabled and a cumulative ACK covers > any non-retransmitted skbs. The reason is that pkts_acked value > calculated in tcp_clean_rtx_queue is not correct for slow start after > RTO as it may include segments that were not lost and therefore did > not need retransmissions in the slow start following the RTO. Then > tcp_slow_start will add the excess into cwnd bloating it and > triggering a burst. > > Instead, we want to pass only the number of retransmitted segments > that were covered by the cumulative ACK (and potentially newly sent > data segments too if the cumulative ACK covers that far). > > Signed-off-by: Ilpo Järvinen <ilpo.jarvi...@helsinki.fi> > --- > net/ipv4/tcp_input.c | 19 +++++++++++++++++-- > 1 file changed, 17 insertions(+), 2 deletions(-) > > diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c > index 9a1b3c1..0305f6d 100644 > --- a/net/ipv4/tcp_input.c > +++ b/net/ipv4/tcp_input.c [...] > @@ -3068,8 +3072,11 @@ static int tcp_clean_rtx_queue(struct sock *sk, u32 > prior_fack, > last_in_flight = TCP_SKB_CB(skb)->tx.in_flight; > if (before(start_seq, reord)) > reord = start_seq; > - if (!after(scb->end_seq, tp->high_seq)) > + if (!after(scb->end_seq, tp->high_seq)) { > flag |= FLAG_ORIG_SACK_ACKED; > + } else { > + newdata_acked += acked_pcount; > + } Why add {} where they're not needed? [...] MBR, Sergei