tcp: rfc-5681: implementing an ideal timer
|Reported by:||a-star||Owned by:||axeld|
|Component:||Network & Internet/TCP||Version:||R1/Development|
|Keywords:||tcp, gsoc, ideal timer||Cc:|
Under additional considerations, rfc 5681 discusses the ideal timer:
“After an idle period, TCP cannot use the ACK clock to strobe new segments into the network, as all the ACKs have drained from the network. In addition, changing network conditions may have rendered TCP’s notion of the available end-to-end network capacity between two endpoints. ”
“When TCP has not received a segment for more than one retransmission timeout, cwnd is reduced to the value of the restart window (RW) before transmission begins. We define RW = min(IW, cwnd)” where IW is the same described above in the slow start patch.
What I have done:
Whenever new data is received and for the time being we are acting as only a receiver, we reset the ideal timer.
When we are the sender, and all inflight data gets acknowledged, instead of cancelling the retransmission timer, we use it as Ideal timer. I have tried to avoid adding an extra timer since the same work can be accomplished using the already existing retransmission timer as the cycle for the ideal timer also equals RTO.
Upon the fire of the retransmission timer, _Retransmit is called. I have added a condition to check whether the timer was fired due to the ideal timeout or we actually need to retransmit a segment.