SSU: Implement fast retransmit (ticket #2427)
This partially fixes the issue of packets not being retransmitted before they expire in 10 seconds, introduced in 0.9.48 as reported by jogger at http://zzz.i2p/topics/3003 Fast retransmit was also suggested by jogger as a solution and discussed in that thread. This code is based on the requirements for TCP fast retransmit as specified in RFC 5681 but cannot precisely follow the RFC as UDP messages can be dropped without affecting later messages: - nack counter is per-message, not per-connection - some interactions with the retransmit timer when in fast retx mode - msg expiration is currently 10s but max RTO is 60s - interactions with individual fragment transmission implemented in 0.9.48-5 - this is a sender-side fix but it depends on far-end ack resend strategy Maintain a local message sequence number and store it in OMF, previously unused as codel is disabled Removed acked messages from _outboundMessages as usual, but stores message and seq. numbers in a LinkedHashMap, so we may interpret additional acks as nacks. Calculate the highest-acked seq. number for every incoming packet. Marks messages older than highest acked as nacked Fast-retransmits after 3 nacks Window and SST adjustments per RFC 5681 sec. 2.4 Reduce resend ack quantity and timeout to improve odds of receiving "nacks" Disable wakeup of OMF from IMF; should not be needed now that PS calls nudge() PS.acked(partial) now returns true if any fragment was acked, not if complete Log tweaks Still todo: possible additional changes to ack resend strategy; possible parameter adjustments including msg expiration; confirm that OMF wakeup in IMF is not required; further testing and cleanups; take additional ideas from alternative proposal in MR !8; stat tweaks; find related tickets to close Reviewed by and contains code from zlatinb in MR !8 This builds on several previous SSU improvements; see #2427 for a list. ref: gitlab MRs !8 !9 !10 !11
Showing
- history.txt 18 additions, 0 deletionshistory.txt
- router/java/src/net/i2p/router/RouterVersion.java 1 addition, 1 deletionrouter/java/src/net/i2p/router/RouterVersion.java
- router/java/src/net/i2p/router/transport/udp/InboundMessageFragments.java 22 additions, 5 deletions...net/i2p/router/transport/udp/InboundMessageFragments.java
- router/java/src/net/i2p/router/transport/udp/OutboundMessageState.java 22 additions, 1 deletion...rc/net/i2p/router/transport/udp/OutboundMessageState.java
- router/java/src/net/i2p/router/transport/udp/PeerState.java 202 additions, 22 deletionsrouter/java/src/net/i2p/router/transport/udp/PeerState.java
Loading
Please register or sign in to comment