TCP: extra retransmission
Background: we are comparing the TCP implementation of NS-3 to another network simulator.
From RFC 6675, section 5:
(B) Upon receipt of an ACK that does not cover RecoveryPoint, the
following actions MUST be taken:
(B.1) Use Update () to record the new SACK information conveyed
by the incoming ACK.
(B.2) Use SetPipe () to re-calculate the number of octets still
in the network.
The implementation of the above part contains a conditional retransmission as shown below:
-------------------- src/internet/model/tcp-socket-base.cc --------------------
index 19c4108..ba41649 100644
@@ -2073,13 +2073,6 @@ TcpSocketBase::ProcessAck(const SequenceNumber32& ackNumber,
m_recoveryOps->DoRecovery(m_tcb, currentDelivered);
}
- // If the packet is already retransmitted do not retransmit it
- if (!m_txBuffer->IsRetransmittedDataAcked(ackNumber + m_tcb->m_segmentSize))
- {
- DoRetransmit(); // Assume the next seq is lost. Retransmit lost packet
- m_tcb->m_cWndInfl = SafeSubtraction(m_tcb->m_cWndInfl, bytesAcked);
- }
-
// This partial ACK acknowledge the fact that one segment has been
// previously lost and now successfully received. All others have
// been processed when they come under the form of dupACKs
This code fragment resulted in extra, seemingly unnecessary retransmissions. Commenting the above fragment out was necessary to get identical PCAP traces.
We are unsure what is the reason behind this retransmission, as it is not part of the quoted RFC section.