An implementation of DCTCP. More...
#include "tcp-dctcp.h"
Public Member Functions | |
TcpDctcp () | |
Create an unbound tcp socket. More... | |
TcpDctcp (const TcpDctcp &sock) | |
Copy constructor. More... | |
virtual | ~TcpDctcp (void) |
Destructor. More... | |
virtual void | CwndEvent (Ptr< TcpSocketState > tcb, const TcpSocketState::TcpCAEvent_t event) |
Trigger events/calculations on occurrence of congestion window event. More... | |
virtual Ptr< TcpCongestionOps > | Fork () |
Copy the congestion control algorithm across sockets. More... | |
virtual std::string | GetName () const |
Get the name of the TCP flavour. More... | |
virtual void | Init (Ptr< TcpSocketState > tcb) |
Set configuration required by congestion control algorithm, This method will force DctcpEcn mode and will force usage of either ECT(0) or ECT(1) (depending on the 'UseEct0' attribute), despite any other configuration in the base classes. More... | |
virtual void | PktsAcked (Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt) |
Get information from the acked packet. More... | |
virtual void | ReduceCwnd (Ptr< TcpSocketState > tcb) |
Reduce congestion window based on DCTCP algorithm. More... | |
![]() | |
TcpNewReno () | |
TcpNewReno (const TcpNewReno &sock) | |
Copy constructor. More... | |
~TcpNewReno () | |
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) |
Try to increase the cWnd following the NewReno specification. More... | |
![]() | |
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 | CongestionStateSet (Ptr< TcpSocketState > tcb, const TcpSocketState::TcpCongState_t newState) |
Trigger events/calculations specific to a congestion state. More... | |
virtual bool | HasCongControl () const |
Returns true when Congestion Control Algorithm implements CongControl. More... | |
![]() | |
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< Object > | GetObject () const |
template<> | |
Ptr< Object > | GetObject (TypeId tid) const |
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... | |
![]() | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. More... | |
void | Ref (void) const |
Increment the reference count. More... | |
void | Unref (void) const |
Decrement the reference count. More... | |
![]() | |
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 TypeId | GetTypeId (void) |
Get the type ID. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Register this type. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Private Member Functions | |
void | CeState0to1 (Ptr< TcpSocketState > tcb) |
Changes state of m_ceState to true. More... | |
void | CeState1to0 (Ptr< TcpSocketState > tcb) |
Changes state of m_ceState to false. More... | |
void | Reset (Ptr< TcpSocketState > tcb) |
Resets the value of m_ackedBytesEcn, m_ackedBytesTotal and m_nextSeq. More... | |
void | SetDctcpAlpha (double alpha) |
Sets the value of m_alpha. More... | |
void | UpdateAckReserved (Ptr< TcpSocketState > tcb, const TcpSocketState::TcpCAEvent_t event) |
Updates the value of m_delayedAckReserved. More... | |
Private Attributes | |
uint32_t | m_ackedBytesEcn |
Number of acked bytes which are marked. More... | |
uint32_t | m_ackedBytesTotal |
Total number of acked bytes. More... | |
double | m_alpha |
Parameter used to estimate the amount of network congestion. More... | |
bool | m_ceState |
DCTCP Congestion Experienced state. More... | |
bool | m_delayedAckReserved |
Delayed Ack state. More... | |
double | m_g |
Estimation gain. More... | |
SequenceNumber32 | m_nextSeq |
TCP sequence number threshold for beginning a new observation window. More... | |
bool | m_nextSeqFlag |
Variable used in setting the value of m_nextSeq for first time. More... | |
SequenceNumber32 | m_priorRcvNxt |
Sequence number of the first missing byte in data. More... | |
bool | m_priorRcvNxtFlag |
Variable used in setting the value of m_priorRcvNxt for first time. More... | |
bool | m_useEct0 |
Use ECT(0) for ECN codepoint. More... | |
Additional Inherited Members | |
![]() | |
virtual void | CongestionAvoidance (Ptr< TcpSocketState > tcb, uint32_t segmentsAcked) |
NewReno congestion avoidance. More... | |
virtual uint32_t | SlowStart (Ptr< TcpSocketState > tcb, uint32_t segmentsAcked) |
Tcp NewReno slow start algorithm More... | |
![]() | |
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... | |
![]() | |
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... | |
![]() | |
static TypeId | GetObjectIid (void) |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
An implementation of DCTCP.
Introspection did not find any typical Config paths.
This model implements all the functionalities mentioned in the DCTCP SIGCOMM paper except dynamic buffer allocation in switches
No TraceSources are defined for this type.
Size of this type is 80 bytes (on a 64-bit architecture).
Definition at line 36 of file tcp-dctcp.h.
ns3::TcpDctcp::TcpDctcp | ( | ) |
Create an unbound tcp socket.
Definition at line 63 of file tcp-dctcp.cc.
References m_ackedBytesEcn, m_ackedBytesTotal, m_ceState, m_delayedAckReserved, m_nextSeq, m_nextSeqFlag, m_priorRcvNxt, m_priorRcvNxtFlag, and NS_LOG_FUNCTION.
ns3::TcpDctcp::TcpDctcp | ( | const TcpDctcp & | sock | ) |
Copy constructor.
sock | the object to copy |
Definition at line 77 of file tcp-dctcp.cc.
References NS_LOG_FUNCTION.
|
virtual |
|
private |
Changes state of m_ceState to true.
tcb | internal congestion state |
Definition at line 167 of file tcp-dctcp.cc.
References ns3::TcpHeader::ACK, ns3::TcpSocketState::ECN_CE_RCVD, m_ceState, m_delayedAckReserved, ns3::TcpSocketState::m_ecnState, m_priorRcvNxt, m_priorRcvNxtFlag, ns3::TcpSocketState::m_rxBuffer, ns3::TcpSocketState::m_sendEmptyPacketCallback, and NS_LOG_FUNCTION.
Referenced by CwndEvent().
|
private |
Changes state of m_ceState to false.
tcb | internal congestion state |
Definition at line 194 of file tcp-dctcp.cc.
References ns3::TcpHeader::ACK, ns3::TcpHeader::ECE, ns3::TcpSocketState::ECN_CE_RCVD, ns3::TcpSocketState::ECN_IDLE, ns3::TcpSocketState::ECN_SENDING_ECE, m_ceState, m_delayedAckReserved, ns3::TcpSocketState::m_ecnState, m_priorRcvNxt, m_priorRcvNxtFlag, ns3::TcpSocketState::m_rxBuffer, ns3::TcpSocketState::m_sendEmptyPacketCallback, and NS_LOG_FUNCTION.
Referenced by CwndEvent().
|
virtual |
Trigger events/calculations on occurrence of congestion window event.
tcb | internal state |
event | congestion window event which triggered this function |
Reimplemented from ns3::TcpCongestionOps.
Definition at line 250 of file tcp-dctcp.cc.
References ns3::TcpSocketState::CA_EVENT_DELAYED_ACK, ns3::TcpSocketState::CA_EVENT_ECN_IS_CE, ns3::TcpSocketState::CA_EVENT_ECN_NO_CE, ns3::TcpSocketState::CA_EVENT_NON_DELAYED_ACK, CeState0to1(), CeState1to0(), NS_LOG_FUNCTION, and UpdateAckReserved().
|
virtual |
Copy the congestion control algorithm across sockets.
Reimplemented from ns3::TcpNewReno.
Definition at line 99 of file tcp-dctcp.cc.
References NS_LOG_FUNCTION.
|
virtual |
Get the name of the TCP flavour.
Reimplemented from ns3::TcpNewReno.
Definition at line 58 of file tcp-dctcp.cc.
|
static |
Get the type ID.
Definition at line 33 of file tcp-dctcp.cc.
References m_g, m_useEct0, ns3::MakeBooleanAccessor(), ns3::MakeBooleanChecker(), ns3::MakeDoubleAccessor(), SetDctcpAlpha(), and ns3::TypeId::SetParent().
|
virtual |
Set configuration required by congestion control algorithm, This method will force DctcpEcn mode and will force usage of either ECT(0) or ECT(1) (depending on the 'UseEct0' attribute), despite any other configuration in the base classes.
ecnMode | ECN Mode |
Reimplemented from ns3::TcpCongestionOps.
Definition at line 106 of file tcp-dctcp.cc.
References ns3::TcpSocketState::DctcpEcn, ns3::TcpSocketState::Ect0, ns3::TcpSocketState::Ect1, ns3::TcpSocketState::m_ecnMode, ns3::TcpSocketState::m_ectCodePoint, ns3::TcpSocketState::m_useEcn, m_useEct0, NS_LOG_FUNCTION, NS_LOG_INFO, and ns3::TcpSocketState::On.
|
virtual |
Get information from the acked packet.
tcb | internal congestion state |
segmentsAcked | count of segments ACKed |
rtt | The estimated rtt |
Reimplemented from ns3::TcpCongestionOps.
Definition at line 124 of file tcp-dctcp.cc.
References ns3::TcpSocketState::ECN_ECE_RCVD, m_ackedBytesEcn, m_ackedBytesTotal, m_alpha, ns3::TcpSocketState::m_ecnState, m_g, ns3::TcpSocketState::m_lastAckedSeq, m_nextSeq, m_nextSeqFlag, ns3::TcpSocketState::m_nextTxSequence, ns3::TcpSocketState::m_segmentSize, NS_LOG_FUNCTION, NS_LOG_INFO, and Reset().
Referenced by TcpDctcpDecrementTest::ExecuteTest().
|
virtual |
Reduce congestion window based on DCTCP algorithm.
tcb | internal congestion state |
Reimplemented from ns3::TcpNewReno.
Definition at line 116 of file tcp-dctcp.cc.
References m_alpha, ns3::TcpSocketState::m_cWnd, ns3::TcpSocketState::m_segmentSize, max, and NS_LOG_FUNCTION.
Referenced by TcpDctcpDecrementTest::ExecuteTest().
|
private |
Resets the value of m_ackedBytesEcn, m_ackedBytesTotal and m_nextSeq.
tcb | internal congestion state |
Definition at line 158 of file tcp-dctcp.cc.
References m_ackedBytesEcn, m_ackedBytesTotal, m_nextSeq, ns3::TcpSocketState::m_nextTxSequence, and NS_LOG_FUNCTION.
Referenced by PktsAcked().
|
private |
Sets the value of m_alpha.
alpha | DCTCP alpha parameter |
Definition at line 151 of file tcp-dctcp.cc.
References sample-rng-plot::alpha, m_alpha, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
|
private |
Updates the value of m_delayedAckReserved.
tcb | internal congestion state |
event | the congestion window event |
Definition at line 225 of file tcp-dctcp.cc.
References ns3::TcpSocketState::CA_EVENT_DELAYED_ACK, ns3::TcpSocketState::CA_EVENT_NON_DELAYED_ACK, m_delayedAckReserved, and NS_LOG_FUNCTION.
Referenced by CwndEvent().
|
private |
Number of acked bytes which are marked.
Definition at line 142 of file tcp-dctcp.h.
Referenced by PktsAcked(), Reset(), and TcpDctcp().
|
private |
Total number of acked bytes.
Definition at line 143 of file tcp-dctcp.h.
Referenced by PktsAcked(), Reset(), and TcpDctcp().
|
private |
Parameter used to estimate the amount of network congestion.
Definition at line 146 of file tcp-dctcp.h.
Referenced by PktsAcked(), ReduceCwnd(), and SetDctcpAlpha().
|
private |
DCTCP Congestion Experienced state.
Definition at line 149 of file tcp-dctcp.h.
Referenced by CeState0to1(), CeState1to0(), and TcpDctcp().
|
private |
Delayed Ack state.
Definition at line 150 of file tcp-dctcp.h.
Referenced by CeState0to1(), CeState1to0(), TcpDctcp(), and UpdateAckReserved().
|
private |
Estimation gain.
Definition at line 151 of file tcp-dctcp.h.
Referenced by GetTypeId(), and PktsAcked().
|
private |
TCP sequence number threshold for beginning a new observation window.
Definition at line 147 of file tcp-dctcp.h.
Referenced by PktsAcked(), Reset(), and TcpDctcp().
|
private |
Variable used in setting the value of m_nextSeq for first time.
Definition at line 148 of file tcp-dctcp.h.
Referenced by PktsAcked(), and TcpDctcp().
|
private |
Sequence number of the first missing byte in data.
Definition at line 144 of file tcp-dctcp.h.
Referenced by CeState0to1(), CeState1to0(), and TcpDctcp().
|
private |
Variable used in setting the value of m_priorRcvNxt for first time.
Definition at line 145 of file tcp-dctcp.h.
Referenced by CeState0to1(), CeState1to0(), and TcpDctcp().
|
private |
Use ECT(0) for ECN codepoint.
Definition at line 152 of file tcp-dctcp.h.
Referenced by GetTypeId(), and Init().