A Discrete-Event Network Simulator
API
ns3::TcpCubic Class Reference

The Cubic Congestion Control Algorithm. More...

#include "tcp-cubic.h"

+ Inheritance diagram for ns3::TcpCubic:
+ Collaboration diagram for ns3::TcpCubic:

Public Member Functions

 TcpCubic ()
 
 TcpCubic (const TcpCubic &sock)
 Copy constructor. More...
 
virtual void CongestionStateSet (Ptr< TcpSocketState > tcb, const TcpSocketState::TcpCongState_t newState)
 Trigger events/calculations specific to a congestion state. More...
 
virtual Ptr< TcpCongestionOpsFork ()
 Copy the congestion control algorithm across sockets. More...
 
virtual std::string GetName () const
 Get the name of the congestion control algorithm. More...
 
virtual uint32_t GetSsThresh (Ptr< const TcpSocketState > tcb, uint32_t bytesInFlight)
 Get the slow start threshold after a loss event. More...
 
virtual void IncreaseWindow (Ptr< TcpSocketState > tcb, uint32_t segmentsAcked)
 Congestion avoidance algorithm implementation. More...
 
virtual void PktsAcked (Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt)
 Timing information on received ACK. More...
 
- Public Member Functions inherited from ns3::TcpCongestionOps
 TcpCongestionOps ()
 
 TcpCongestionOps (const TcpCongestionOps &other)
 Copy constructor. More...
 
virtual ~TcpCongestionOps ()
 
virtual void CongControl (Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateConnection &rc, const TcpRateOps::TcpRateSample &rs)
 Called when packets are delivered to update cwnd and pacing rate. More...
 
virtual void CwndEvent (Ptr< TcpSocketState > tcb, const TcpSocketState::TcpCAEvent_t event)
 Trigger events/calculations on occurrence of congestion window event. More...
 
virtual bool HasCongControl () const
 Returns true when Congestion Control Algorithm implements CongControl. More...
 
virtual void Init (Ptr< TcpSocketState > tcb)
 Set configuration required by congestion control algorithm. More...
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
 Destructor. More...
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together. More...
 
void Dispose (void)
 Dispose of this Object. More...
 
AggregateIterator GetAggregateIterator (void) const
 Get an iterator to the Objects aggregated to this one. More...
 
virtual TypeId GetInstanceTypeId (void) const
 Get the most derived TypeId for this Object. More...
 
template<typename T >
Ptr< T > GetObject (void) const
 Get a pointer to the requested aggregated Object. More...
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId. More...
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object. More...
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object. More...
 
void Initialize (void)
 Invoke DoInitialize on all Objects aggregated to this one. More...
 
bool IsInitialized (void) const
 Check if the object has been initialized. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor. More...
 
void GetAttribute (std::string name, AttributeValue &value) const
 Get the value of an attribute, raising fatal errors if unsuccessful. More...
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising erros. More...
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful. More...
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors. More...
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context. More...
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context. More...
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context. More...
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context. More...
 

Static Public Member Functions

static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::TcpCongestionOps
static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 

Private Types

enum  HybridSSDetectionMode { PACKET_TRAIN = 0x1, DELAY = 0x2 }
 Values to detect the Slow Start mode of HyStart. More...
 

Private Member Functions

void CubicReset (Ptr< const TcpSocketState > tcb)
 Reset Cubic parameters. More...
 
Time HystartDelayThresh (const Time &t) const
 Clamp time value in a range. More...
 
void HystartReset (Ptr< const TcpSocketState > tcb)
 Reset HyStart parameters. More...
 
void HystartUpdate (Ptr< TcpSocketState > tcb, const Time &delay)
 Update HyStart parameters. More...
 
uint32_t Update (Ptr< TcpSocketState > tcb)
 Cubic window update after a new ack received. More...
 

Private Attributes

double m_beta
 Beta for cubic multiplicative increase. More...
 
double m_bicK
 Time to origin point from the beginning. More...
 
uint32_t m_bicOriginPoint
 Origin point of bic function. More...
 
double m_c
 Cubic Scaling factor. More...
 
uint8_t m_cntClamp
 Modulo of the (avoided) float division for cWnd. More...
 
Time m_cubicDelta
 Time to wait after recovery before update. More...
 
Time m_currRtt
 Current Rtt. More...
 
uint32_t m_cWndCnt
 cWnd integer-to-float counter More...
 
Time m_delayMin
 Min delay. More...
 
