mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
tcp: use sequence to break TS ties for RACK loss detection
The packets inside a jumbo skb (e.g., TSO) share the same skb timestamp, even though they are sent sequentially on the wire. Since RACK is based on time, it can not detect some packets inside the same skb are lost. However, we can leverage the packet sequence numbers as extended timestamps to detect losses. Therefore, when RACK timestamp is identical to skb's timestamp (i.e., one of the packets of the skb is acked or sacked), we use the sequence numbers of the acked and unacked packets to break ties. We can use the same sequence logic to advance RACK xmit time as well to detect more losses and avoid timeout. Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Neal Cardwell <ncardwell@google.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
57dde7f70d
commit
1d0833df59
4 changed files with 19 additions and 6 deletions
|
@ -1218,7 +1218,8 @@ static u8 tcp_sacktag_one(struct sock *sk,
|
|||
return sacked;
|
||||
|
||||
if (!(sacked & TCPCB_SACKED_ACKED)) {
|
||||
tcp_rack_advance(tp, sacked, xmit_time, &state->ack_time);
|
||||
tcp_rack_advance(tp, sacked, end_seq,
|
||||
xmit_time, &state->ack_time);
|
||||
|
||||
if (sacked & TCPCB_SACKED_RETRANS) {
|
||||
/* If the segment is not tagged as lost,
|
||||
|
@ -3171,7 +3172,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets,
|
|||
} else if (tcp_is_sack(tp)) {
|
||||
tp->delivered += acked_pcount;
|
||||
if (!tcp_skb_spurious_retrans(tp, skb))
|
||||
tcp_rack_advance(tp, sacked,
|
||||
tcp_rack_advance(tp, sacked, scb->end_seq,
|
||||
&skb->skb_mstamp,
|
||||
&sack->ack_time);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue