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

BBR congestion control algorithm. More...

#include "tcp-bbr.h"

+ Inheritance diagram for ns3::TcpBbr:
+ Collaboration diagram for ns3::TcpBbr:

Public Types

enum  BbrMode_t { BBR_STARTUP , BBR_DRAIN , BBR_PROBE_BW , BBR_PROBE_RTT }
 BBR has the following 4 modes for deciding how fast to send: More...
 
typedef WindowedFilter< DataRate, MaxFilter< DataRate >, uint32_t, uint32_t > MaxBandwidthFilter_t
 Definition of max bandwidth filter. More...
 

Public Member Functions

 TcpBbr ()
 Constructor. More...
 
 TcpBbr (const TcpBbr &sock)
 Copy constructor. More...
 
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 void CwndEvent (Ptr< TcpSocketState > tcb, const TcpSocketState::TcpCAEvent_t event)
 Trigger events/calculations on occurrence of congestion window event. 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 bool HasCongControl () const
 Returns true when Congestion Control Algorithm implements CongControl. More...
 
virtual void SetStream (uint32_t stream)
 Assign a fixed random variable stream number to the random variables used by this model. More...
 
- Public Member Functions inherited from ns3::TcpCongestionOps
 TcpCongestionOps ()
 
 TcpCongestionOps (const TcpCongestionOps &other)
 Copy constructor. More...
 
virtual ~TcpCongestionOps ()
 
virtual void IncreaseWindow (Ptr< TcpSocketState > tcb, uint32_t segmentsAcked)
 Congestion avoidance algorithm implementation. More...
 