SequenceNumber32 m_endSeq
 End sequence of the round. More...
 
Time m_epochStart
 Beginning of an epoch. More...
 
bool m_fastConvergence
 Enable or disable fast convergence algorithm. More...
 
bool m_found
 The exit point is found? More...
 
bool m_hystart
 Enable or disable HyStart algorithm. More...
 
Time m_hystartAckDelta
 Spacing between ack's indicating train. More...
 
Time m_hystartDelayMax
 Maximum time for hystart algorithm. More...
 
Time m_hystartDelayMin
 Minimum time for hystart algorithm. More...
 
int m_hystartDetect
 Detect way for HyStart algorithm. More...
 
uint32_t m_hystartLowWindow
 Lower bound cWnd for hybrid slow start (segments) More...
 
uint8_t m_hystartMinSamples
 Number of delay samples for detecting the increase of delay. More...
 
uint32_t m_initialCwnd
 Initial cWnd. More...
 
Time m_lastAck
 Last time when the ACK spacing is close. More...
 
uint32_t m_lastMaxCwnd
 Last maximum cWnd. More...
 
Time m_roundStart
 Beginning of each round. More...
 
uint32_t m_sampleCnt
 Count of samples for HyStart. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object. More...
 
virtual void DoDispose (void)
 Destructor implementation. More...
 
virtual void DoInitialize (void)
 Initialize() implementation. More...
 
virtual void NotifyNewAggregate (void)
 Notify all Objects aggregated to this one of a new Object being aggregated. More...
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes. More...
 
virtual void NotifyConstructionCompleted (void)
 Notifier called once the ObjectBase is fully constructed. More...
 

Detailed Description

The Cubic Congestion Control Algorithm.


TCP Cubic is a protocol that enhances the fairness property of Bic while retaining its scalability and stability. The main feature is that the window growth function is defined in real time in order to be independent from the RTT. More specifically, the congestion window of Cubic is determined by a function of the elapsed time from the last window reduction.

The Cubic code is quite similar to that of Bic. The main difference is located in the method Update, an edit necessary for satisfying the Cubic window growth, that can be tuned with the attribute C (the Cubic scaling factor).

Following the Linux implementation, we included the Hybrid Slow Start, that effectively prevents the overshooting of slow start while maintaining a full utilization of the network. This new type of slow start can be disabled through the {HyStart} attribute.

CUBIC TCP is implemented and used by default in Linux kernels 2.6.19 and above; this version follows the implementation in Linux 3.14, which slightly differ from the CUBIC paper. It also features HyStart.

Home page: http://netsrv.csc.ncsu.edu/twiki/bin/view/Main/BIC The work starts from the implementation of CUBIC TCP in Sangtae Ha, Injong Rhee and Lisong Xu, "CUBIC: A New TCP-Friendly High-Speed TCP Variant" in ACM SIGOPS Operating System Review, July 2008. Available from: http://netsrv.csc.ncsu.edu/export/cubic_a_new_tcp_2008.pdf

CUBIC integrates a new slow start algorithm, called HyStart. The details of HyStart are presented in Sangtae Ha and Injong Rhee, "Taming the Elephants: New TCP Slow Start", NCSU TechReport 2008. Available from: http://netsrv.csc.ncsu.edu/export/hystart_techreport_2008.pdf

More information on this implementation: http://dl.acm.org/citation.cfm?id=2756518

Config Paths

ns3::TcpCubic is accessible through the following paths with Config::Set and Config::Connect:

  • "/NodeList/[i]/$ns3::TcpL4Protocol/SocketList/[i]/$ns3::TcpCubic"

