A Discrete-Event Network Simulator
API
pie-queue-disc.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2016 NITK Surathkal
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Authors: Shravya Ks <shravya.ks0@gmail.com>
19  * Smriti Murali <m.smriti.95@gmail.com>
20  * Mohit P. Tahiliani <tahiliani@nitk.edu.in>
21  */
22 
23 /*
24  * PORT NOTE: This code was ported from ns-2.36rc1 (queue/pie.cc).
25  * Most of the comments are also ported from the same.
26  */
27 
28 #include "ns3/log.h"
29 #include "ns3/enum.h"
30 #include "ns3/uinteger.h"
31 #include "ns3/double.h"
32 #include "ns3/simulator.h"
33 #include "ns3/abort.h"
34 #include "pie-queue-disc.h"
35 #include "ns3/drop-tail-queue.h"
36 
37 namespace ns3 {
38 
39 NS_LOG_COMPONENT_DEFINE ("PieQueueDisc");
40 
41 NS_OBJECT_ENSURE_REGISTERED (PieQueueDisc);
42 
44 {
45  static TypeId tid = TypeId ("ns3::PieQueueDisc")
46  .SetParent<QueueDisc> ()
47  .SetGroupName ("TrafficControl")
48  .AddConstructor<PieQueueDisc> ()
49  .AddAttribute ("MeanPktSize",
50  "Average of packet size",
51  UintegerValue (1000),
53  MakeUintegerChecker<uint32_t> ())
54  .AddAttribute ("A",
55  "Value of alpha",
56  DoubleValue (0.125),
58  MakeDoubleChecker<double> ())
59  .AddAttribute ("B",
60  "Value of beta",
61  DoubleValue (1.25),
63  MakeDoubleChecker<double> ())
64  .AddAttribute ("Tupdate",
65  "Time period to calculate drop probability",
66  TimeValue (MilliSeconds (15)),
68  MakeTimeChecker ())
69  .AddAttribute ("Supdate",
70  "Start time of the update timer",
71  TimeValue (Seconds (0)),
73  MakeTimeChecker ())
74  .AddAttribute ("MaxSize",
75  "The maximum number of packets accepted by this queue disc",
76  QueueSizeValue (QueueSize ("25p")),
80  .AddAttribute ("DequeueThreshold",
81  "Minimum queue size in bytes before dequeue rate is measured",
82  UintegerValue (16384),
84  MakeUintegerChecker<uint32_t> ())
85  .AddAttribute ("QueueDelayReference",
86  "Desired queue delay",
87  TimeValue (MilliSeconds (15)),
89  MakeTimeChecker ())
90  .AddAttribute ("MaxBurstAllowance",
91  "Current max burst allowance before random drop",
92  TimeValue (MilliSeconds (15)),
94  MakeTimeChecker ())
95  .AddAttribute ("UseDequeueRateEstimator",
96  "Enable/Disable usage of Dequeue Rate Estimator",
97  BooleanValue (false),
100  .AddAttribute ("UseCapDropAdjustment",
101  "Enable/Disable Cap Drop Adjustment feature mentioned in RFC 8033",
102  BooleanValue (true),
105  .AddAttribute ("UseEcn",
106  "True to use ECN (packets are marked instead of being dropped)",
107  BooleanValue (false),
110  .AddAttribute ("MarkEcnThreshold",
111  "ECN marking threshold (RFC 8033 suggests 0.1 (i.e., 10%) default)",
112  DoubleValue (0.1),
114  MakeDoubleChecker<double> (0,1))
115  .AddAttribute ("UseDerandomization",
116  "Enable/Disable Derandomization feature mentioned in RFC 8033",
117  BooleanValue (false),
120  .AddAttribute ("ActiveThreshold",
121  "Threshold for activating PIE (disabled by default)",
122  TimeValue (Time::Max ()),
124  MakeTimeChecker ())
125  ;
126 
127  return tid;
128 }
129 
132 {
133  NS_LOG_FUNCTION (this);
134  m_uv = CreateObject<UniformRandomVariable> ();
136 }
137 
139 {
140  NS_LOG_FUNCTION (this);
141 }
142 
143 void
145 {
146  NS_LOG_FUNCTION (this);
147  m_uv = 0;
148  m_rtrsEvent.Cancel ();
150 }
151 
152 Time
154 {
155  return m_qDelay;
156 }
157 
158 int64_t
160 {
161  NS_LOG_FUNCTION (this << stream);
162  m_uv->SetStream (stream);
163  return 1;
164 }
165 
166 bool
168 {
169  NS_LOG_FUNCTION (this << item);
170 
171  QueueSize nQueued = GetCurrentSize ();
172 
173  if (nQueued + item > GetMaxSize ())
174  {
175  // Drops due to queue limit: reactive
177  m_accuProb = 0;
178  return false;
179  }
180  else if ((m_activeThreshold == Time::Max () || m_active) && DropEarly (item, nQueued.GetValue ()))
181  {
182  if (!m_useEcn || m_dropProb >= m_markEcnTh || !Mark (item, UNFORCED_MARK))
183  {
184  // Early probability drop: proactive
186  m_accuProb = 0;
187  return false;
188  }
189  }
190 
191  // No drop
192  bool retval = GetInternalQueue (0)->Enqueue (item);
193 
194  // If the queue is over a certain threshold, Turn ON PIE
196  {
197  m_active = true;
198  m_qDelayOld = Time (Seconds (0));
199  m_dropProb = 0;
200  m_inMeasurement = true;
201  m_dqCount = 0;
202  m_avgDqRate = 0;
204  m_accuProb = 0;
206  }
207 
208  // If queue has been Idle for a while, Turn OFF PIE
209  // Reset Counters when accessing the queue after some idle period if PIE was active before
211  {
212  m_active = false;
213  m_inMeasurement = false ;
214  }
215 
216  // If Queue::Enqueue fails, QueueDisc::DropBeforeEnqueue is called by the
217  // internal queue because QueueDisc::AddInternalQueue sets the trace callback
218 
219  NS_LOG_LOGIC ("\t bytesInQueue " << GetInternalQueue (0)->GetNBytes ());
220  NS_LOG_LOGIC ("\t packetsInQueue " << GetInternalQueue (0)->GetNPackets ());
221 
222  return retval;
223 }
224 
225 void
227 {
228  // Initially queue is empty so variables are initialize to zero except m_dqCount
229  m_inMeasurement = false;
231  m_dropProb = 0;
232  m_avgDqRate = 0.0;
233  m_dqStart = 0;
235  m_qDelayOld = Time (Seconds (0));
236  m_accuProb = 0.0;
237  m_active = false;
238 }
239 
240 bool PieQueueDisc::DropEarly (Ptr<QueueDiscItem> item, uint32_t qSize)
241 {
242  NS_LOG_FUNCTION (this << item << qSize);
243  if (m_burstAllowance.GetSeconds () > 0)
244  {
245  // If there is still burst_allowance left, skip random early drop.
246  return false;
247  }
248 
249  if (m_burstState == NO_BURST)
250  {
253  }
254 
255  double p = m_dropProb;
256 
257  uint32_t packetSize = item->GetSize ();
258 
259  if (GetMaxSize ().GetUnit () == QueueSizeUnit::BYTES)
260  {
261  p = p * packetSize / m_meanPktSize;
262  }
263 
264  // Safeguard PIE to be work conserving (Section 4.1 of RFC 8033)
265  if ((m_qDelayOld.GetSeconds () < (0.5 * m_qDelayRef.GetSeconds ())) && (m_dropProb < 0.2))
266  {
267  return false;
268  }
269  else if (GetMaxSize ().GetUnit () == QueueSizeUnit::BYTES && qSize <= 2 * m_meanPktSize)
270  {
271  return false;
272  }
273  else if (GetMaxSize ().GetUnit () == QueueSizeUnit::PACKETS && qSize <= 2)
274  {
275  return false;
276  }
277 
279  {
280  if (m_dropProb == 0)
281  {
282  m_accuProb = 0;
283  }
285  if (m_accuProb < 0.85)
286  {
287  return false;
288  }
289  else if (m_accuProb >= 8.5)
290  {
291  return true;
292  }
293  }
294 
295  double u = m_uv->GetValue ();
296  if (u > p)
297  {
298  return false;
299  }
300 
301  return true;
302 }
303 
305 {
306  NS_LOG_FUNCTION (this);
307  Time qDelay;
308  double p = 0.0;
309  bool missingInitFlag = false;
310 
312  {
313  if (m_avgDqRate > 0)
314  {
315  qDelay = Time (Seconds (GetInternalQueue (0)->GetNBytes () / m_avgDqRate));
316  }
317  else
318  {
319  qDelay = Time (Seconds (0));
320  missingInitFlag = true;
321  }
322  m_qDelay = qDelay;
323  }
324  else
325  {
326  qDelay = m_qDelay;
327  }
328  NS_LOG_DEBUG ("Queue delay while calculating probability: " << qDelay.GetMilliSeconds () << "ms");
329 
330  if (m_burstAllowance.GetSeconds () > 0)
331  {
332  m_dropProb = 0;
333  }
334  else
335  {
336  p = m_a * (qDelay.GetSeconds () - m_qDelayRef.GetSeconds ()) + m_b * (qDelay.GetSeconds () - m_qDelayOld.GetSeconds ());
337  if (m_dropProb < 0.000001)
338  {
339  p /= 2048;
340  }
341  else if (m_dropProb < 0.00001)
342  {
343  p /= 512;
344  }
345  else if (m_dropProb < 0.0001)
346  {
347  p /= 128;
348  }
349  else if (m_dropProb < 0.001)
350  {
351  p /= 32;
352  }
353  else if (m_dropProb < 0.01)
354  {
355  p /= 8;
356  }
357  else if (m_dropProb < 0.1)
358  {
359  p /= 2;
360  }
361  else
362  {
363  // The pseudocode in Section 4.2 of RFC 8033 suggests to use this for
364  // assignment of p, but this assignment causes build failure on Mac OS
365  // p = p;
366  }
367 
368  // Cap Drop Adjustment (Section 5.5 of RFC 8033)
369  if (m_isCapDropAdjustment && (m_dropProb >= 0.1) && (p > 0.02))
370  {
371  p = 0.02;
372  }
373  }
374 
375  p += m_dropProb;
376 
377  // For non-linear drop in prob
378  // Decay the drop probability exponentially (Section 4.2 of RFC 8033)
379  if (qDelay.GetSeconds () == 0 && m_qDelayOld.GetSeconds () == 0)
380  {
381  p *= 0.98;
382  }
383 
384  // bound the drop probability (Section 4.2 of RFC 8033)
385  if (p < 0)
386  {
387  m_dropProb = 0;
388  }
389  else if (p > 1)
390  {
391  m_dropProb = 1;
392  }
393  else
394  {
395  m_dropProb = p;
396  }
397 
398  // Section 4.4 #2
400  {
401  m_burstAllowance = Time (Seconds (0));
402  }
403  else
404  {
406  }
407 
408  uint32_t burstResetLimit = static_cast<uint32_t>(BURST_RESET_TIMEOUT / m_tUpdate.GetSeconds ());
409  if ( (qDelay.GetSeconds () < 0.5 * m_qDelayRef.GetSeconds ()) && (m_qDelayOld.GetSeconds () < (0.5 * m_qDelayRef.GetSeconds ())) && (m_dropProb == 0) && !missingInitFlag )
410  {
412  m_avgDqRate = 0.0;
413  }
414  if ( (qDelay.GetSeconds () < 0.5 * m_qDelayRef.GetSeconds ()) && (m_qDelayOld.GetSeconds () < (0.5 * m_qDelayRef.GetSeconds ())) && (m_dropProb == 0) && (m_burstAllowance.GetSeconds () == 0))
415  {
417  {
419  m_burstReset = 0;
420  }
421  else if (m_burstState == IN_BURST)
422  {
423  m_burstReset++;
424  if (m_burstReset > burstResetLimit)
425  {
426  m_burstReset = 0;
428  }
429  }
430  }
431  else if (m_burstState == IN_BURST)
432  {
433  m_burstReset = 0;
434  }
435 
436  m_qDelayOld = qDelay;
438 }
439 
442 {
443  NS_LOG_FUNCTION (this);
444 
445  if (GetInternalQueue (0)->IsEmpty ())
446  {
447  NS_LOG_LOGIC ("Queue empty");
448  return 0;
449  }
450 
451  Ptr<QueueDiscItem> item = GetInternalQueue (0)->Dequeue ();
452  double now = Simulator::Now ().GetSeconds ();
453  uint32_t pktSize = item->GetSize ();
454 
455  // if not in a measurement cycle and the queue has built up to dq_threshold,
456  // start the measurement cycle
458  {
459  if ( (GetInternalQueue (0)->GetNBytes () >= m_dqThreshold) && (!m_inMeasurement) )
460  {
461  m_dqStart = now;
462  m_dqCount = 0;
463  m_inMeasurement = true;
464  }
465 
466  if (m_inMeasurement)
467  {
468  m_dqCount += pktSize;
469 
470  // done with a measurement cycle
471  if (m_dqCount >= m_dqThreshold)
472  {
473 
474  double tmp = now - m_dqStart;
475 
476  if (tmp > 0)
477  {
478  if (m_avgDqRate == 0)
479  {
480  m_avgDqRate = m_dqCount / tmp;
481  }
482  else
483  {
484  m_avgDqRate = (0.5 * m_avgDqRate) + (0.5 * (m_dqCount / tmp));
485  }
486  }
487  NS_LOG_DEBUG ("Average Dequeue Rate after Dequeue: " << m_avgDqRate);
488 
489  // restart a measurement cycle if there is enough data
491  {
492  m_dqStart = now;
493  m_dqCount = 0;
494  m_inMeasurement = true;
495  }
496  else
497  {
498  m_dqCount = 0;
499  m_inMeasurement = false;
500  }
501  }
502  }
503  }
504  else
505  {
506  m_qDelay = Time (Seconds (now - item->GetTimeStamp ().GetSeconds ()));
507 
508  if (GetInternalQueue (0)->GetNBytes () == 0)
509  {
510  m_qDelay = Time (Seconds (0));
511  }
512  }
513  return item;
514 }
515 
516 bool
518 {
519  NS_LOG_FUNCTION (this);
520  if (GetNQueueDiscClasses () > 0)
521  {
522  NS_LOG_ERROR ("PieQueueDisc cannot have classes");
523  return false;
524  }
525 
526  if (GetNPacketFilters () > 0)
527  {
528  NS_LOG_ERROR ("PieQueueDisc cannot have packet filters");
529  return false;
530  }
531 
532  if (GetNInternalQueues () == 0)
533  {
534  // add a DropTail queue
536  ("MaxSize", QueueSizeValue (GetMaxSize ())));
537  }
538 
539  if (GetNInternalQueues () != 1)
540  {
541  NS_LOG_ERROR ("PieQueueDisc needs 1 internal queue");
542  return false;
543  }
544 
545  return true;
546 }
547 
548 } //namespace ns3
static EventId Schedule(Time const &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
Definition: simulator.h:557
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:103
Time m_tUpdate
Time period after which CalculateP () is called.
uint32_t GetNPackets(void) const
Get the number of packets stored by the queue disc.
Definition: queue-disc.cc:440
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
void SetStream(int64_t stream)
Specifies the stream number for the RngStream.
static constexpr const char * UNFORCED_MARK
Early probability marks: proactive.
AttributeValue implementation for Boolean.
Definition: boolean.h:36
Class for representing queue sizes.
Definition: queue-size.h:94
void DropBeforeEnqueue(Ptr< const QueueDiscItem > item, const char *reason)
Perform the actions required when the queue disc is notified of a packet dropped before enqueue...
Definition: queue-disc.cc:729
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:45
double m_avgDqRate
Time averaged dequeue rate.
Time m_maxBurst
Maximum burst allowed before random early dropping kicks in.
uint32_t GetValue() const
Get the underlying value.
Definition: queue-size.cc:175
double m_markEcnTh
ECN marking threshold (default 10% as suggested in RFC 8033)
static const uint32_t packetSize
double m_a
Parameter to pie controller.
bool Mark(Ptr< QueueDiscItem > item, const char *reason)
Marks the given packet and, if successful, updates the counters associated with the given reason...
Definition: queue-disc.cc:818
QueueSize GetCurrentSize(void)
Get the current size of the queue disc in bytes, if operating in bytes mode, or packets, otherwise.
Definition: queue-disc.cc:523
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Definition: boolean.h:85
double GetSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:379
Time m_activeThreshold
Threshold for activating PIE (disabled by default)
static constexpr const char * FORCED_DROP
Drops due to queue limit: reactive.
virtual void InitializeParams(void)
Initialize the queue parameters.
bool m_active
Indicates whether PIE is in active state or not.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1286
uint32_t GetNBytes(void) const
Get the amount of bytes stored by the queue disc.
Definition: queue-disc.cc:447
uint32_t m_burstReset
Used to reset value of burst allowance.
static constexpr const char * UNFORCED_DROP
Early probability drops: proactive.
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition: nstime.h:802
QueueDisc is an abstract base class providing the interface and implementing the operations common to...
Definition: queue-disc.h:181
Implements PIE Active Queue Management discipline.
double m_accuProb
Accumulated drop probability.
Time m_qDelayRef
Desired queue delay.
double m_dropProb
Variable used in calculation of drop probability.
uint32_t m_meanPktSize
Average packet size in bytes.
static Time Max()
Maximum representable Time Not to be confused with Max(Time,Time).
Definition: nstime.h:282
void AddInternalQueue(Ptr< InternalQueue > queue)
Add an internal queue to the tail of the list of queues.
Definition: queue-disc.cc:581
Time GetQueueDelay(void)
Get queue delay.
virtual bool CheckConfig(void)
Check whether the current configuration is correct.
AttributeValue implementation for Time.
Definition: nstime.h:1342
Ptr< InternalQueue > GetInternalQueue(std::size_t i) const
Get the i-th internal queue.
Definition: queue-disc.cc:601
Hold an unsigned integer type.
Definition: uinteger.h:44
Use number of packets for queue size.
Definition: queue-size.h:44
Time m_sUpdate
Start time of the update timer.
bool m_useDqRateEstimator
Enable/Disable usage of dequeue rate estimator for queue delay calculation.
uint32_t m_dqThreshold
Minimum queue size in bytes before dequeue rate is measured.
#define BURST_RESET_TIMEOUT
Ptr< const AttributeAccessor > MakeQueueSizeAccessor(T1 a1)
Definition: queue-size.h:221
virtual void DoDispose(void)
Dispose of the object.
Definition: queue-disc.cc:383
Time m_qDelayOld
Old value of queue delay.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition: log.h:289
double m_dqStart
Start timestamp of current measurement cycle.
bool DropEarly(Ptr< QueueDiscItem > item, uint32_t qSize)
Check if a packet needs to be dropped due to probability drop.
virtual void DoDispose(void)
Dispose of the object.
Introspection did not find any typical Config paths.
Ptr< const AttributeChecker > MakeQueueSizeChecker(void)
Definition: queue-size.cc:29
Ptr< T > CreateObjectWithAttributes(Args... args)
Allocate an Object on the heap and initialize with a set of attributes.
void CalculateP()
Periodically update the drop probability based on the delay samples: not only the current delay sampl...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::size_t GetNQueueDiscClasses(void) const
Get the number of queue disc classes.
Definition: queue-disc.cc:669
double GetValue(double min, double max)
Get the next random value, as a double in the specified range .
EventId m_rtrsEvent
Event used to decide the decision of interval of drop probability calculation.
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Definition: nstime.h:1343
static Time Now(void)
Return the current simulation virtual time.
Definition: simulator.cc:195
bool m_useDerandomization
Enable Derandomization feature mentioned in RFC 8033.
Ptr< UniformRandomVariable > m_uv
Rng stream.
PieQueueDisc()
PieQueueDisc Constructor.
QueueSize GetMaxSize(void) const
Get the maximum size of the queue disc.
Definition: queue-disc.cc:454
QueueSizeUnit GetUnit() const
Get the underlying unit.
Definition: queue-size.cc:169
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Definition: double.h:42
virtual Ptr< QueueDiscItem > DoDequeue(void)
This function actually extracts a packet from the queue disc.
QueueDiscSizePolicy
Enumeration of the available policies to handle the queue disc size.
Definition: queue-disc.h:103
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
Used by queue discs with single internal queue.
Definition: queue-disc.h:105
Time m_qDelay
Current value of queue delay.
static TypeId GetTypeId(void)
Get the type ID.
int64_t GetMilliSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:383
std::size_t GetNPacketFilters(void) const
Get the number of packet filters.
Definition: queue-disc.cc:628
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:273
BurstStateT m_burstState
Used to determine the current state of burst.
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1278
Ptr< const AttributeChecker > MakeBooleanChecker(void)
Definition: boolean.cc:121
Time m_burstAllowance
Current max burst value in seconds that is allowed before random drops kick in.
bool SetMaxSize(QueueSize size)
Set the maximum size of the queue disc.
Definition: queue-disc.cc:482
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::Cancel method.
Definition: event-id.cc:53
virtual ~PieQueueDisc()
PieQueueDisc Destructor.
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
Definition: time.cc:472
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
Definition: log.h:257
virtual bool DoEnqueue(Ptr< QueueDiscItem > item)
This function actually enqueues a packet into the queue disc.
uint32_t pktSize
packet size used for the simulation (in bytes)
Definition: wifi-bianchi.cc:83
This class can be used to hold variables of floating point type such as &#39;double&#39; or &#39;float&#39;...
Definition: double.h:41
double m_b
Parameter to pie controller.
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Definition: uinteger.h:45
Use number of bytes for queue size.
Definition: queue-size.h:45
uint64_t m_dqCount
Number of bytes departed since current measurement cycle starts.
a unique identifier for an interface.
Definition: type-id.h:58
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:923
static const uint64_t DQCOUNT_INVALID
Invalid dqCount value.
bool m_useEcn
Enable ECN Marking functionality.
bool m_inMeasurement
Indicates whether we are in a measurement cycle.
bool m_isCapDropAdjustment
Enable/Disable Cap Drop Adjustment feature mentioned in RFC 8033.
std::size_t GetNInternalQueues(void) const
Get the number of internal queues.
Definition: queue-disc.cc:608