mptcp: add_addr: more tolerant with retrans timeout after errors #98
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ADD_ADDR restransmissions are expected to come ~1s after the last sent packet.
In packetdrill, the timing is compared to the last packet. We would like to tell Packetdrill that the packet is expected to come "1s not after the previous packet but the one before" but that's not possible.
In this test the last packet before the ADD_ADDR retransmission is not the ADD_ADDR that is sent before but it is the injected and faulty echo ADD_ADR. With a (very) slow host, it can takes a bit of time to inject the packet. Because of that, the retransmitted packet can arrive earlier than expected: if the faulty echo ADD_ADDR injection takes X sec, the retransmission of the ADD_ADDR by the kernel will take (1 - X) sec. If X is bigger than the tolerance, the test fails which seems to happen regularly on the public CI.
We should then accept packets being sent less than one second before the injected and faulty echo ADD_ADDR.
Even worst with a debug kernel config:
Injecting the faulty echo and processing packets sent by the kernel can take time and we have situations where packets arrive a few seconds before the expected time by Packetdrill!
Sadly, we cannot tell Packetdrill the packet is expected to be sent in the past. So we need to increment the tolerance a bit. But that's find to do that because a new test has been added in the parent commit: it is focussing on the ADD_ADDR retransmissions without injecting other packets in between. This other test can have stricter expected time.
Closes: multipath-tcp/mptcp_net-next#312
Suggested-by: Paolo Abeni
Signed-off-by: Matthieu Baerts