Bug 2547 - dead assignment on various tcp congestion control
dead assignment on various tcp congestion control
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: tcp
unspecified
PC Linux
: P5 minor
Assigned To: natale.patriciello
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-11-08 03:42 UTC by natale.patriciello
Modified: 2016-11-16 08:43 UTC (History)
1 user (show)

See Also:


Attachments
patch (6.38 KB, patch)
2016-11-08 03:42 UTC, natale.patriciello
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description natale.patriciello 2016-11-08 03:42:08 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.
Comment 1 natale.patriciello 2016-11-16 08:43:44 UTC
Fixed 12411:73c606d1f79b, just by removing the useless assignments.