A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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_tMaxBandwidthFilter_t
 Definition of max bandwidth filter.
 

Public Member Functions

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

Static Public Member Functions

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

Static Public Attributes

static const char *const BbrModeName [BBR_PROBE_RTT+1]
 Literal names of BBR mode for use in log messages.
 
static const uint8_t GAIN_CYCLE_LENGTH = 8
 The number of phases in the BBR ProbeBW gain cycle.
 
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.
 

Protected Member Functions

uint32_t AckAggregationCwnd ()
 Find Cwnd increment based on ack aggregation.
 
void AdvanceCyclePhase ()
 Advances pacing gain using cycle gain algorithm, while in BBR_PROBE_BW state.
 
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 ()
 
void CheckDrain (Ptr< TcpSocketState > tcb)
 Checks whether its time to enter BBR_DRAIN or BBR_PROBE_BW state.
 
void CheckFullPipe (const TcpRateOps::TcpRateSample &rs)
 Identifies whether pipe or BDP is already full.
 
void CheckProbeRTT (Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
 This method handles the steps related to the ProbeRTT state.
 
void EnterDrain ()
 Updates variables specific to BBR_DRAIN state.
 
void EnterProbeBW ()
 Updates variables specific to BBR_PROBE_BW state.
 
void EnterProbeRTT ()
 Updates variables specific to BBR_PROBE_RTT state.
 
void EnterStartup ()
 Updates variables specific to BBR_STARTUP state.
 
void ExitProbeRTT ()
 Called on exiting from BBR_PROBE_RTT state, it eithers invoke EnterProbeBW () or EnterStartup ()
 
uint32_t GetBbrState ()
 Gets BBR state.
 
double GetCwndGain ()
 Gets current cwnd gain.
 
double GetPacingGain ()
 Gets current pacing gain.
 
void HandleProbeRTT (Ptr< TcpSocketState > tcb)
 Handles the steps for BBR_PROBE_RTT state.
 
void HandleRestartFromIdle (Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
 Updates pacing rate if socket is restarting from idle state.
 
uint32_t InFlight (Ptr< TcpSocketState > tcb, double gain)
 Estimates the target value for congestion window.
 
void InitFullPipe ()
 Initializes the full pipe estimator.
 
void InitPacingRate (Ptr< TcpSocketState > tcb)
 Initializes the pacing rate.
 
void InitRoundCounting ()
 Initializes the round counting related variables.
 
bool IsNextCyclePhase (Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
 Checks whether to move to next value of pacing gain while in BBR_PROBE_BW.
 
void ModulateCwndForProbeRTT (Ptr< TcpSocketState > tcb)
 Modulates congestion window in BBR_PROBE_RTT.
 
bool ModulateCwndForRecovery (Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
 Modulates congestion window in CA_RECOVERY.
 
void RestoreCwnd (Ptr< TcpSocketState > tcb)
 Helper to restore the last-known good congestion window.
 
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.
 
void SetBbrState (BbrMode_t state)
 Sets BBR state.
 
void SetCwnd (Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
 Updates congestion window based on the network model.
 
void SetPacingRate (Ptr< TcpSocketState > tcb, double gain)
 Updates pacing rate based on network model.
 
void SetSendQuantum (Ptr< TcpSocketState > tcb)
 Updates send quantum based on the network model.
 
void UpdateAckAggregation (Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
 Estimates max degree of aggregation.
 
void UpdateBottleneckBandwidth (Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
 Updates maximum bottleneck.
 
void UpdateControlParameters (Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
 Updates control parameters congestion windowm, pacing rate, send quantum.
 
void UpdateModelAndState (Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
 Updates BBR network model (Maximum bandwidth and minimum RTT).
 
void UpdateRound (Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
 Updates round counting related variables.
 
void UpdateRTprop (Ptr< TcpSocketState > tcb)
 Updates minimum RTT.
 
void UpdateTargetCwnd (Ptr< TcpSocketState > tcb)
 Updates target congestion window.
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void DoDispose ()
 Destructor implementation.
 
virtual void DoInitialize ()
 Initialize() implementation.
 
virtual void NotifyNewAggregate ()
 Notify all Objects aggregated to this one of a new Object being aggregated.
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes.
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed.
 

Private Attributes

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

Related Symbols

(Note that these are not member symbols.)

class TcpBbrCheckGainValuesTest
 TcpBbrCheckGainValuesTest friend class (for tests).
 

Additional Inherited Members

Detailed Description

BBR congestion control algorithm.

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

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

Member Typedef Documentation

◆ MaxBandwidthFilter_t

Definition of max bandwidth filter.

Definition at line 79 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 67 of file tcp-bbr.h.

Constructor & Destructor Documentation

◆ TcpBbr() [1/2]

ns3::TcpBbr::TcpBbr ( )

Constructor.

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

References ns3::CreateObject(), m_uv, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ TcpBbr() [2/2]

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

Copy constructor.

Parameters
sockThe socket to copy from.

Definition at line 91 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 479 of file tcp-bbr.cc.

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

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 258 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 287 of file tcp-bbr.cc.

References AdvanceCyclePhase(), BBR_PROBE_BW, 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 342 of file tcp-bbr.cc.

References BBR_DRAIN, BBR_STARTUP, EnterDrain(), EnterProbeBW(), InFlight(), m_isPipeFilled, 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 297 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 443 of file tcp-bbr.cc.

References BBR_PROBE_RTT, EnterProbeRTT(), HandleProbeRTT(), ns3::TcpRateOps::TcpRateSample::m_delivered, m_idleRestart, m_minRttExpired, m_probeRttDoneStamp, 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 )
overridevirtual

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 703 of file tcp-bbr.cc.

References m_delivered, 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 )
overridevirtual

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 714 of file tcp-bbr.cc.

References ns3::TcpSocketState::CA_LOSS, ns3::TcpSocketState::CA_OPEN, ns3::TcpSocketState::CA_RECOVERY, EnterStartup(), InitFullPipe(), InitPacingRate(), InitRoundCounting(), m_ackEpochAcked, m_ackEpochTime, m_extraAcked, m_extraAckedIdx, m_extraAckedWinRtt, m_isInitialized, m_minPipeCwnd, m_minRtt, m_minRttStamp, m_packetConservation, m_priorCwnd, m_roundStart, m_sendQuantum, m_targetCWnd, ns3::Time::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 )
overridevirtual

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 757 of file tcp-bbr.cc.

References BBR_PROBE_BW, BBR_PROBE_RTT, ns3::TcpSocketState::CA_EVENT_COMPLETE_CWR, ns3::TcpSocketState::CA_EVENT_TX_START, ExitProbeRTT(), m_ackEpochAcked, m_ackEpochTime, m_appLimited, m_idleRestart, m_minRttStamp, m_packetConservation, m_probeRttDoneStamp, m_probeRttRoundDone, 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 322 of file tcp-bbr.cc.

References BBR_DRAIN, 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 331 of file tcp-bbr.cc.

References AdvanceCyclePhase(), BBR_PROBE_BW, GAIN_CYCLE_LENGTH, 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 370 of file tcp-bbr.cc.

References BBR_PROBE_RTT, 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 197 of file tcp-bbr.cc.

References BBR_STARTUP, 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 400 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 ( )
overridevirtual

Copy the congestion control algorithm across sockets.

Returns
a pointer of the copied object

Implements ns3::TcpCongestionOps.

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

References ns3::Object::CopyObject.

◆ GetBbrState()

uint32_t ns3::TcpBbr::GetBbrState ( )
protected

Gets BBR state.

Returns
returns BBR state.

Definition at line 669 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 676 of file tcp-bbr.cc.

References m_cWndGain, and NS_LOG_FUNCTION.

◆ GetName()

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

Get the name of the congestion control algorithm.

Returns
A string identifying the name

Implements ns3::TcpCongestionOps.

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

◆ GetPacingGain()

double ns3::TcpBbr::GetPacingGain ( )
protected

Gets current pacing gain.

Returns
returns current pacing gain.

Definition at line 683 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 )
overridevirtual

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 implementer 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 789 of file tcp-bbr.cc.

References NS_LOG_FUNCTION, and SaveCwnd().

+ Here is the call graph for this function:

◆ GetTypeId()

TypeId ns3::TcpBbr::GetTypeId ( )
static

◆ HandleProbeRTT()

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

Handles the steps for BBR_PROBE_RTT state.

Parameters
tcbthe socket state.

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

References ExitProbeRTT(), m_appLimited, m_delivered, m_minPipeCwnd, m_minRttStamp, m_nextRoundDelivered, m_probeRttDoneStamp, m_probeRttDuration, m_probeRttRoundDone, m_roundStart, 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 206 of file tcp-bbr.cc.

References BBR_PROBE_BW, 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
overridevirtual

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 696 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 240 of file tcp-bbr.cc.

References BBR_PROBE_BW, ns3::WindowedFilter< T, Compare, TimeT, TimeDeltaT >::GetBest(), m_cycleIndex, m_maxBwFilter, m_minRtt, 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

Initializes the full pipe estimator.

Definition at line 159 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

Initializes the pacing rate.

Parameters
tcbthe socket state.

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

References ns3::DataRate::GetBitRate(), ns3::Time::GetSeconds(), m_bandwidthWindowLength, m_hasSeenRtt, m_maxBwFilter, m_pacingGain, 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

Initializes the round counting related variables.

Definition at line 150 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 267 of file tcp-bbr.cc.

References InFlight(), ns3::TcpRateOps::TcpRateSample::m_bytesLoss, m_cycleStamp, m_minRtt, m_pacingGain, ns3::TcpRateOps::TcpRateSample::m_priorInFlight, 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 558 of file tcp-bbr.cc.

References BBR_PROBE_RTT, m_minPipeCwnd, m_state, and NS_LOG_FUNCTION.

Referenced by SetCwnd().

+ 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 540 of file tcp-bbr.cc.

References ns3::TcpRateOps::TcpRateSample::m_ackedSacked, ns3::TcpRateOps::TcpRateSample::m_bytesLoss, m_packetConservation, and NS_LOG_FUNCTION.

Referenced by SetCwnd().

+ 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 393 of file tcp-bbr.cc.

References m_priorCwnd, and NS_LOG_FUNCTION.

Referenced by CwndEvent(), and HandleProbeRTT().

+ 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 379 of file tcp-bbr.cc.

References BBR_PROBE_RTT, ns3::TcpSocketState::CA_RECOVERY, m_priorCwnd, m_state, 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 660 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 568 of file tcp-bbr.cc.

References ns3::TcpSocketState::CA_RECOVERY, ns3::TcpRateOps::TcpRateSample::m_ackedSacked, m_delivered, m_isPipeFilled, m_minPipeCwnd, m_targetCWnd, ModulateCwndForProbeRTT(), ModulateCwndForRecovery(), NS_LOG_DEBUG, 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 220 of file tcp-bbr.cc.

References ns3::WindowedFilter< T, Compare, TimeT, TimeDeltaT >::GetBest(), ns3::DataRate::GetBitRate(), InitPacingRate(), m_hasSeenRtt, m_isPipeFilled, m_maxBwFilter, m_pacingMargin, ns3::Time::Max(), NS_LOG_DEBUG, 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 465 of file tcp-bbr.cc.

References 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 143 of file tcp-bbr.cc.

References m_uv, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ UpdateAckAggregation()

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

Estimates max degree of aggregation.

Parameters
tcbthe socket state.
rsrate sample.

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

References ns3::WindowedFilter< T, Compare, TimeT, TimeDeltaT >::GetBest(), ns3::DataRate::GetBitRate(), ns3::Time::GetSeconds(), ns3::TcpRateOps::TcpRateSample::m_ackedSacked, m_ackEpochAcked, m_ackEpochAckedResetThresh, m_ackEpochTime, ns3::TcpRateOps::TcpRateSample::m_delivered, m_extraAcked, m_extraAckedGain, m_extraAckedIdx, m_extraAckedWinRtt, m_extraAckedWinRttLength, m_maxBwFilter, m_roundStart, ns3::Simulator::Now(), and NS_LOG_FUNCTION.

Referenced by UpdateModelAndState().

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

◆ UpdateBottleneckBandwidth()

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

Updates maximum bottleneck.

Parameters
tcbthe socket state.
rsrate sample.

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

References ns3::WindowedFilter< T, Compare, TimeT, TimeDeltaT >::GetBest(), ns3::Time::IsZero(), ns3::TcpRateOps::TcpRateSample::m_delivered, ns3::TcpRateOps::TcpRateSample::m_deliveryRate, ns3::TcpRateOps::TcpRateSample::m_interval, 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 651 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 638 of file tcp-bbr.cc.

References CheckCyclePhase(), CheckDrain(), CheckFullPipe(), CheckProbeRTT(), NS_LOG_FUNCTION, UpdateAckAggregation(), UpdateBottleneckBandwidth(), 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 603 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 UpdateBottleneckBandwidth().

+ 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 358 of file tcp-bbr.cc.

References m_minRtt, m_minRttExpired, m_minRttFilterLen, m_minRttStamp, 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 472 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 Symbol Documentation

◆ TcpBbrCheckGainValuesTest

friend class TcpBbrCheckGainValuesTest
friend

TcpBbrCheckGainValuesTest friend class (for tests).

Definition at line 110 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 84 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 40 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 390 of file tcp-bbr.h.

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

◆ m_ackEpochAckedResetThresh

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

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

Definition at line 386 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 389 of file tcp-bbr.h.

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

◆ m_appLimited

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

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

Definition at line 380 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 342 of file tcp-bbr.h.

Referenced by GetTypeId(), and InitPacingRate().

◆ m_cWndGain

TracedValue<double> ns3::TcpBbr::m_cWndGain {0}
private

The dynamic congestion window gain factor.

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

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

◆ m_cycleIndex

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

Current index of gain cycle.

Definition at line 371 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 370 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 379 of file tcp-bbr.h.

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

◆ m_extraAcked

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

Maximum excess data acked in epoch.

Definition at line 383 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 382 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 388 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 384 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 385 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 363 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 364 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 391 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 346 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 361 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 initialization variables.

Definition at line 377 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 347 of file tcp-bbr.h.

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

◆ m_maxBwFilter

MaxBandwidthFilter_t ns3::TcpBbr::m_maxBwFilter
private

◆ m_minPipeCwnd

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

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

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

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

◆ m_minRtt

TracedValue<Time> ns3::TcpBbr::m_minRtt
private
Initial value:
{
static Time Max()
Maximum representable Time Not to be confused with Max(Time,Time).
Definition nstime.h:286

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

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

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

◆ m_minRttExpired

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

A boolean recording whether the BBR.RTprop has expired.

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

Referenced by CheckProbeRTT(), and UpdateRTprop().

◆ m_minRttFilterLen

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

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

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

Referenced by GetTypeId(), and UpdateRTprop().

◆ m_minRttStamp

Time ns3::TcpBbr::m_minRttStamp
private
Initial value:
{
Seconds(0)}
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition nstime.h:1308

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

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

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

◆ m_nextRoundDelivered

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

Denotes the end of a packet-timed round trip.

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

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

◆ m_pacingGain

TracedValue<double> ns3::TcpBbr::m_pacingGain {0}
private

◆ m_pacingMargin

double ns3::TcpBbr::m_pacingMargin {0.01}
private

BBR intentionally reduces the pacing rate by 1% to drain any standing queues.

See bbr_rate_bytes_per_sec in Linux.

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

Referenced by SetPacingRate().

◆ m_packetConservation

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

Enable/Disable packet conservation mode.

Definition at line 359 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 360 of file tcp-bbr.h.

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

◆ m_probeRtPropStamp

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

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

Definition at line 355 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 357 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 353 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 358 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 350 of file tcp-bbr.h.

Referenced by InitRoundCounting(), UpdateBottleneckBandwidth(), 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 351 of file tcp-bbr.h.

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

◆ m_sendQuantum

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

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

Definition at line 368 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 362 of file tcp-bbr.h.

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

◆ m_uv

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

Uniform Random Variable.

Definition at line 378 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 46 of file tcp-bbr.h.

Referenced by AdvanceCyclePhase().


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