Re: [PATCH] tcp: fix marked lost packets not being retransmitted

From: David Miller
Date: Wed Jan 15 2020 - 16:37:21 EST


From: Pengcheng Yang <yangpc@xxxxxxxxxx>
Date: Tue, 14 Jan 2020 17:23:40 +0800

> When the packet pointed to by retransmit_skb_hint is unlinked by ACK,
> retransmit_skb_hint will be set to NULL in tcp_clean_rtx_queue().
> If packet loss is detected at this time, retransmit_skb_hint will be set
> to point to the current packet loss in tcp_verify_retransmit_hint(),
> then the packets that were previously marked lost but not retransmitted
> due to the restriction of cwnd will be skipped and cannot be
> retransmitted.
>
> To fix this, when retransmit_skb_hint is NULL, retransmit_skb_hint can
> be reset only after all marked lost packets are retransmitted
> (retrans_out >= lost_out), otherwise we need to traverse from
> tcp_rtx_queue_head in tcp_xmit_retransmit_queue().
>
> Packetdrill to demonstrate:
...
> Signed-off-by: Pengcheng Yang <yangpc@xxxxxxxxxx>

Applied, thank you.