virtual void Init ([[maybe_unused]] Ptr< TcpSocketState > tcb)
 Set configuration required by congestion control algorithm. 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::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<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::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 (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object. More...
 
template<typename T >
Ptr< T > GetObject (void) const
 Get a pointer to the requested aggregated 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[[maybe_unused]])
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= ([[maybe_unused]] 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...
 

Static Public Attributes

static const char *const BbrModeName [BBR_PROBE_RTT+1]
 Literal names of BBR mode for use in log messages. More...
 
static const uint8_t GAIN_CYCLE_LENGTH = 8
 The number of phases in the BBR ProbeBW gain cycle. More...
 
static const double PACING_GAIN_CYCLE [] = {5.0 / 4, 3.0 / 4, 1, 1, 1, 1, 1, 1}
 BBR uses an eight-phase cycle with the given pacing_gain value in the BBR ProbeBW gain cycle. More...
 

Protected Member Functions

uint32_t AckAggregationCwnd ()
 Find Cwnd increment based on ack aggregation. More...
 
void AdvanceCyclePhase ()
 Advances pacing gain using cycle gain algorithm, while in BBR_PROBE_BW state. More...
 
void CheckCyclePhase (Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
 Checks whether to advance pacing gain in BBR_PROBE_BW state, and if allowed calls AdvanceCyclePhase () More...
 
void CheckDrain (Ptr< TcpSocketState > tcb)
 Checks whether its time to enter BBR_DRAIN or BBR_PROBE_BW state. More...
 
void CheckFullPipe (const TcpRateOps::TcpRateSample &rs)
 Identifies whether pipe or BDP is already full. More...
 
void CheckProbeRTT (Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
 This method handles the steps related to the ProbeRTT state. More...
 
void EnterDrain ()
 Updates variables specific to BBR_DRAIN state. More...
 
void EnterProbeBW ()
 Updates variables specific to BBR_PROBE_BW state. More...
 
void EnterProbeRTT ()
 Updates variables specific to BBR_PROBE_RTT state. More...
 
void EnterStartup ()
 Updates variables specific to BBR_STARTUP state. More...
 
void ExitProbeRTT ()
 Called on exiting from BBR_PROBE_RTT state, it eithers invoke EnterProbeBW () or EnterStartup () More...
 
uint32_t GetBbrState ()
 Gets BBR state. More...
 
double GetCwndGain ()
 Gets current cwnd gain. More...
 
double GetPacingGain ()
 Gets current pacing gain. More...
 
void HandleProbeRTT (Ptr< TcpSocketState > tcb)
 Handles the steps for BBR_PROBE_RTT state. More...
 
void HandleRestartFromIdle (Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
 Updates pacing rate if socket is restarting from idle state. More...
 
uint32_t InFlight (Ptr< TcpSocketState > tcb, double gain)
 Estimates the target value for congestion window. More...
 
void InitFullPipe ()
 Intializes the full pipe estimator. More...
 
void InitPacingRate (Ptr< TcpSocketState > tcb)
 Intializes the pacing rate. More...
 
void InitRoundCounting ()
 Intializes the round counting related variables. More...
 
bool IsNextCyclePhase (Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
 Checks whether to move to next value of pacing gain while in BBR_PROBE_BW. More...
 
void ModulateCwndForProbeRTT (Ptr< TcpSocketState > tcb)
 Modulates congestion window in BBR_PROBE_RTT. More...
 
bool ModulateCwndForRecovery (Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
 Modulates congestion window in CA_RECOVERY. More...
 
void RestoreCwnd (Ptr< TcpSocketState > tcb)
 Helper to restore the last-known good congestion window. More...
 
void SaveCwnd (Ptr< const TcpSocketState > tcb)
 Helper to remember the last-known good congestion window or the latest congestion window unmodulated by loss recovery or ProbeRTT. More...
 
void SetBbrState (BbrMode_t state)
 Sets BBR state. More...
 
void SetCwnd (Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
 Updates congestion window based on the network model. More...
 
void SetPacingRate (Ptr< TcpSocketState > tcb, double gain)
 Updates pacing rate based on network model. More...
 
void SetSendQuantum (Ptr< TcpSocketState > tcb)
 Updates send quantum based on the network model. More...
 
void UpdateAckAggregation (Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
 Estimates max degree of aggregation. More...
 
void UpdateBtlBw (Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
 Updates maximum bottleneck. More...
 
void UpdateControlParameters (Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
 Updates control parameters congestion windowm, pacing rate, send quantum. More...
 
void UpdateModelAndState (Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
 Updates BBR network model (Maximum bandwidth and minimum RTT). More...
 
void UpdateRound (Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
 Updates round counting related variables. More...
 
void UpdateRTprop (Ptr< TcpSocketState > tcb)
 Updates minimum RTT. More...
 
void UpdateTargetCwnd (Ptr< TcpSocketState > tcb)
 Updates target congestion window. More...
 
- 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...
 

Private Attributes

uint32_t m_ackEpochAcked {0}
 Bytes ACked in sampling epoch. More...
 
uint32_t m_ackEpochAckedResetThresh {1 << 17}
 Max allowed val for m_ackEpochAcked, after which sampling epoch is reset. More...
 
Time m_ackEpochTime {Seconds(0)}
 Starting of ACK sampling epoch time. More...
 
uint32_t m_appLimited {0}
 The index of the last transmitted packet marked as application-limited. More...
 
uint32_t m_bandwidthWindowLength {0}
 A constant specifying the length of the BBR.BtlBw max filter window, default 10 packet-timed round trips. More...
 
double m_cWndGain {0}
 The dynamic congestion window gain factor. More...
 
uint32_t m_cycleIndex {0}
 Current index of gain cycle. More...
 
Time m_cycleStamp {Seconds (0)}
 Last time gain cycle updated. More...
 
uint64_t m_delivered {0}
 The total amount of data in bytes delivered so far. More...
 
uint32_t m_extraAcked [2] {0, 0}
 Maximum excess data acked in epoch. More...
 
uint32_t m_extraAckedGain {1}
 Gain factor for adding extra ack to cwnd. More...
 
uint32_t m_extraAckedIdx {0}
 Current index in extra acked array. More...
 
uint32_t m_extraAckedWinRtt {0}
 Age of extra acked in rtt. More...
 
uint32_t m_extraAckedWinRttLength {5}
 Window length of extra acked window. More...
 
DataRate m_fullBandwidth {0}
 Value of full bandwidth recorded. More...
 
uint32_t m_fullBandwidthCount {0}
 Count of full bandwidth recorded consistently. More...
 
bool m_hasSeenRtt {false}
 Have we seen RTT sample yet? More...
 
double m_highGain {0}
 A constant specifying highest gain factor, default is 2.89. More...
 
bool m_idleRestart {false}
 When restarting from idle, set it true. More...
 
bool m_isInitialized {false}
 Set to true after first time initializtion variables. More...
 
bool m_isPipeFilled {false}
 A boolean that records whether BBR has filled the pipe. More...
 
MaxBandwidthFilter_t m_maxBwFilter
 Maximum bandwidth filter. More...
 
uint32_t m_minPipeCwnd {0}
 The minimal congestion window value BBR tries to target, default 4 Segment size. More...
 
uint32_t m_nextRoundDelivered {0}
 Denotes the end of a packet-timed round trip. More...
 
double m_pacingGain {0}
 The dynamic pacing gain factor. More...
 
bool m_packetConservation {false}
 Enable/Disable packet conservation mode. More...
 
uint32_t m_priorCwnd {0}
 The last-known good congestion window. More...
 
Time m_probeRtPropStamp {Seconds (0)}
 The wall clock time at which the current BBR.RTProp sample was obtained. More...
 
Time m_probeRttDoneStamp {Seconds (0)}
 Time to exit from BBR_PROBE_RTT state. More...
 
Time m_probeRttDuration {MilliSeconds (200)}
 A constant specifying the minimum duration for which ProbeRTT state, default 200 millisecs. More...
 
bool m_probeRttRoundDone {false}
 True when it is time to exit BBR_PROBE_RTT. More...
 
uint32_t m_roundCount {0}
 Count of packet-timed round trips. More...
 
bool m_roundStart {false}
 A boolean that BBR sets to true once per packet-timed round trip. More...
 
Time m_rtProp {Time::Max ()}
 Estimated two-way round-trip propagation delay of the path, estimated from the windowed minimum recent round-trip delay sample. More...
 
bool m_rtPropExpired {false}
 A boolean recording whether the BBR.RTprop has expired. More...
 
Time m_rtPropFilterLen {Seconds (10)}
 A constant specifying the length of the RTProp min filter window, default 10 secs. More...
 
Time m_rtPropStamp {Seconds (0)}
 The wall clock time at which the current BBR.RTProp sample was obtained. More...
 
uint32_t m_sendQuantum {0}
 The maximum size of a data aggregate scheduled and transmitted together. More...
 
BbrMode_t m_state {BbrMode_t::BBR_STARTUP}
 Current state of BBR state machine. More...
 
uint32_t m_targetCWnd {0}
 Target value for congestion window, adapted to the estimated BDP. More...
 
uint32_t m_txItemDelivered {0}
 The number of bytes already delivered at the time of new packet transmission. More...
 
Ptr< UniformRandomVariablem_uv {nullptr}
 Uniform Random Variable. More...
 

Related Functions

(Note that these are not member functions.)

class TcpBbrCheckGainValuesTest
 TcpBbrCheckGainValuesTest friend class (for tests). More...
 

Additional Inherited Members

Detailed Description

BBR congestion control algorithm.

This class implement the BBR (Bottleneck Bandwidth and Round-trip propagation time) congestion control type.

Config Paths

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

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

Attributes

  • Stream: Random number stream (default is set to 4 to align with Linux results)
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 4
    • Flags: construct write
  • HighGain: Value of high gain
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 2.89
    • Flags: construct write read
  • BwWindowLength: Length of bandwidth windowed filter
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 10
    • Flags: construct write read
  • RttWindowLength: Length of RTT windowed filter
    • Set with class: ns3::TimeValue
    • Underlying type: Time +9.22337e+18ns:+9.22337e+18ns
    • Initial value: +1e+10ns
    • Flags: construct write read
  • ProbeRttDuration: Time to be spent in PROBE_RTT phase
    • Set with class: ns3::TimeValue
    • Underlying type: Time +9.22337e+18ns:+9.22337e+18ns
    • Initial value: +2e+08ns
    • Flags: construct write read
  • ExtraAckedRttWindowLength: Window length of extra acked window
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 5
    • Flags: construct write read
  • AckEpochAckedResetThresh: Max allowed val for m_ackEpochAcked, after which sampling epoch is reset
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 4096
    • Flags: construct write read

No TraceSources are defined for this type.
Size of this type is 336 bytes (on a 64-bit architecture).

Definition at line 44 of file tcp-bbr.h.

Member Typedef Documentation

◆ MaxBandwidthFilter_t

Definition of max bandwidth filter.

Definition at line 89 of file tcp-bbr.h.

Member Enumeration Documentation

◆ BbrMode_t

BBR has the following 4 modes for deciding how fast to send:

Enumerator
BBR_STARTUP 

Ramp up sending rate rapidly to fill pipe.

BBR_DRAIN 

Drain any queue created during startup.

BBR_PROBE_BW 

Discover, share bw: pace around estimated bw.

BBR_PROBE_RTT 

Cut inflight to min to probe min_rtt.

Definition at line 77 of file tcp-bbr.h.

Constructor & Destructor Documentation

◆ TcpBbr() [1/2]

ns3::TcpBbr::TcpBbr ( )

Constructor.

Definition at line 81 of file tcp-bbr.cc.

References m_uv, and NS_LOG_FUNCTION.

◆ TcpBbr() [2/2]

ns3::TcpBbr::TcpBbr ( const TcpBbr sock)

Copy constructor.

Parameters
sockThe socket to copy from.

Definition at line 88 of file tcp-bbr.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ AckAggregationCwnd()

uint32_t ns3::TcpBbr::AckAggregationCwnd ( )
protected

Find Cwnd increment based on ack aggregation.

Returns
uint32_t aggregate cwnd.

Definition at line 471 of file tcp-bbr.cc.

References ns3::WindowedFilter< T, Compare, TimeT, TimeDeltaT >::GetBest(), ns3::DataRate::GetBitRate(), m_extraAcked, m_extraAckedGain, m_isPipeFilled, m_maxBwFilter, max, and min.

Referenced by UpdateTargetCwnd().

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

◆ AdvanceCyclePhase()

void ns3::TcpBbr::AdvanceCyclePhase ( )
protected

Advances pacing gain using cycle gain algorithm, while in BBR_PROBE_BW state.

Definition at line 253 of file tcp-bbr.cc.

References GAIN_CYCLE_LENGTH, m_cycleIndex, m_cycleStamp, m_pacingGain, ns3::Simulator::Now(), NS_LOG_FUNCTION, and PACING_GAIN_CYCLE.

Referenced by CheckCyclePhase(), and EnterProbeBW().

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

◆ CheckCyclePhase()

void ns3::TcpBbr::CheckCyclePhase ( Ptr< TcpSocketState tcb,
const TcpRateOps::TcpRateSample rs 
)
protected

Checks whether to advance pacing gain in BBR_PROBE_BW state, and if allowed calls AdvanceCyclePhase ()

Parameters
tcbthe socket state.
rsrate sample.

Definition at line 281 of file tcp-bbr.cc.

References AdvanceCyclePhase(), IsNextCyclePhase(), m_state, and NS_LOG_FUNCTION.

Referenced by UpdateModelAndState().

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

◆ CheckDrain()

void ns3::TcpBbr::CheckDrain ( Ptr< TcpSocketState tcb)
protected

Checks whether its time to enter BBR_DRAIN or BBR_PROBE_BW state.

Parameters
tcbthe socket state.

Definition at line 336 of file tcp-bbr.cc.

References EnterDrain(), EnterProbeBW(), InFlight(), ns3::TcpSocketState::m_bytesInFlight, m_isPipeFilled, ns3::TcpSocketState::m_ssThresh, m_state, and NS_LOG_FUNCTION.

Referenced by UpdateModelAndState().

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

◆ CheckFullPipe()

void ns3::TcpBbr::CheckFullPipe ( const TcpRateOps::TcpRateSample rs)
protected

Identifies whether pipe or BDP is already full.

Parameters
rsrate sample.

Definition at line 291 of file tcp-bbr.cc.

References ns3::WindowedFilter< T, Compare, TimeT, TimeDeltaT >::GetBest(), ns3::DataRate::GetBitRate(), m_fullBandwidth, m_fullBandwidthCount, ns3::TcpRateOps::TcpRateSample::m_isAppLimited, m_isPipeFilled, m_maxBwFilter, m_roundStart, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by UpdateModelAndState().

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

◆ CheckProbeRTT()

void ns3::TcpBbr::CheckProbeRTT ( Ptr< TcpSocketState tcb,
const TcpRateOps::TcpRateSample rs 
)
protected

This method handles the steps related to the ProbeRTT state.

Parameters
tcbthe socket state.
rsrate sample.

Definition at line 435 of file tcp-bbr.cc.

References EnterProbeRTT(), HandleProbeRTT(), ns3::TcpRateOps::TcpRateSample::m_delivered, m_idleRestart, m_probeRttDoneStamp, m_rtPropExpired, m_state, NS_LOG_FUNCTION, SaveCwnd(), and ns3::Seconds().

Referenced by UpdateModelAndState().

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

◆ CongControl()

void ns3::TcpBbr::CongControl ( Ptr< TcpSocketState tcb,
const TcpRateOps::TcpRateConnection rc,
const TcpRateOps::TcpRateSample rs 
)
virtual

Called when packets are delivered to update cwnd and pacing rate.

This function mimics the function cong_control in Linux. It is allowed to change directly cWnd and pacing rate.

Parameters
tcbinternal congestion state
rcRate information for the connection
rsRate sample (over a period of time) information

Reimplemented from ns3::TcpCongestionOps.

Definition at line 689 of file tcp-bbr.cc.

References m_delivered, ns3::TcpRateOps::TcpRateConnection::m_delivered, m_txItemDelivered, ns3::TcpRateOps::TcpRateConnection::m_txItemDelivered, NS_LOG_FUNCTION, UpdateControlParameters(), and UpdateModelAndState().

+ Here is the call graph for this function:

◆ CongestionStateSet()

void ns3::TcpBbr::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;
@ CA_RECOVERY
CWND was reduced, we are fast-retransmitting.
Parameters
tcbinternal congestion state
newStatenew congestion state to which the TCP is going to switch

Reimplemented from ns3::TcpCongestionOps.

Definition at line 701 of file tcp-bbr.cc.

References ns3::TcpSocketState::CA_LOSS, ns3::TcpSocketState::CA_OPEN, ns3::TcpSocketState::CA_RECOVERY, EnterStartup(), ns3::TracedValue< T >::Get(), InitFullPipe(), InitPacingRate(), InitRoundCounting(), m_ackEpochAcked, m_ackEpochTime, ns3::TcpSocketState::m_bytesInFlight, ns3::TcpSocketState::m_cWnd, m_extraAcked, m_extraAckedIdx, m_extraAckedWinRtt, ns3::TcpSocketState::m_initialSsThresh, m_isInitialized, ns3::TcpSocketState::m_lastAckedSackedBytes, ns3::TcpSocketState::m_lastRtt, m_minPipeCwnd, m_packetConservation, m_priorCwnd, m_roundStart, m_rtProp, m_rtPropStamp, ns3::TcpSocketState::m_segmentSize, m_sendQuantum, ns3::TcpSocketState::m_ssThresh, m_targetCWnd, ns3::Time::Max(), max, ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, and SaveCwnd().

+ Here is the call graph for this function:

◆ CwndEvent()

void ns3::TcpBbr::CwndEvent ( Ptr< TcpSocketState tcb,
const TcpSocketState::TcpCAEvent_t  event 
)
virtual

Trigger events/calculations on occurrence of congestion window event.

This function mimics the function cwnd_event in Linux. The function is called in case of congestion window events.

Parameters
tcbinternal congestion state
eventthe event which triggered this function

Reimplemented from ns3::TcpCongestionOps.

Definition at line 744 of file tcp-bbr.cc.

References ns3::TcpSocketState::CA_EVENT_COMPLETE_CWR, ns3::TcpSocketState::CA_EVENT_TX_START, ExitProbeRTT(), m_ackEpochAcked, m_ackEpochTime, m_appLimited, m_idleRestart, m_packetConservation, m_probeRttDoneStamp, m_probeRttRoundDone, m_rtPropStamp, m_state, ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, RestoreCwnd(), and SetPacingRate().

+ Here is the call graph for this function:

◆ EnterDrain()

void ns3::TcpBbr::EnterDrain ( )
protected

Updates variables specific to BBR_DRAIN state.

Definition at line 316 of file tcp-bbr.cc.

References m_cWndGain, m_highGain, m_pacingGain, NS_LOG_FUNCTION, and SetBbrState().

Referenced by CheckDrain().

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

◆ EnterProbeBW()

void ns3::TcpBbr::EnterProbeBW ( )
protected

Updates variables specific to BBR_PROBE_BW state.

Definition at line 325 of file tcp-bbr.cc.

References AdvanceCyclePhase(), GAIN_CYCLE_LENGTH, ns3::UniformRandomVariable::GetValue(), m_cWndGain, m_cycleIndex, m_pacingGain, m_uv, NS_LOG_FUNCTION, and SetBbrState().

Referenced by CheckDrain(), and ExitProbeRTT().

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

◆ EnterProbeRTT()

void ns3::TcpBbr::EnterProbeRTT ( )
protected

Updates variables specific to BBR_PROBE_RTT state.

Definition at line 364 of file tcp-bbr.cc.

References m_cWndGain, m_pacingGain, NS_LOG_FUNCTION, and SetBbrState().

Referenced by CheckProbeRTT().

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

◆ EnterStartup()

void ns3::TcpBbr::EnterStartup ( )
protected

Updates variables specific to BBR_STARTUP state.

Definition at line 194 of file tcp-bbr.cc.

References m_cWndGain, m_highGain, m_pacingGain, NS_LOG_FUNCTION, and SetBbrState().

Referenced by CongestionStateSet(), and ExitProbeRTT().

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

◆ ExitProbeRTT()

void ns3::TcpBbr::ExitProbeRTT ( )
protected

Called on exiting from BBR_PROBE_RTT state, it eithers invoke EnterProbeBW () or EnterStartup ()

Definition at line 394 of file tcp-bbr.cc.

References EnterProbeBW(), EnterStartup(), m_isPipeFilled, and NS_LOG_FUNCTION.

Referenced by CwndEvent(), and HandleProbeRTT().

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

◆ Fork()

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

Copy the congestion control algorithm across sockets.

Returns
a pointer of the copied object

Implements ns3::TcpCongestionOps.

Definition at line 785 of file tcp-bbr.cc.

◆ GetBbrState()

uint32_t ns3::TcpBbr::GetBbrState ( )
protected

Gets BBR state.

Returns
returns BBR state.

Definition at line 655 of file tcp-bbr.cc.

References m_state, and NS_LOG_FUNCTION.

◆ GetCwndGain()

double ns3::TcpBbr::GetCwndGain ( )
protected

Gets current cwnd gain.

Returns
returns current cwnd gain.

Definition at line 662 of file tcp-bbr.cc.

References m_cWndGain, and NS_LOG_FUNCTION.

◆ GetName()

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

Get the name of the congestion control algorithm.

Returns
A string identifying the name

Implements ns3::TcpCongestionOps.

Definition at line 676 of file tcp-bbr.cc.

◆ GetPacingGain()

double ns3::TcpBbr::GetPacingGain ( )
protected

Gets current pacing gain.

Returns
returns current pacing gain.

Definition at line 669 of file tcp-bbr.cc.

References m_pacingGain, and NS_LOG_FUNCTION.

◆ GetSsThresh()

uint32_t ns3::TcpBbr::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 777 of file tcp-bbr.cc.

References NS_LOG_FUNCTION, and SaveCwnd().

+ Here is the call graph for this function:

◆ GetTypeId()

◆ HandleProbeRTT()

void ns3::TcpBbr::HandleProbeRTT ( Ptr< TcpSocketState tcb)
protected

Handles the steps for BBR_PROBE_RTT state.

Parameters
tcbthe socket state.

Definition at line 408 of file tcp-bbr.cc.

References ExitProbeRTT(), ns3::TracedValue< T >::Get(), m_appLimited, ns3::TcpSocketState::m_bytesInFlight, m_delivered, m_minPipeCwnd, m_nextRoundDelivered, m_probeRttDoneStamp, m_probeRttDuration, m_probeRttRoundDone, m_roundStart, m_rtPropStamp, ns3::Simulator::Now(), NS_LOG_FUNCTION, RestoreCwnd(), and ns3::Seconds().

Referenced by CheckProbeRTT().

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

◆ HandleRestartFromIdle()

void ns3::TcpBbr::HandleRestartFromIdle ( Ptr< TcpSocketState tcb,
const TcpRateOps::TcpRateSample rs 
)
protected

Updates pacing rate if socket is restarting from idle state.

Parameters
tcbthe socket state.
rsrate sample.

Definition at line 203 of file tcp-bbr.cc.

References ns3::TracedValue< T >::Get(), ns3::TcpSocketState::m_bytesInFlight, m_idleRestart, ns3::TcpRateOps::TcpRateSample::m_isAppLimited, m_state, NS_LOG_FUNCTION, and SetPacingRate().

+ Here is the call graph for this function:

◆ HasCongControl()

bool ns3::TcpBbr::HasCongControl ( ) const
virtual

Returns true when Congestion Control Algorithm implements CongControl.

Returns
true if CC implements CongControl function

This function is the equivalent in C++ of the C checks that are used in the Linux kernel to see if an optional function has been defined. Since CongControl is optional, not all congestion controls have it. But, from the perspective of TcpSocketBase, the behavior is different if CongControl is present. Therefore, this check should return true for any congestion controls that implements the CongControl optional function.

Reimplemented from ns3::TcpCongestionOps.

Definition at line 682 of file tcp-bbr.cc.

References NS_LOG_FUNCTION.

◆ InFlight()

uint32_t ns3::TcpBbr::InFlight ( Ptr< TcpSocketState tcb,
double  gain 
)
protected

Estimates the target value for congestion window.

Parameters
tcbthe socket state.
gaincwnd gain.
Returns
returns congestion window based on max bandwidth and min RTT.

Definition at line 235 of file tcp-bbr.cc.

References ns3::WindowedFilter< T, Compare, TimeT, TimeDeltaT >::GetBest(), m_cycleIndex, ns3::TcpSocketState::m_initialCWnd, m_maxBwFilter, m_rtProp, ns3::TcpSocketState::m_segmentSize, m_sendQuantum, m_state, ns3::Time::Max(), and NS_LOG_FUNCTION.

Referenced by CheckDrain(), IsNextCyclePhase(), and UpdateTargetCwnd().

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

◆ InitFullPipe()

void ns3::TcpBbr::InitFullPipe ( )
protected

Intializes the full pipe estimator.

Definition at line 156 of file tcp-bbr.cc.

References m_fullBandwidth, m_fullBandwidthCount, m_isPipeFilled, and NS_LOG_FUNCTION.

Referenced by CongestionStateSet().

+ Here is the caller graph for this function:

◆ InitPacingRate()

void ns3::TcpBbr::InitPacingRate ( Ptr< TcpSocketState tcb)
protected

Intializes the pacing rate.

Parameters
tcbthe socket state.

Definition at line 165 of file tcp-bbr.cc.

References ns3::DataRate::GetBitRate(), ns3::Time::GetMilliSeconds(), ns3::Time::GetSeconds(), m_bandwidthWindowLength, ns3::TcpSocketState::m_cWnd, m_hasSeenRtt, m_maxBwFilter, ns3::TcpSocketState::m_minRtt, ns3::TcpSocketState::m_pacing, m_pacingGain, ns3::TcpSocketState::m_pacingRate, ns3::Time::Max(), ns3::MilliSeconds(), NS_LOG_FUNCTION, and NS_LOG_WARN.

Referenced by CongestionStateSet(), and SetPacingRate().

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

◆ InitRoundCounting()

void ns3::TcpBbr::InitRoundCounting ( )
protected

Intializes the round counting related variables.

Definition at line 147 of file tcp-bbr.cc.

References m_nextRoundDelivered, m_roundCount, m_roundStart, and NS_LOG_FUNCTION.

Referenced by CongestionStateSet().

+ Here is the caller graph for this function:

◆ IsNextCyclePhase()

bool ns3::TcpBbr::IsNextCyclePhase ( Ptr< TcpSocketState tcb,
const TcpRateOps::TcpRateSample rs 
)
protected

Checks whether to move to next value of pacing gain while in BBR_PROBE_BW.

Parameters
tcbthe socket state.
rsrate sample.
Returns
true if want to move to next value otherwise false.

Definition at line 262 of file tcp-bbr.cc.

References InFlight(), ns3::TcpRateOps::TcpRateSample::m_bytesLoss, m_cycleStamp, m_pacingGain, ns3::TcpRateOps::TcpRateSample::m_priorInFlight, m_rtProp, ns3::Simulator::Now(), and NS_LOG_FUNCTION.

Referenced by CheckCyclePhase().

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

◆ ModulateCwndForProbeRTT()

void ns3::TcpBbr::ModulateCwndForProbeRTT ( Ptr< TcpSocketState tcb)
protected

Modulates congestion window in BBR_PROBE_RTT.

Parameters
tcbthe socket state.

Definition at line 546 of file tcp-bbr.cc.

References ns3::TracedValue< T >::Get(), ns3::TcpSocketState::m_cWnd, m_minPipeCwnd, m_state, min, and NS_LOG_FUNCTION.

Referenced by SetCwnd().

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

◆ ModulateCwndForRecovery()

bool ns3::TcpBbr::ModulateCwndForRecovery ( Ptr< TcpSocketState tcb,
const TcpRateOps::TcpRateSample rs 
)
protected

Modulates congestion window in CA_RECOVERY.

Parameters
tcbthe socket state.
rsrate sample.
Returns
true if congestion window is updated in CA_RECOVERY.

Definition at line 529 of file tcp-bbr.cc.

References ns3::TracedValue< T >::Get(), ns3::TcpRateOps::TcpRateSample::m_ackedSacked, ns3::TcpSocketState::m_bytesInFlight, ns3::TcpRateOps::TcpRateSample::m_bytesLoss, ns3::TcpSocketState::m_cWnd, m_packetConservation, ns3::TcpSocketState::m_segmentSize, max, and NS_LOG_FUNCTION.

Referenced by SetCwnd().

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

◆ RestoreCwnd()

void ns3::TcpBbr::RestoreCwnd ( Ptr< TcpSocketState tcb)
protected

Helper to restore the last-known good congestion window.

Parameters
tcbthe socket state.

Definition at line 387 of file tcp-bbr.cc.

References ns3::TracedValue< T >::Get(), ns3::TcpSocketState::m_cWnd, m_priorCwnd, max, and NS_LOG_FUNCTION.

Referenced by CwndEvent(), and HandleProbeRTT().

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

◆ SaveCwnd()

void ns3::TcpBbr::SaveCwnd ( Ptr< const TcpSocketState tcb)
protected

Helper to remember the last-known good congestion window or the latest congestion window unmodulated by loss recovery or ProbeRTT.

Parameters
tcbthe socket state.

Definition at line 373 of file tcp-bbr.cc.

References ns3::TcpSocketState::CA_RECOVERY, m_priorCwnd, m_state, max, and NS_LOG_FUNCTION.

Referenced by CheckProbeRTT(), CongestionStateSet(), and GetSsThresh().

+ Here is the caller graph for this function:

◆ SetBbrState()

void ns3::TcpBbr::SetBbrState ( BbrMode_t  state)
protected

Sets BBR state.

Parameters
stateBBR state.

Definition at line 647 of file tcp-bbr.cc.

References BbrModeName, m_state, ns3::Simulator::Now(), NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by EnterDrain(), EnterProbeBW(), EnterProbeRTT(), and EnterStartup().

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

◆ SetCwnd()

void ns3::TcpBbr::SetCwnd ( Ptr< TcpSocketState tcb,
const TcpRateOps::TcpRateSample rs 
)
protected

Updates congestion window based on the network model.

Parameters
tcbthe socket state.
rsrate sample

Definition at line 556 of file tcp-bbr.cc.

References ns3::TcpSocketState::CA_RECOVERY, ns3::TracedValue< T >::Get(), ns3::TcpRateOps::TcpRateSample::m_ackedSacked, ns3::TcpSocketState::m_congState, ns3::TcpSocketState::m_cWnd, m_isPipeFilled, m_minPipeCwnd, ns3::TcpSocketState::m_segmentSize, m_targetCWnd, max, min, ModulateCwndForProbeRTT(), ModulateCwndForRecovery(), NS_LOG_FUNCTION, and UpdateTargetCwnd().

Referenced by UpdateControlParameters().

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

◆ SetPacingRate()

void ns3::TcpBbr::SetPacingRate ( Ptr< TcpSocketState tcb,
double  gain 
)
protected

Updates pacing rate based on network model.

Parameters
tcbthe socket state.
gainpacing gain.

Definition at line 217 of file tcp-bbr.cc.

References ns3::WindowedFilter< T, Compare, TimeT, TimeDeltaT >::GetBest(), ns3::DataRate::GetBitRate(), InitPacingRate(), m_hasSeenRtt, m_isPipeFilled, m_maxBwFilter, ns3::TcpSocketState::m_maxPacingRate, ns3::TcpSocketState::m_minRtt, ns3::TcpSocketState::m_pacingRate, ns3::Time::Max(), min, and NS_LOG_FUNCTION.

Referenced by CwndEvent(), HandleRestartFromIdle(), and UpdateControlParameters().

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

◆ SetSendQuantum()

void ns3::TcpBbr::SetSendQuantum ( Ptr< TcpSocketState tcb)
protected

Updates send quantum based on the network model.

Parameters
tcbthe socket state.

Definition at line 457 of file tcp-bbr.cc.

References ns3::TcpSocketState::m_segmentSize, m_sendQuantum, and NS_LOG_FUNCTION.

Referenced by UpdateControlParameters().

+ Here is the caller graph for this function:

◆ SetStream()

void ns3::TcpBbr::SetStream ( uint32_t  stream)
virtual

Assign a fixed random variable stream number to the random variables used by this model.

Parameters
streamfirst stream index to use

Definition at line 140 of file tcp-bbr.cc.

References m_uv, NS_LOG_FUNCTION, and ns3::RandomVariableStream::SetStream().

Referenced by GetTypeId().

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

◆ UpdateAckAggregation()

void ns3::TcpBbr::UpdateAckAggregation ( Ptr< TcpSocketState tcb,
const TcpRateOps::TcpRateSample rs 
)
protected

◆ UpdateBtlBw()

void ns3::TcpBbr::UpdateBtlBw ( Ptr< TcpSocketState tcb,
const TcpRateOps::TcpRateSample rs 
)
protected

Updates maximum bottleneck.

Parameters
tcbthe socket state.
rsrate sample.

Definition at line 607 of file tcp-bbr.cc.

References ns3::WindowedFilter< T, Compare, TimeT, TimeDeltaT >::GetBest(), ns3::TcpRateOps::TcpRateSample::m_deliveryRate, ns3::TcpRateOps::TcpRateSample::m_isAppLimited, m_maxBwFilter, m_roundCount, NS_LOG_FUNCTION, ns3::WindowedFilter< T, Compare, TimeT, TimeDeltaT >::Update(), and UpdateRound().

Referenced by UpdateModelAndState().

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

◆ UpdateControlParameters()

void ns3::TcpBbr::UpdateControlParameters ( Ptr< TcpSocketState tcb,
const TcpRateOps::TcpRateSample rs 
)
protected

Updates control parameters congestion windowm, pacing rate, send quantum.

Parameters
tcbthe socket state.
rsrate sample.

Definition at line 638 of file tcp-bbr.cc.

References m_pacingGain, NS_LOG_FUNCTION, SetCwnd(), SetPacingRate(), and SetSendQuantum().

Referenced by CongControl().

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

◆ UpdateModelAndState()

void ns3::TcpBbr::UpdateModelAndState ( Ptr< TcpSocketState tcb,
const TcpRateOps::TcpRateSample rs 
)
protected

Updates BBR network model (Maximum bandwidth and minimum RTT).

Parameters
tcbthe socket state.
rsrate sample.

Definition at line 625 of file tcp-bbr.cc.

References CheckCyclePhase(), CheckDrain(), CheckFullPipe(), CheckProbeRTT(), NS_LOG_FUNCTION, UpdateAckAggregation(), UpdateBtlBw(), and UpdateRTprop().

Referenced by CongControl().

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

◆ UpdateRound()

void ns3::TcpBbr::UpdateRound ( Ptr< TcpSocketState tcb,
const TcpRateOps::TcpRateSample rs 
)
protected

Updates round counting related variables.

Parameters
tcbthe socket state.
rsrate sample.

Definition at line 590 of file tcp-bbr.cc.

References m_delivered, m_nextRoundDelivered, m_packetConservation, ns3::TcpRateOps::TcpRateSample::m_priorDelivered, m_roundCount, m_roundStart, and NS_LOG_FUNCTION.

Referenced by UpdateBtlBw().

+ Here is the caller graph for this function:

◆ UpdateRTprop()

void ns3::TcpBbr::UpdateRTprop ( Ptr< TcpSocketState tcb)
protected

Updates minimum RTT.

Parameters
tcbthe socket state.

Definition at line 352 of file tcp-bbr.cc.

References ns3::TcpSocketState::m_lastRtt, m_rtProp, m_rtPropExpired, m_rtPropFilterLen, m_rtPropStamp, ns3::Simulator::Now(), NS_LOG_FUNCTION, and ns3::Seconds().

Referenced by UpdateModelAndState().

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

◆ UpdateTargetCwnd()

void ns3::TcpBbr::UpdateTargetCwnd ( Ptr< TcpSocketState tcb)
protected

Updates target congestion window.

Parameters
tcbthe socket state.

Definition at line 464 of file tcp-bbr.cc.

References AckAggregationCwnd(), InFlight(), m_cWndGain, m_targetCWnd, and NS_LOG_FUNCTION.

Referenced by SetCwnd().

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

Friends And Related Function Documentation

◆ TcpBbrCheckGainValuesTest

friend class TcpBbrCheckGainValuesTest
friend

TcpBbrCheckGainValuesTest friend class (for tests).

Definition at line 122 of file tcp-bbr.h.

Member Data Documentation

◆ BbrModeName

const char *const ns3::TcpBbr::BbrModeName
static
Initial value:
=
{
"BBR_STARTUP", "BBR_DRAIN", "BBR_PROBE_BW", "BBR_PROBE_RTT"
}

Literal names of BBR mode for use in log messages.

Definition at line 94 of file tcp-bbr.h.

Referenced by SetBbrState().

◆ GAIN_CYCLE_LENGTH

const uint8_t ns3::TcpBbr::GAIN_CYCLE_LENGTH = 8
static

The number of phases in the BBR ProbeBW gain cycle.

Definition at line 50 of file tcp-bbr.h.

Referenced by AdvanceCyclePhase(), and EnterProbeBW().

◆ m_ackEpochAcked

uint32_t ns3::TcpBbr::m_ackEpochAcked {0}
private

Bytes ACked in sampling epoch.

Definition at line 391 of file tcp-bbr.h.

Referenced by CongestionStateSet(), CwndEvent(), and UpdateAckAggregation().

◆ m_ackEpochAckedResetThresh

uint32_t ns3::TcpBbr::m_ackEpochAckedResetThresh {1 << 17}
private

Max allowed val for m_ackEpochAcked, after which sampling epoch is reset.

Definition at line 388 of file tcp-bbr.h.

Referenced by GetTypeId(), and UpdateAckAggregation().

◆ m_ackEpochTime

Time ns3::TcpBbr::m_ackEpochTime {Seconds(0)}
private

Starting of ACK sampling epoch time.

Definition at line 390 of file tcp-bbr.h.

Referenced by CongestionStateSet(), CwndEvent(), and UpdateAckAggregation().

◆ m_appLimited

uint32_t ns3::TcpBbr::m_appLimited {0}
private

The index of the last transmitted packet marked as application-limited.

Definition at line 382 of file tcp-bbr.h.

Referenced by CwndEvent(), and HandleProbeRTT().

◆ m_bandwidthWindowLength

uint32_t ns3::TcpBbr::m_bandwidthWindowLength {0}
private

A constant specifying the length of the BBR.BtlBw max filter window, default 10 packet-timed round trips.

Definition at line 353 of file tcp-bbr.h.

Referenced by GetTypeId(), and InitPacingRate().

◆ m_cWndGain

double ns3::TcpBbr::m_cWndGain {0}
private

The dynamic congestion window gain factor.

Definition at line 355 of file tcp-bbr.h.

Referenced by EnterDrain(), EnterProbeBW(), EnterProbeRTT(), EnterStartup(), GetCwndGain(), and UpdateTargetCwnd().

◆ m_cycleIndex

uint32_t ns3::TcpBbr::m_cycleIndex {0}
private

Current index of gain cycle.

Definition at line 375 of file tcp-bbr.h.

Referenced by AdvanceCyclePhase(), EnterProbeBW(), and InFlight().

◆ m_cycleStamp

Time ns3::TcpBbr::m_cycleStamp {Seconds (0)}
private

Last time gain cycle updated.

Definition at line 374 of file tcp-bbr.h.

Referenced by AdvanceCyclePhase(), and IsNextCyclePhase().

◆ m_delivered

uint64_t ns3::TcpBbr::m_delivered {0}
private

The total amount of data in bytes delivered so far.

Definition at line 381 of file tcp-bbr.h.

Referenced by CongControl(), HandleProbeRTT(), and UpdateRound().

◆ m_extraAcked

uint32_t ns3::TcpBbr::m_extraAcked[2] {0, 0}
private

Maximum excess data acked in epoch.

Definition at line 385 of file tcp-bbr.h.

Referenced by AckAggregationCwnd(), CongestionStateSet(), and UpdateAckAggregation().

◆ m_extraAckedGain

uint32_t ns3::TcpBbr::m_extraAckedGain {1}
private

Gain factor for adding extra ack to cwnd.

Definition at line 384 of file tcp-bbr.h.

Referenced by AckAggregationCwnd(), and UpdateAckAggregation().

◆ m_extraAckedIdx

uint32_t ns3::TcpBbr::m_extraAckedIdx {0}
private

Current index in extra acked array.

Definition at line 389 of file tcp-bbr.h.

Referenced by CongestionStateSet(), and UpdateAckAggregation().

◆ m_extraAckedWinRtt

uint32_t ns3::TcpBbr::m_extraAckedWinRtt {0}
private

Age of extra acked in rtt.

Definition at line 386 of file tcp-bbr.h.

Referenced by CongestionStateSet(), and UpdateAckAggregation().

◆ m_extraAckedWinRttLength

uint32_t ns3::TcpBbr::m_extraAckedWinRttLength {5}
private

Window length of extra acked window.

Definition at line 387 of file tcp-bbr.h.

Referenced by GetTypeId(), and UpdateAckAggregation().

◆ m_fullBandwidth

DataRate ns3::TcpBbr::m_fullBandwidth {0}
private

Value of full bandwidth recorded.

Definition at line 370 of file tcp-bbr.h.

Referenced by CheckFullPipe(), and InitFullPipe().

◆ m_fullBandwidthCount

uint32_t ns3::TcpBbr::m_fullBandwidthCount {0}
private

Count of full bandwidth recorded consistently.

Definition at line 371 of file tcp-bbr.h.

Referenced by CheckFullPipe(), and InitFullPipe().

◆ m_hasSeenRtt

bool ns3::TcpBbr::m_hasSeenRtt {false}
private

Have we seen RTT sample yet?

Definition at line 392 of file tcp-bbr.h.

Referenced by InitPacingRate(), and SetPacingRate().

◆ m_highGain

double ns3::TcpBbr::m_highGain {0}
private

A constant specifying highest gain factor, default is 2.89.

Definition at line 356 of file tcp-bbr.h.

Referenced by EnterDrain(), EnterStartup(), and GetTypeId().

◆ m_idleRestart

bool ns3::TcpBbr::m_idleRestart {false}
private

When restarting from idle, set it true.

Definition at line 368 of file tcp-bbr.h.

Referenced by CheckProbeRTT(), CwndEvent(), and HandleRestartFromIdle().

◆ m_isInitialized

bool ns3::TcpBbr::m_isInitialized {false}
private

Set to true after first time initializtion variables.

Definition at line 379 of file tcp-bbr.h.

Referenced by CongestionStateSet().

◆ m_isPipeFilled

bool ns3::TcpBbr::m_isPipeFilled {false}
private

A boolean that records whether BBR has filled the pipe.

Definition at line 357 of file tcp-bbr.h.

Referenced by AckAggregationCwnd(), CheckDrain(), CheckFullPipe(), ExitProbeRTT(), InitFullPipe(), SetCwnd(), and SetPacingRate().

◆ m_maxBwFilter

MaxBandwidthFilter_t ns3::TcpBbr::m_maxBwFilter
private

Maximum bandwidth filter.

Definition at line 352 of file tcp-bbr.h.

Referenced by AckAggregationCwnd(), CheckFullPipe(), InFlight(), InitPacingRate(), SetPacingRate(), UpdateAckAggregation(), and UpdateBtlBw().

◆ m_minPipeCwnd

uint32_t ns3::TcpBbr::m_minPipeCwnd {0}
private

The minimal congestion window value BBR tries to target, default 4 Segment size.

Definition at line 358 of file tcp-bbr.h.

Referenced by CongestionStateSet(), HandleProbeRTT(), ModulateCwndForProbeRTT(), and SetCwnd().

◆ m_nextRoundDelivered

uint32_t ns3::TcpBbr::m_nextRoundDelivered {0}
private

Denotes the end of a packet-timed round trip.

Definition at line 361 of file tcp-bbr.h.

Referenced by HandleProbeRTT(), InitRoundCounting(), and UpdateRound().

◆ m_pacingGain

double ns3::TcpBbr::m_pacingGain {0}
private

◆ m_packetConservation

bool ns3::TcpBbr::m_packetConservation {false}
private

Enable/Disable packet conservation mode.

Definition at line 366 of file tcp-bbr.h.

Referenced by CongestionStateSet(), CwndEvent(), ModulateCwndForRecovery(), and UpdateRound().

◆ m_priorCwnd

uint32_t ns3::TcpBbr::m_priorCwnd {0}
private

The last-known good congestion window.

Definition at line 367 of file tcp-bbr.h.

Referenced by CongestionStateSet(), RestoreCwnd(), and SaveCwnd().

◆ m_probeRtPropStamp

Time ns3::TcpBbr::m_probeRtPropStamp {Seconds (0)}
private

The wall clock time at which the current BBR.RTProp sample was obtained.

Definition at line 363 of file tcp-bbr.h.

◆ m_probeRttDoneStamp

Time ns3::TcpBbr::m_probeRttDoneStamp {Seconds (0)}
private

Time to exit from BBR_PROBE_RTT state.

Definition at line 364 of file tcp-bbr.h.

Referenced by CheckProbeRTT(), CwndEvent(), and HandleProbeRTT().

◆ m_probeRttDuration

Time ns3::TcpBbr::m_probeRttDuration {MilliSeconds (200)}
private

A constant specifying the minimum duration for which ProbeRTT state, default 200 millisecs.

Definition at line 362 of file tcp-bbr.h.

Referenced by GetTypeId(), and HandleProbeRTT().

◆ m_probeRttRoundDone

bool ns3::TcpBbr::m_probeRttRoundDone {false}
private

True when it is time to exit BBR_PROBE_RTT.

Definition at line 365 of file tcp-bbr.h.

Referenced by CwndEvent(), and HandleProbeRTT().

◆ m_roundCount

uint32_t ns3::TcpBbr::m_roundCount {0}
private

Count of packet-timed round trips.

Definition at line 359 of file tcp-bbr.h.

Referenced by InitRoundCounting(), UpdateBtlBw(), and UpdateRound().

◆ m_roundStart

bool ns3::TcpBbr::m_roundStart {false}
private

A boolean that BBR sets to true once per packet-timed round trip.

Definition at line 360 of file tcp-bbr.h.

Referenced by CheckFullPipe(), CongestionStateSet(), HandleProbeRTT(), InitRoundCounting(), UpdateAckAggregation(), and UpdateRound().

◆ m_rtProp

Time ns3::TcpBbr::m_rtProp {Time::Max ()}
private

Estimated two-way round-trip propagation delay of the path, estimated from the windowed minimum recent round-trip delay sample.

Definition at line 372 of file tcp-bbr.h.

Referenced by CongestionStateSet(), InFlight(), IsNextCyclePhase(), and UpdateRTprop().

◆ m_rtPropExpired

bool ns3::TcpBbr::m_rtPropExpired {false}
private

A boolean recording whether the BBR.RTprop has expired.

Definition at line 376 of file tcp-bbr.h.

Referenced by CheckProbeRTT(), and UpdateRTprop().

◆ m_rtPropFilterLen

Time ns3::TcpBbr::m_rtPropFilterLen {Seconds (10)}
private

A constant specifying the length of the RTProp min filter window, default 10 secs.

Definition at line 377 of file tcp-bbr.h.

Referenced by GetTypeId(), and UpdateRTprop().

◆ m_rtPropStamp

Time ns3::TcpBbr::m_rtPropStamp {Seconds (0)}
private

The wall clock time at which the current BBR.RTProp sample was obtained.

Definition at line 378 of file tcp-bbr.h.

Referenced by CongestionStateSet(), CwndEvent(), HandleProbeRTT(), and UpdateRTprop().

◆ m_sendQuantum

uint32_t ns3::TcpBbr::m_sendQuantum {0}
private

The maximum size of a data aggregate scheduled and transmitted together.

Definition at line 373 of file tcp-bbr.h.

Referenced by CongestionStateSet(), InFlight(), and SetSendQuantum().

◆ m_state

BbrMode_t ns3::TcpBbr::m_state {BbrMode_t::BBR_STARTUP}
private

◆ m_targetCWnd

uint32_t ns3::TcpBbr::m_targetCWnd {0}
private

Target value for congestion window, adapted to the estimated BDP.

Definition at line 369 of file tcp-bbr.h.

Referenced by CongestionStateSet(), SetCwnd(), and UpdateTargetCwnd().

◆ m_txItemDelivered

uint32_t ns3::TcpBbr::m_txItemDelivered {0}
private

The number of bytes already delivered at the time of new packet transmission.

Definition at line 383 of file tcp-bbr.h.

Referenced by CongControl().

◆ m_uv

Ptr<UniformRandomVariable> ns3::TcpBbr::m_uv {nullptr}
private

Uniform Random Variable.

Definition at line 380 of file tcp-bbr.h.

Referenced by TcpBbr(), EnterProbeBW(), and SetStream().

◆ PACING_GAIN_CYCLE

const double ns3::TcpBbr::PACING_GAIN_CYCLE = {5.0 / 4, 3.0 / 4, 1, 1, 1, 1, 1, 1}
static

BBR uses an eight-phase cycle with the given pacing_gain value in the BBR ProbeBW gain cycle.

Definition at line 56 of file tcp-bbr.h.

Referenced by AdvanceCyclePhase().


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