Attributes

  • FastConvergence: Enable (true) or disable (false) fast convergence
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read
  • Beta: Beta for multiplicative decrease
    • Set with class: ns3::DoubleValue
    • Underlying type: double 0:1.79769e+308
    • Initial value: 0.7
    • Flags: construct write read
  • HyStart: Enable (true) or disable (false) hybrid slow start algorithm
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read
  • HyStartLowWindow: Lower bound cWnd for hybrid slow start (segments)
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 16
    • Flags: construct write read
  • HyStartDetect: Hybrid Slow Start detection mechanisms:1: packet train, 2: delay, 3: both
    • Set with class: ns3::IntegerValue
    • Underlying type: int32_t 1:3
    • Initial value: 3
    • Flags: construct write read
  • HyStartMinSamples: Number of delay samples for detecting the increase of delay
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 0:255
    • Initial value: 8
    • Flags: construct write read
  • HyStartAckDelta: Spacing between ack's indicating train
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: +2e+06ns
    • Flags: construct write read
  • HyStartDelayMin: Minimum time for hystart algorithm
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: +4e+06ns
    • Flags: construct write read
  • HyStartDelayMax: Maximum time for hystart algorithm
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: +1e+09ns
    • Flags: construct write read
  • CubicDelta: Delta Time to wait after fast recovery before adjusting param
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: +1e+07ns
    • Flags: construct write read
  • CntClamp: Counter value when no losses are detected (counter is used when incrementing cWnd in congestion avoidance, to avoid floating point arithmetic). It is the modulo of the (avoided) division
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 0:255
    • Initial value: 20
    • Flags: construct write read
  • C: Cubic Scaling factor
    • Set with class: ns3::DoubleValue
    • Underlying type: double 0:1.79769e+308
    • Initial value: 0.4
    • Flags: construct write read

Attributes defined in parent class ns3::TcpSocketBase

  • MaxSegLifetime: Maximum segment lifetime in seconds, use for TIME_WAIT state transition to CLOSED state
    • Set with class: ns3::DoubleValue
    • Underlying type: double 0:1.79769e+308
    • Initial value: 120
    • Flags: construct write read
  • MaxWindowSize: Max size of advertised window
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:65535
    • Initial value: 65535
    • Flags: construct write read
  • IcmpCallback: Callback invoked whenever an icmp error is received on this socket.
  • IcmpCallback6: Callback invoked whenever an icmpv6 error is received on this socket.
  • WindowScaling: Enable or disable Window Scaling option
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read
  • Sack: Enable or disable Sack option
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read
  • Timestamp: Enable or disable Timestamp option
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read
  • MinRto: Minimum retransmit timeout value
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: +1e+09ns
    • Flags: construct write read
  • ClockGranularity: Clock Granularity used in RTO calculations
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: +1e+06ns
    • Flags: construct write read
  • TxBuffer: TCP Tx buffer
  • RxBuffer: TCP Rx buffer
  • CongestionOps: Pointer to TcpCongestionOps object
  • ReTxThreshold: Threshold for fast retransmit
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 3
    • Flags: construct write read
  • LimitedTransmit: Enable limited transmit
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read
  • UseEcn: Parameter to set ECN functionality
    • Set with class: ns3::EnumValue
    • Underlying type:
    • Initial value: Off
    • Flags: construct write

Attributes defined in parent class ns3::TcpSocket

  • SndBufSize: TcpSocket maximum transmit buffer size (bytes)
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 131072
    • Flags: construct write read
  • RcvBufSize: TcpSocket maximum receive buffer size (bytes)
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 131072
    • Flags: construct write read
  • SegmentSize: TCP maximum segment size in bytes (may be adjusted based on MTU discovery)
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 536
    • Flags: construct write read
  • InitialSlowStartThreshold: TCP initial slow start threshold (bytes)
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 4294967295
    • Flags: construct write read
  • InitialCwnd: TCP initial congestion window size (segments)
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 10
    • Flags: construct write read
  • ConnTimeout: TCP retransmission timeout when opening connection (seconds)
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: +3e+09ns
    • Flags: construct write read
  • ConnCount: Number of connection attempts (SYN retransmissions) before returning failure
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 6
    • Flags: construct write read
  • DataRetries: Number of data retransmission attempts
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 6
    • Flags: construct write read
  • DelAckTimeout: Timeout value for TCP delayed acks, in seconds
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: +2e+08ns
    • Flags: construct write read
  • DelAckCount: Number of packets to wait before sending a TCP ack
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 2
    • Flags: construct write read
  • TcpNoDelay: Set to true to disable Nagle's algorithm
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read
  • PersistTimeout: Persist timeout to probe for rx window
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: +6e+09ns
    • Flags: construct write read

No TraceSources are defined for this type.

TraceSources defined in parent class ns3::TcpSocketBase

Size of this type is 200 bytes (on a 64-bit architecture).

Definition at line 70 of file tcp-cubic.h.

Member Enumeration Documentation

◆ HybridSSDetectionMode

Values to detect the Slow Start mode of HyStart.

Enumerator
PACKET_TRAIN 

Detection by trains of packet.

DELAY 

Detection by delay value.

Definition at line 100 of file tcp-cubic.h.

Constructor & Destructor Documentation

◆ TcpCubic() [1/2]

ns3::TcpCubic::TcpCubic ( )

