A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
tcp-bbr.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 NITK Surathkal
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Authors: Vivek Jain <jain.vivek.anand@gmail.com>
18 * Viyom Mittal <viyommittal@gmail.com>
19 * Mohit P. Tahiliani <tahiliani@nitk.edu.in>
20 */
21
22#ifndef TCPBBR_H
23#define TCPBBR_H
24
25#include "tcp-congestion-ops.h"
26#include "windowed-filter.h"
27
28#include "ns3/data-rate.h"
29#include "ns3/random-variable-stream.h"
30#include "ns3/traced-value.h"
31
32class TcpBbrCheckGainValuesTest;
33
34namespace ns3
35{
36
37/**
38 * \ingroup congestionOps
39 *
40 * \brief BBR congestion control algorithm
41 *
42 * This class implement the BBR (Bottleneck Bandwidth and Round-trip propagation time)
43 * congestion control type.
44 */
46{
47 public:
48 /**
49 * \brief The number of phases in the BBR ProbeBW gain cycle.
50 */
51 static const uint8_t GAIN_CYCLE_LENGTH = 8;
52
53 /**
54 * \brief BBR uses an eight-phase cycle with the given pacing_gain value
55 * in the BBR ProbeBW gain cycle.
56 */
57 const static double PACING_GAIN_CYCLE[];
58 /**
59 * \brief Get the type ID.
60 * \return the object TypeId
61 */
62 static TypeId GetTypeId();
63
64 /**
65 * \brief Constructor
66 */
67 TcpBbr();
68
69 /**
70 * Copy constructor.
71 * \param sock The socket to copy from.
72 */
73 TcpBbr(const TcpBbr& sock);
74
75 /**
76 * \brief BBR has the following 4 modes for deciding how fast to send:
77 */
79 {
80 BBR_STARTUP, /**< Ramp up sending rate rapidly to fill pipe */
81 BBR_DRAIN, /**< Drain any queue created during startup */
82 BBR_PROBE_BW, /**< Discover, share bw: pace around estimated bw */
83 BBR_PROBE_RTT, /**< Cut inflight to min to probe min_rtt */
84 };
85
90 MaxBandwidthFilter_t; //!< Definition of max bandwidth filter.
91
92 /**
93 * \brief Literal names of BBR mode for use in log messages
94 */
95 static const char* const BbrModeName[BBR_PROBE_RTT + 1];
96
97 /**
98 * Assign a fixed random variable stream number to the random variables
99 * used by this model.
100 *
101 * \param stream first stream index to use
102 */
103 virtual void SetStream(uint32_t stream);
104
105 std::string GetName() const override;
106 bool HasCongControl() const override;
109 const TcpRateOps::TcpRateSample& rs) override;
111 const TcpSocketState::TcpCongState_t newState) override;
112 void CwndEvent(Ptr<TcpSocketState> tcb, const TcpSocketState::TcpCAEvent_t event) override;
113 uint32_t GetSsThresh(Ptr<const TcpSocketState> tcb, uint32_t bytesInFlight) override;
114 Ptr<TcpCongestionOps> Fork() override;
115
116 protected:
117 /**
118 * \brief TcpBbrCheckGainValuesTest friend class (for tests).
119 * \relates TcpBbrCheckGainValuesTest
120 */
122
123 /**
124 * \brief Advances pacing gain using cycle gain algorithm, while in BBR_PROBE_BW state
125 */
126 void AdvanceCyclePhase();
127
128 /**
129 * \brief Checks whether to advance pacing gain in BBR_PROBE_BW state,
130 * and if allowed calls AdvanceCyclePhase ()
131 * \param tcb the socket state.
132 * \param rs rate sample.
133 */
135
136 /**
137 * \brief Checks whether its time to enter BBR_DRAIN or BBR_PROBE_BW state
138 * \param tcb the socket state.
139 */
141
142 /**
143 * \brief Identifies whether pipe or BDP is already full
144 * \param rs rate sample.
145 */
147
148 /**
149 * \brief This method handles the steps related to the ProbeRTT state
150 * \param tcb the socket state.
151 * \param rs rate sample.
152 */
154
155 /**
156 * \brief Updates variables specific to BBR_DRAIN state
157 */
158 void EnterDrain();
159
160 /**
161 * \brief Updates variables specific to BBR_PROBE_BW state
162 */
163 void EnterProbeBW();
164
165 /**
166 * \brief Updates variables specific to BBR_PROBE_RTT state
167 */
168 void EnterProbeRTT();
169
170 /**
171 * \brief Updates variables specific to BBR_STARTUP state
172 */
173 void EnterStartup();
174
175 /**
176 * \brief Called on exiting from BBR_PROBE_RTT state, it eithers invoke EnterProbeBW () or
177 * EnterStartup ()
178 */
179 void ExitProbeRTT();
180
181 /**
182 * \brief Gets BBR state.
183 * \return returns BBR state.
184 */
186
187 /**
188 * \brief Gets current pacing gain.
189 * \return returns current pacing gain.
190 */
191 double GetPacingGain();
192
193 /**
194 * \brief Gets current cwnd gain.
195 * \return returns current cwnd gain.
196 */
197 double GetCwndGain();
198
199 /**
200 * \brief Handles the steps for BBR_PROBE_RTT state.
201 * \param tcb the socket state.
202 */
204
205 /**
206 * \brief Updates pacing rate if socket is restarting from idle state.
207 * \param tcb the socket state.
208 * \param rs rate sample.
209 */
211
212 /**
213 * \brief Estimates the target value for congestion window
214 * \param tcb the socket state.
215 * \param gain cwnd gain.
216 * \return returns congestion window based on max bandwidth and min RTT.
217 */
218 uint32_t InFlight(Ptr<TcpSocketState> tcb, double gain);
219
220 /**
221 * \brief Initializes the full pipe estimator.
222 */
223 void InitFullPipe();
224
225 /**
226 * \brief Initializes the pacing rate.
227 * \param tcb the socket state.
228 */
230
231 /**
232 * \brief Initializes the round counting related variables.
233 */
234 void InitRoundCounting();
235
236 /**
237 * \brief Checks whether to move to next value of pacing gain while in BBR_PROBE_BW.
238 * \param tcb the socket state.
239 * \param rs rate sample.
240 * \returns true if want to move to next value otherwise false.
241 */
243
244 /**
245 * \brief Modulates congestion window in BBR_PROBE_RTT.
246 * \param tcb the socket state.
247 */
249
250 /**
251 * \brief Modulates congestion window in CA_RECOVERY.
252 * \param tcb the socket state.
253 * \param rs rate sample.
254 * \return true if congestion window is updated in CA_RECOVERY.
255 */
257
258 /**
259 * \brief Helper to restore the last-known good congestion window
260 * \param tcb the socket state.
261 */
263
264 /**
265 * \brief Helper to remember the last-known good congestion window or
266 * the latest congestion window unmodulated by loss recovery or ProbeRTT.
267 * \param tcb the socket state.
268 */
270
271 /**
272 * \brief Updates congestion window based on the network model.
273 * \param tcb the socket state.
274 * \param rs rate sample
275 */
277
278 /**
279 * \brief Updates pacing rate based on network model.
280 * \param tcb the socket state.
281 * \param gain pacing gain.
282 */
283 void SetPacingRate(Ptr<TcpSocketState> tcb, double gain);
284
285 /**
286 * \brief Updates send quantum based on the network model.
287 * \param tcb the socket state.
288 */
290
291 /**
292 * \brief Updates maximum bottleneck.
293 * \param tcb the socket state.
294 * \param rs rate sample.
295 */
297
298 /**
299 * \brief Updates control parameters congestion windowm, pacing rate, send quantum.
300 * \param tcb the socket state.
301 * \param rs rate sample.
302 */
304
305 /**
306 * \brief Updates BBR network model (Maximum bandwidth and minimum RTT).
307 * \param tcb the socket state.
308 * \param rs rate sample.
309 */
311
312 /**
313 * \brief Updates round counting related variables.
314 * \param tcb the socket state.
315 * \param rs rate sample.
316 */
318
319 /**
320 * \brief Updates minimum RTT.
321 * \param tcb the socket state.
322 */
324
325 /**
326 * \brief Updates target congestion window.
327 * \param tcb the socket state.
328 */
330
331 /**
332 * \brief Sets BBR state.
333 * \param state BBR state.
334 */
335 void SetBbrState(BbrMode_t state);
336
337 /**
338 * \brief Find Cwnd increment based on ack aggregation.
339 * \return uint32_t aggregate cwnd.
340 */
342
343 /**
344 * \brief Estimates max degree of aggregation.
345 * \param tcb the socket state.
346 * \param rs rate sample.
347 */
349
350 private:
351 BbrMode_t m_state{BbrMode_t::BBR_STARTUP}; //!< Current state of BBR state machine
352 MaxBandwidthFilter_t m_maxBwFilter; //!< Maximum bandwidth filter
353 uint32_t m_bandwidthWindowLength{0}; //!< A constant specifying the length of the BBR.BtlBw max
354 //!< filter window, default 10 packet-timed round trips.
355 double m_pacingGain{0}; //!< The dynamic pacing gain factor
356 double m_cWndGain{0}; //!< The dynamic congestion window gain factor
357 double m_highGain{0}; //!< A constant specifying highest gain factor, default is 2.89
358 bool m_isPipeFilled{false}; //!< A boolean that records whether BBR has filled the pipe
360 0}; //!< The minimal congestion window value BBR tries to target, default 4 Segment size
361 uint32_t m_roundCount{0}; //!< Count of packet-timed round trips
362 bool m_roundStart{false}; //!< A boolean that BBR sets to true once per packet-timed round trip
363 uint32_t m_nextRoundDelivered{0}; //!< Denotes the end of a packet-timed round trip
364 Time m_probeRttDuration{MilliSeconds(200)}; //!< A constant specifying the minimum duration for
365 //!< which ProbeRTT state, default 200 millisecs
367 Seconds(0)}; //!< The wall clock time at which the current BBR.RTProp sample was obtained.
368 Time m_probeRttDoneStamp{Seconds(0)}; //!< Time to exit from BBR_PROBE_RTT state
369 bool m_probeRttRoundDone{false}; //!< True when it is time to exit BBR_PROBE_RTT
370 bool m_packetConservation{false}; //!< Enable/Disable packet conservation mode
371 uint32_t m_priorCwnd{0}; //!< The last-known good congestion window
372 bool m_idleRestart{false}; //!< When restarting from idle, set it true
373 uint32_t m_targetCWnd{0}; //!< Target value for congestion window, adapted to the estimated BDP
374 DataRate m_fullBandwidth{0}; //!< Value of full bandwidth recorded
375 uint32_t m_fullBandwidthCount{0}; //!< Count of full bandwidth recorded consistently
377 Time::Max()}; //!< Estimated two-way round-trip propagation delay of the path, estimated
378 //!< from the windowed minimum recent round-trip delay sample.
380 0}; //!< The maximum size of a data aggregate scheduled and transmitted together
381 Time m_cycleStamp{Seconds(0)}; //!< Last time gain cycle updated
382 uint32_t m_cycleIndex{0}; //!< Current index of gain cycle
383 bool m_rtPropExpired{false}; //!< A boolean recording whether the BBR.RTprop has expired
384 Time m_rtPropFilterLen{Seconds(10)}; //!< A constant specifying the length of the RTProp min
385 //!< filter window, default 10 secs.
387 Seconds(0)}; //!< The wall clock time at which the current BBR.RTProp sample was obtained
388 bool m_isInitialized{false}; //!< Set to true after first time initializtion variables
389 Ptr<UniformRandomVariable> m_uv{nullptr}; //!< Uniform Random Variable
390 uint64_t m_delivered{0}; //!< The total amount of data in bytes delivered so far
392 0}; //!< The index of the last transmitted packet marked as application-limited
394 0}; //!< The number of bytes already delivered at the time of new packet transmission
395 uint32_t m_extraAckedGain{1}; //!< Gain factor for adding extra ack to cwnd
396 uint32_t m_extraAcked[2]{0, 0}; //!< Maximum excess data acked in epoch
397 uint32_t m_extraAckedWinRtt{0}; //!< Age of extra acked in rtt
398 uint32_t m_extraAckedWinRttLength{5}; //!< Window length of extra acked window
400 1 << 17}; //!< Max allowed val for m_ackEpochAcked, after which sampling epoch is reset
401 uint32_t m_extraAckedIdx{0}; //!< Current index in extra acked array
402 Time m_ackEpochTime{Seconds(0)}; //!< Starting of ACK sampling epoch time
403 uint32_t m_ackEpochAcked{0}; //!< Bytes ACked in sampling epoch
404 bool m_hasSeenRtt{false}; //!< Have we seen RTT sample yet?
405};
406
407} // namespace ns3
408#endif // TCPBBR_H
Class for representing data rates.
Definition: data-rate.h:89
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Tests whether BBR sets correct value of pacing and cwnd gain based on different state.
Definition: tcp-bbr-test.cc:87
BBR congestion control algorithm.
Definition: tcp-bbr.h:46
MaxBandwidthFilter_t m_maxBwFilter
Maximum bandwidth filter.
Definition: tcp-bbr.h:352
bool m_hasSeenRtt
Have we seen RTT sample yet?
Definition: tcp-bbr.h:404
double m_cWndGain
The dynamic congestion window gain factor.
Definition: tcp-bbr.h:356
void ModulateCwndForProbeRTT(Ptr< TcpSocketState > tcb)
Modulates congestion window in BBR_PROBE_RTT.
Definition: tcp-bbr.cc:553
uint32_t m_nextRoundDelivered
Denotes the end of a packet-timed round trip.
Definition: tcp-bbr.h:363
BbrMode_t
BBR has the following 4 modes for deciding how fast to send:
Definition: tcp-bbr.h:79
@ BBR_PROBE_RTT
Cut inflight to min to probe min_rtt.
Definition: tcp-bbr.h:83
@ BBR_DRAIN
Drain any queue created during startup.
Definition: tcp-bbr.h:81
@ BBR_STARTUP
Ramp up sending rate rapidly to fill pipe.
Definition: tcp-bbr.h:80
@ BBR_PROBE_BW
Discover, share bw: pace around estimated bw.
Definition: tcp-bbr.h:82
uint32_t m_roundCount
Count of packet-timed round trips.
Definition: tcp-bbr.h:361
uint32_t m_priorCwnd
The last-known good congestion window.
Definition: tcp-bbr.h:371
uint32_t m_extraAckedWinRttLength
Window length of extra acked window.
Definition: tcp-bbr.h:398
virtual void SetStream(uint32_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
Definition: tcp-bbr.cc:142
TcpBbr()
Constructor.
Definition: tcp-bbr.cc:82
uint32_t m_extraAckedIdx
Current index in extra acked array.
Definition: tcp-bbr.h:401
Time m_probeRtPropStamp
The wall clock time at which the current BBR.RTProp sample was obtained.
Definition: tcp-bbr.h:366
std::string GetName() const override
Get the name of the congestion control algorithm.
Definition: tcp-bbr.cc:684
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.
Definition: tcp-bbr.cc:697
bool m_rtPropExpired
A boolean recording whether the BBR.RTprop has expired.
Definition: tcp-bbr.h:383
void CwndEvent(Ptr< TcpSocketState > tcb, const TcpSocketState::TcpCAEvent_t event) override
Trigger events/calculations on occurrence of congestion window event.
Definition: tcp-bbr.cc:752
uint32_t GetSsThresh(Ptr< const TcpSocketState > tcb, uint32_t bytesInFlight) override
Get the slow start threshold after a loss event.
Definition: tcp-bbr.cc:784
uint32_t m_bandwidthWindowLength
A constant specifying the length of the BBR.BtlBw max filter window, default 10 packet-timed round tr...
Definition: tcp-bbr.h:353
double m_highGain
A constant specifying highest gain factor, default is 2.89.
Definition: tcp-bbr.h:357
Time m_probeRttDuration
A constant specifying the minimum duration for which ProbeRTT state, default 200 millisecs.
Definition: tcp-bbr.h:364
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 (...
Definition: tcp-bbr.cc:284
uint32_t AckAggregationCwnd()
Find Cwnd increment based on ack aggregation.
Definition: tcp-bbr.cc:476
bool m_idleRestart
When restarting from idle, set it true.
Definition: tcp-bbr.h:372
Ptr< UniformRandomVariable > m_uv
Uniform Random Variable.
Definition: tcp-bbr.h:389
Time m_rtPropStamp
The wall clock time at which the current BBR.RTProp sample was obtained.
Definition: tcp-bbr.h:386
void UpdateBtlBw(Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
Updates maximum bottleneck.
Definition: tcp-bbr.cc:614
static TypeId GetTypeId()
Get the type ID.
Definition: tcp-bbr.cc:36
uint32_t m_minPipeCwnd
The minimal congestion window value BBR tries to target, default 4 Segment size.
Definition: tcp-bbr.h:359
Ptr< TcpCongestionOps > Fork() override
Copy the congestion control algorithm across sockets.
Definition: tcp-bbr.cc:792
uint32_t GetBbrState()
Gets BBR state.
Definition: tcp-bbr.cc:663
bool HasCongControl() const override
Returns true when Congestion Control Algorithm implements CongControl.
Definition: tcp-bbr.cc:690
double GetCwndGain()
Gets current cwnd gain.
Definition: tcp-bbr.cc:670
void UpdateRound(Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
Updates round counting related variables.
Definition: tcp-bbr.cc:597
BbrMode_t m_state
Current state of BBR state machine.
Definition: tcp-bbr.h:351
bool m_roundStart
A boolean that BBR sets to true once per packet-timed round trip.
Definition: tcp-bbr.h:362
void AdvanceCyclePhase()
Advances pacing gain using cycle gain algorithm, while in BBR_PROBE_BW state.
Definition: tcp-bbr.cc:255
void EnterProbeBW()
Updates variables specific to BBR_PROBE_BW state.
Definition: tcp-bbr.cc:328
double GetPacingGain()
Gets current pacing gain.
Definition: tcp-bbr.cc:677
uint64_t m_delivered
The total amount of data in bytes delivered so far.
Definition: tcp-bbr.h:390
void InitPacingRate(Ptr< TcpSocketState > tcb)
Initializes the pacing rate.
Definition: tcp-bbr.cc:167
bool IsNextCyclePhase(Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
Checks whether to move to next value of pacing gain while in BBR_PROBE_BW.
Definition: tcp-bbr.cc:264
bool m_isInitialized
Set to true after first time initializtion variables.
Definition: tcp-bbr.h:388
void RestoreCwnd(Ptr< TcpSocketState > tcb)
Helper to restore the last-known good congestion window.
Definition: tcp-bbr.cc:390
bool ModulateCwndForRecovery(Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
Modulates congestion window in CA_RECOVERY.
Definition: tcp-bbr.cc:535
double m_pacingGain
The dynamic pacing gain factor.
Definition: tcp-bbr.h:355
static const char *const BbrModeName[BBR_PROBE_RTT+1]
Literal names of BBR mode for use in log messages.
Definition: tcp-bbr.h:95
void UpdateRTprop(Ptr< TcpSocketState > tcb)
Updates minimum RTT.
Definition: tcp-bbr.cc:355
void CheckDrain(Ptr< TcpSocketState > tcb)
Checks whether its time to enter BBR_DRAIN or BBR_PROBE_BW state.
Definition: tcp-bbr.cc:339
void SetBbrState(BbrMode_t state)
Sets BBR state.
Definition: tcp-bbr.cc:654
void HandleRestartFromIdle(Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
Updates pacing rate if socket is restarting from idle state.
Definition: tcp-bbr.cc:205
static const double PACING_GAIN_CYCLE[]
BBR uses an eight-phase cycle with the given pacing_gain value in the BBR ProbeBW gain cycle.
Definition: tcp-bbr.h:57
WindowedFilter< DataRate, MaxFilter< DataRate >, uint32_t, uint32_t > MaxBandwidthFilter_t
Definition of max bandwidth filter.
Definition: tcp-bbr.h:90
bool m_isPipeFilled
A boolean that records whether BBR has filled the pipe.
Definition: tcp-bbr.h:358
void EnterStartup()
Updates variables specific to BBR_STARTUP state.
Definition: tcp-bbr.cc:196
void InitRoundCounting()
Initializes the round counting related variables.
Definition: tcp-bbr.cc:149
void InitFullPipe()
Initializes the full pipe estimator.
Definition: tcp-bbr.cc:158
void UpdateAckAggregation(Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
Estimates max degree of aggregation.
Definition: tcp-bbr.cc:491
uint32_t m_txItemDelivered
The number of bytes already delivered at the time of new packet transmission.
Definition: tcp-bbr.h:393
bool m_packetConservation
Enable/Disable packet conservation mode.
Definition: tcp-bbr.h:370
uint32_t InFlight(Ptr< TcpSocketState > tcb, double gain)
Estimates the target value for congestion window.
Definition: tcp-bbr.cc:237
uint32_t m_extraAckedWinRtt
Age of extra acked in rtt.
Definition: tcp-bbr.h:397
void SetPacingRate(Ptr< TcpSocketState > tcb, double gain)
Updates pacing rate based on network model.
Definition: tcp-bbr.cc:219
void SaveCwnd(Ptr< const TcpSocketState > tcb)
Helper to remember the last-known good congestion window or the latest congestion window unmodulated ...
Definition: tcp-bbr.cc:376
void EnterDrain()
Updates variables specific to BBR_DRAIN state.
Definition: tcp-bbr.cc:319
void CongestionStateSet(Ptr< TcpSocketState > tcb, const TcpSocketState::TcpCongState_t newState) override
Trigger events/calculations specific to a congestion state.
Definition: tcp-bbr.cc:709
Time m_probeRttDoneStamp
Time to exit from BBR_PROBE_RTT state.
Definition: tcp-bbr.h:368
uint32_t m_extraAcked[2]
Maximum excess data acked in epoch.
Definition: tcp-bbr.h:396
Time m_rtProp
Estimated two-way round-trip propagation delay of the path, estimated from the windowed minimum recen...
Definition: tcp-bbr.h:376
uint32_t m_appLimited
The index of the last transmitted packet marked as application-limited.
Definition: tcp-bbr.h:391
void UpdateModelAndState(Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
Updates BBR network model (Maximum bandwidth and minimum RTT).
Definition: tcp-bbr.cc:632
void UpdateControlParameters(Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
Updates control parameters congestion windowm, pacing rate, send quantum.
Definition: tcp-bbr.cc:645
Time m_ackEpochTime
Starting of ACK sampling epoch time.
Definition: tcp-bbr.h:402
Time m_cycleStamp
Last time gain cycle updated.
Definition: tcp-bbr.h:381
void CheckFullPipe(const TcpRateOps::TcpRateSample &rs)
Identifies whether pipe or BDP is already full.
Definition: tcp-bbr.cc:294
void EnterProbeRTT()
Updates variables specific to BBR_PROBE_RTT state.
Definition: tcp-bbr.cc:367
DataRate m_fullBandwidth
Value of full bandwidth recorded.
Definition: tcp-bbr.h:374
void HandleProbeRTT(Ptr< TcpSocketState > tcb)
Handles the steps for BBR_PROBE_RTT state.
Definition: tcp-bbr.cc:411
Time m_rtPropFilterLen
A constant specifying the length of the RTProp min filter window, default 10 secs.
Definition: tcp-bbr.h:384
uint32_t m_targetCWnd
Target value for congestion window, adapted to the estimated BDP.
Definition: tcp-bbr.h:373
uint32_t m_sendQuantum
The maximum size of a data aggregate scheduled and transmitted together.
Definition: tcp-bbr.h:379
void SetSendQuantum(Ptr< TcpSocketState > tcb)
Updates send quantum based on the network model.
Definition: tcp-bbr.cc:462
uint32_t m_ackEpochAckedResetThresh
Max allowed val for m_ackEpochAcked, after which sampling epoch is reset.
Definition: tcp-bbr.h:399
void ExitProbeRTT()
Called on exiting from BBR_PROBE_RTT state, it eithers invoke EnterProbeBW () or EnterStartup ()
Definition: tcp-bbr.cc:397
bool m_probeRttRoundDone
True when it is time to exit BBR_PROBE_RTT.
Definition: tcp-bbr.h:369
uint32_t m_fullBandwidthCount
Count of full bandwidth recorded consistently.
Definition: tcp-bbr.h:375
void UpdateTargetCwnd(Ptr< TcpSocketState > tcb)
Updates target congestion window.
Definition: tcp-bbr.cc:469
uint32_t m_cycleIndex
Current index of gain cycle.
Definition: tcp-bbr.h:382
uint32_t m_extraAckedGain
Gain factor for adding extra ack to cwnd.
Definition: tcp-bbr.h:395
void CheckProbeRTT(Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
This method handles the steps related to the ProbeRTT state.
Definition: tcp-bbr.cc:440
static const uint8_t GAIN_CYCLE_LENGTH
The number of phases in the BBR ProbeBW gain cycle.
Definition: tcp-bbr.h:51
void SetCwnd(Ptr< TcpSocketState > tcb, const TcpRateOps::TcpRateSample &rs)
Updates congestion window based on the network model.
Definition: tcp-bbr.cc:563
uint32_t m_ackEpochAcked
Bytes ACked in sampling epoch.
Definition: tcp-bbr.h:403
Congestion control abstract class.
TcpCAEvent_t
Congestion avoidance events.
TcpCongState_t
Definition of the Congestion state machine.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
static Time Max()
Maximum representable Time Not to be confused with Max(Time,Time).
Definition: nstime.h:297
a unique identifier for an interface.
Definition: type-id.h:59
Construct a windowed filter.
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1326
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1338
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Compares two values.
Information about the connection rate.
Definition: tcp-rate-ops.h:174
Rate Sample structure.
Definition: tcp-rate-ops.h:140