[roll] Roll fuchsia [netstack3] Use snd.max for ACKs
There are two implementation strategies for retransmission:
1. Store a list of segments that aren't acknowledged
2. Rewind snd.nxt to snd.una when retransmission timer fired
netstack3 uses the second approach because of its simplicity, but it
requires some slight implementation adjustment. It needs to introduce
another send state variable (SND.MAX) to track the next sequence #
that is not part of the retransmission, which is normally referred to
as SND.NXT in RFC. These two values are the same unless during the
retransmission. Thus, whenever the spec asks the impl to send an ACK
with seqnum SND.NXT, we should do so with the SND.MAX. Failure to do
so is OK in most scenarios, but is problematic when retransmission
happens on a self-connected socket. Consider the following events:
1. Two segments of length 5 sent: snd.una=0, snd.nxt=10, rcv.nxt=0
2. They are delayed, so the retransmission timer fired (snd.nxt=0),
and a segment was sent (snd.una=0, snd.nxt=5, rcv.nxt=0).
3. Now the 2 segments in step one arrives:
snd.una=0, snd.nxt=5, rcv.nxt=10,
and it has to produce ACK:
<seq=5, ack=10>
4. This ACK is received so it checks its sequence number:
seq(5) < rcv.nxt(10)
This segment is deemed unacceptable and prompts the connection
to send another ACK <seq=5, ack=10>
...
Now the state machine is stuck forever, ping-ponging this ACK again
and again. This problem goes away if we use snd.max(10) as the seq
num for the ACK packet because it is accepted as 10 >= rcv.nxt(10).
SND.MAX is the largest sequence number ever sent, so it must always
be >= rcv.nxt, otherwise it is a bug for the receiver to receive
something that was never sent to them. snd.nxt in our implementation
doesn't have this property.
Multiply: fuchsia-pkg://fuchsia.com/netstack3_tcp_syscall#meta/netstack3_tcp_syscall_tests_shard_3_of_10.cm
Original-Fixed: 334926865, 334183190
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1030814
Original-Revision: b2bc12a33ec92537e03aa2f3ba79abe7a3720722
GitOrigin-RevId: 884d028ac34ad6c156e042306568f79bd4216893
Change-Id: Iffc1570ab31b3cfe515acf4051d75c5d9bc2d482
This repository contains Fuchsia's Global Integration manifest files.
All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.
Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia on Freenode.
First install Jiri.
Next run:
$ jiri init $ jiri import minimal https://fuchsia.googlesource.com/integration $ jiri update
Third party projects should have their own subdirectory in ./third_party.