Definition at line 95 of file tcp-cubic.cc.

References NS_LOG_FUNCTION.

◆ TcpCubic() [2/2]

ns3::TcpCubic::TcpCubic ( const TcpCubic sock)

Copy constructor.

Parameters
sockSocket to copy

Definition at line 114 of file tcp-cubic.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ CongestionStateSet()

void ns3::TcpCubic::CongestionStateSet ( Ptr< TcpSocketState tcb,
const TcpSocketState::TcpCongState_t  newState 
)
virtual

Trigger events/calculations specific to a congestion state.

This function mimics the notification function set_state in Linux. The function does not change the congestion state in the tcb; it notifies the congestion control algorithm that this state is about to be changed. The tcb->m_congState variable must be separately set; for example:

m_congestionControl->CongestionStateSet (m_tcb, TcpSocketState::CA_RECOVERY);
m_tcb->m_congState = TcpSocketState::CA_RECOVERY;
Parameters
tcbinternal congestion state
newStatenew congestion state to which the TCP is going to switch

Reimplemented from ns3::TcpCongestionOps.

Definition at line 426 of file tcp-cubic.cc.

References ns3::TcpSocketState::CA_LOSS, CubicReset(), HystartReset(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ CubicReset()

void ns3::TcpCubic::CubicReset ( Ptr< const TcpSocketState tcb)
private

Reset Cubic parameters.

Parameters
tcbTransmission Control Block of the connection

Definition at line 438 of file tcp-cubic.cc.

References m_bicK, m_bicOriginPoint, m_delayMin, m_found, m_lastMaxCwnd, ns3::Time::Min(), and NS_LOG_FUNCTION.

Referenced by CongestionStateSet().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Fork()

Ptr< TcpCongestionOps > ns3::TcpCubic::Fork ( )
virtual

Copy the congestion control algorithm across sockets.

Returns
a pointer of the copied object

Implements ns3::TcpCongestionOps.

Definition at line 450 of file tcp-cubic.cc.

References NS_LOG_FUNCTION.

◆ GetName()

std::string ns3::TcpCubic::GetName ( ) const
virtual

Get the name of the congestion control algorithm.

Returns
A string identifying the name

Implements ns3::TcpCongestionOps.

Definition at line 146 of file tcp-cubic.cc.

◆ GetSsThresh()

uint32_t ns3::TcpCubic::GetSsThresh ( Ptr< const TcpSocketState tcb,
uint32_t  bytesInFlight 
)
virtual

Get the slow start threshold after a loss event.

Is guaranteed that the congestion control state (TcpAckState_t) is changed BEFORE the invocation of this method. The implementator should return the slow start threshold (and not change it directly) because, in the future, the TCP implementation may require to instantly recover from a loss event (e.g. when there is a network with an high reordering factor).

Parameters
tcbinternal congestion state
bytesInFlighttotal bytes in flight
Returns
Slow start threshold

Implements ns3::TcpCongestionOps.

Definition at line 396 of file tcp-cubic.cc.

References m_beta, m_epochStart, m_fastConvergence, m_lastMaxCwnd, max, ns3::Time::Min(), NS_LOG_DEBUG, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ GetTypeId()

◆ HystartDelayThresh()

Time ns3::TcpCubic::HystartDelayThresh ( const Time t) const
private

Clamp time value in a range.

The returned value is t, clamped in a range specified by attributes (HystartDelayMin < t < HystartDelayMax)

Parameters
tTime value to clamp
Returns
t itself if it is in range, otherwise the min or max value

Definition at line 378 of file tcp-cubic.cc.

References m_hystartDelayMax, m_hystartDelayMin, and NS_LOG_FUNCTION.

Referenced by HystartUpdate().

+ Here is the caller graph for this function:

◆ HystartReset()

void ns3::TcpCubic::HystartReset ( Ptr< const TcpSocketState tcb)
private

Reset HyStart parameters.

Parameters
tcbTransmission Control Block of the connection

Definition at line 152 of file tcp-cubic.cc.

References m_currRtt, m_endSeq, m_lastAck, m_roundStart, m_sampleCnt, ns3::Time::Min(), ns3::Simulator::Now(), and NS_LOG_FUNCTION.

Referenced by CongestionStateSet(), and IncreaseWindow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HystartUpdate()

void ns3::TcpCubic::HystartUpdate ( Ptr< TcpSocketState tcb,
const Time delay 
)
private

Update HyStart parameters.

Parameters
tcbTransmission Control Block of the connection
delayDelay for HyStart algorithm

Definition at line 328 of file tcp-cubic.cc.

References DELAY, HystartDelayThresh(), m_currRtt, ns3::TcpSocketState::m_cWnd, m_delayMin, m_found, m_hystartAckDelta, m_hystartDetect, m_hystartMinSamples, m_lastAck, m_roundStart, m_sampleCnt, ns3::TcpSocketState::m_ssThresh, ns3::Time::Min(), ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, and PACKET_TRAIN.

Referenced by PktsAcked().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IncreaseWindow()

void ns3::TcpCubic::IncreaseWindow ( Ptr< TcpSocketState tcb,
uint32_t  segmentsAcked 
)
virtual

Congestion avoidance algorithm implementation.

Mimic the function cong_avoid in Linux. New segments have been ACKed, and the congestion control duty is to update the window.

The function is allowed to change directly cWnd and/or ssThresh.

Parameters
tcbinternal congestion state
segmentsAckedcount of segments acked

Reimplemented from ns3::TcpCongestionOps.

Definition at line 163 of file tcp-cubic.cc.

References HystartReset(), ns3::TcpSocketState::m_cWnd, m_cWndCnt, m_endSeq, m_hystart, ns3::TcpSocketState::m_lastAckedSeq, ns3::TcpSocketState::m_segmentSize, ns3::TcpSocketState::m_ssThresh, NS_LOG_FUNCTION, NS_LOG_INFO, and Update().

+ Here is the call graph for this function:

◆ PktsAcked()

void ns3::TcpCubic::PktsAcked ( Ptr< TcpSocketState tcb,
uint32_t  segmentsAcked,
const Time rtt 
)
virtual

Timing information on received ACK.

The function is called every time an ACK is received (only one time also for cumulative ACKs) and contains timing information. It is optional (congestion controls need not implement it) and the default implementation does nothing.

Parameters
tcbinternal congestion state
segmentsAckedcount of segments acked
rttlast rtt

Reimplemented from ns3::TcpCongestionOps.

Definition at line 300 of file tcp-cubic.cc.

References HystartUpdate(), m_cubicDelta, ns3::TcpSocketState::m_cWnd, m_delayMin, m_epochStart, m_hystart, m_hystartLowWindow, ns3::TcpSocketState::m_segmentSize, ns3::TcpSocketState::m_ssThresh, ns3::Time::Min(), ns3::Simulator::Now(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ Update()

uint32_t ns3::TcpCubic::Update ( Ptr< TcpSocketState tcb)
private

Cubic window update after a new ack received.

Parameters
tcbTransmission Control Block of the connection
Returns
the congestion window update counter

Definition at line 215 of file tcp-cubic.cc.

References ns3::TcpSocketState::GetCwndInSegments(), ns3::Time::GetSeconds(), m_bicK, m_bicOriginPoint, m_c, m_cntClamp, m_delayMin, m_epochStart, m_lastMaxCwnd, max, ns3::Time::Min(), ns3::Simulator::Now(), NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by IncreaseWindow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_beta

double ns3::TcpCubic::m_beta
private

Beta for cubic multiplicative increase.

Definition at line 107 of file tcp-cubic.h.

Referenced by GetSsThresh(), and GetTypeId().

◆ m_bicK

double ns3::TcpCubic::m_bicK
private

Time to origin point from the beginning.

Definition at line 126 of file tcp-cubic.h.

Referenced by CubicReset(), and Update().

◆ m_bicOriginPoint

uint32_t ns3::TcpCubic::m_bicOriginPoint
private

Origin point of bic function.

Definition at line 125 of file tcp-cubic.h.

Referenced by CubicReset(), and Update().

◆ m_c

double ns3::TcpCubic::m_c
private

Cubic Scaling factor.

Definition at line 120 of file tcp-cubic.h.

Referenced by GetTypeId(), and Update().

◆ m_cntClamp

uint8_t ns3::TcpCubic::m_cntClamp
private

Modulo of the (avoided) float division for cWnd.

Definition at line 118 of file tcp-cubic.h.

Referenced by GetTypeId(), and Update().

◆ m_cubicDelta

Time ns3::TcpCubic::m_cubicDelta
private

Time to wait after recovery before update.

Definition at line 134 of file tcp-cubic.h.

Referenced by GetTypeId(), and PktsAcked().

◆ m_currRtt

Time ns3::TcpCubic::m_currRtt
private

Current Rtt.

Definition at line 135 of file tcp-cubic.h.

Referenced by HystartReset(), and HystartUpdate().

◆ m_cWndCnt

uint32_t ns3::TcpCubic::m_cWndCnt
private

cWnd integer-to-float counter

Definition at line 123 of file tcp-cubic.h.

Referenced by IncreaseWindow().

◆ m_delayMin

Time ns3::TcpCubic::m_delayMin
private

Min delay.

Definition at line 128 of file tcp-cubic.h.

Referenced by CubicReset(), HystartUpdate(), PktsAcked(), and Update().

◆ m_endSeq

SequenceNumber32 ns3::TcpCubic::m_endSeq
private

End sequence of the round.

Definition at line 132 of file tcp-cubic.h.

Referenced by HystartReset(), and IncreaseWindow().

◆ m_epochStart

Time ns3::TcpCubic::m_epochStart
private

Beginning of an epoch.

Definition at line 129 of file tcp-cubic.h.

Referenced by GetSsThresh(), PktsAcked(), and Update().

◆ m_fastConvergence

bool ns3::TcpCubic::m_fastConvergence
private

Enable or disable fast convergence algorithm.

Definition at line 106 of file tcp-cubic.h.

Referenced by GetSsThresh(), and GetTypeId().

◆ m_found

bool ns3::TcpCubic::m_found
private

The exit point is found?

Definition at line 130 of file tcp-cubic.h.

Referenced by CubicReset(), and HystartUpdate().

◆ m_hystart

bool ns3::TcpCubic::m_hystart
private

Enable or disable HyStart algorithm.

Definition at line 109 of file tcp-cubic.h.

Referenced by GetTypeId(), IncreaseWindow(), and PktsAcked().

◆ m_hystartAckDelta

Time ns3::TcpCubic::m_hystartAckDelta
private

Spacing between ack's indicating train.

Definition at line 112 of file tcp-cubic.h.

Referenced by GetTypeId(), and HystartUpdate().

◆ m_hystartDelayMax

Time ns3::TcpCubic::m_hystartDelayMax
private

Maximum time for hystart algorithm.

Definition at line 114 of file tcp-cubic.h.

Referenced by GetTypeId(), and HystartDelayThresh().

◆ m_hystartDelayMin

Time ns3::TcpCubic::m_hystartDelayMin
private

Minimum time for hystart algorithm.

Definition at line 113 of file tcp-cubic.h.

Referenced by GetTypeId(), and HystartDelayThresh().

◆ m_hystartDetect

int ns3::TcpCubic::m_hystartDetect
private

Detect way for HyStart algorithm.

See also
HybridSSDetectionMode

Definition at line 110 of file tcp-cubic.h.

Referenced by GetTypeId(), and HystartUpdate().

◆ m_hystartLowWindow

uint32_t ns3::TcpCubic::m_hystartLowWindow
private

Lower bound cWnd for hybrid slow start (segments)

Definition at line 111 of file tcp-cubic.h.

Referenced by GetTypeId(), and PktsAcked().

◆ m_hystartMinSamples

uint8_t ns3::TcpCubic::m_hystartMinSamples
private

Number of delay samples for detecting the increase of delay.

Definition at line 115 of file tcp-cubic.h.

Referenced by GetTypeId(), and HystartUpdate().

◆ m_initialCwnd

uint32_t ns3::TcpCubic::m_initialCwnd
private

Initial cWnd.

Definition at line 117 of file tcp-cubic.h.

◆ m_lastAck

Time ns3::TcpCubic::m_lastAck
private

Last time when the ACK spacing is close.

Definition at line 133 of file tcp-cubic.h.

Referenced by HystartReset(), and HystartUpdate().

◆ m_lastMaxCwnd

uint32_t ns3::TcpCubic::m_lastMaxCwnd
private

Last maximum cWnd.

Definition at line 124 of file tcp-cubic.h.

Referenced by CubicReset(), GetSsThresh(), and Update().

◆ m_roundStart

Time ns3::TcpCubic::m_roundStart
private

Beginning of each round.

Definition at line 131 of file tcp-cubic.h.

Referenced by HystartReset(), and HystartUpdate().

◆ m_sampleCnt

uint32_t ns3::TcpCubic::m_sampleCnt
private

Count of samples for HyStart.

Definition at line 136 of file tcp-cubic.h.

Referenced by HystartReset(), and HystartUpdate().


The documentation for this class was generated from the following files: