Bugzilla – Bug 2547
dead assignment on various tcp congestion control
Last modified: 2016-11-16 08:43:44 UTC
Created attachment 2667 [details] patch if (tcb->m_cWnd < tcb->m_ssThresh) { NS_LOG_LOGIC ("In slow start, invoke NewReno slow start."); segmentsAcked = TcpNewReno::SlowStart (tcb, segmentsAcked); // Value stored to 'segmentsAcked' is never read } In many congestion control algorithms, you have a code similar to this snippet. The rationale of having such return value was to catch the corner case in which the socket is in slow start (cwnd < ssthresh) but receive an amount of acks (through a cumulative ack) that exceeds that threshold (cWnd + ack >= ssthresh). In this case, we are allowed to call congestion avoidance for the acked segment that remains. Actually, only NewReno implementation take advandage of this, because other algorithms re-implement this choice, through IncrementWindow, without using the feature (that, as the error says, is never read again). My proposal is to change the implementation to re-implement only the CongestionAvoidance part. The only different case is in TcpVegas and TcpVeno, since the calculations needs to stay inside IncreaseWindow. In practice, to eliminate the error it is simply matter of removing the assignment.
Fixed 12411:73c606d1f79b, just by removing the useless assignments.