A RED packet queue disc. More...
#include "red-queue-disc.h"
Classes | |
struct | Stats |
Stats. More... | |
Public Types | |
enum | { DTYPE_NONE, DTYPE_FORCED, DTYPE_UNFORCED } |
Drop types. More... | |
![]() | |
enum | WakeMode { WAKE_ROOT = 0x00, WAKE_CHILD = 0x01 } |
Used to determine whether the queue disc itself or its children must be activated when a netdevice wakes a transmission queue. More... | |
Public Member Functions | |
RedQueueDisc () | |
RedQueueDisc Constructor. More... | |
virtual | ~RedQueueDisc () |
Destructor. More... | |
int64_t | AssignStreams (int64_t stream) |
Assign a fixed random variable stream number to the random variables used by this model. More... | |
double | GetAredAlpha (void) |
Get the alpha value to adapt m_curMaxP. More... | |
double | GetAredBeta (void) |
Get the beta value to adapt m_curMaxP. More... | |
Queue::QueueMode | GetMode (void) |
Get the encapsulation mode of this queue. More... | |
uint32_t | GetQueueSize (void) |
Get the current value of the queue in bytes or packets. More... | |
Stats | GetStats () |
Get the RED statistics after running. More... | |
void | SetAredAlpha (double alpha) |
Set the alpha value to adapt m_curMaxP. More... | |
void | SetAredBeta (double beta) |
Set the beta value to adapt m_curMaxP. More... | |
void | SetMode (Queue::QueueMode mode) |
Set the operating mode of this queue. More... | |
void | SetQueueLimit (uint32_t lim) |
Set the limit of the queue. More... | |
void | SetTh (double minTh, double maxTh) |
Set the thresh limits of RED. More... | |
![]() | |
QueueDisc () | |
void | AddInternalQueue (Ptr< Queue > queue) |
Add an internal queue to the tail of the list of queues. More... | |
void | AddPacketFilter (Ptr< PacketFilter > filter) |
Add a packet filter to the tail of the list of filters used to classify packets. More... | |
void | AddQueueDiscClass (Ptr< QueueDiscClass > qdClass) |
Add a queue disc class to the tail of the list of classes. More... | |
int32_t | Classify (Ptr< QueueDiscItem > item) |
Classify a packet by calling the packet filters, one at a time, until either a filter able to classify the packet is found or all the filters have been processed. More... | |
Ptr< QueueDiscItem > | Dequeue (void) |
Request the queue discipline to extract a packet. More... | |
bool | Enqueue (Ptr< QueueDiscItem > item) |
Pass a packet to store to the queue discipline. More... | |
Ptr< Queue > | GetInternalQueue (uint32_t i) const |
Get the i-th internal queue. More... | |
uint32_t | GetNBytes (void) const |
Get the amount of bytes stored by the queue disc. More... | |
Ptr< NetDevice > | GetNetDevice (void) const |
Get the NetDevice on which this queue discipline is installed. More... | |
uint32_t | GetNInternalQueues (void) const |
Get the number of internal queues. More... | |
uint32_t | GetNPacketFilters (void) const |
Get the number of packet filters. More... | |
uint32_t | GetNPackets (void) const |
Get the number of packets stored by the queue disc. More... | |
uint32_t | GetNQueueDiscClasses (void) const |
Get the number of queue disc classes. More... | |
Ptr< PacketFilter > | GetPacketFilter (uint32_t i) const |
Get the i-th packet filter. More... | |
Ptr< QueueDiscClass > | GetQueueDiscClass (uint32_t i) const |
Get the i-th queue disc class. More... | |
virtual uint32_t | GetQuota (void) const |
Get the maximum number of dequeue operations following a packet enqueue. More... | |
uint32_t | GetTotalDroppedBytes (void) const |
Get the total amount of dropped bytes. More... | |
uint32_t | GetTotalDroppedPackets (void) const |
Get the total number of dropped packets. More... | |
uint32_t | GetTotalReceivedBytes (void) const |
Get the total amount of received bytes. More... | |
uint32_t | GetTotalReceivedPackets (void) const |
Get the total number of received packets. More... | |
uint32_t | GetTotalRequeuedBytes (void) const |
Get the total amount of requeued bytes. More... | |
uint32_t | GetTotalRequeuedPackets (void) const |
Get the total number of requeued packets. More... | |
WakeMode | GetWakeMode (void) |
When setting up the wake callbacks on the netdevice queues, it is necessary to determine which queue disc (the root queue disc or one of its children) should be activated when the netdevice wakes one of its transmission queues. More... | |
Ptr< const QueueDiscItem > | Peek (void) const |
Get a copy of the next packet the queue discipline will extract, without actually extracting the packet. More... | |
void | Run (void) |
Modelled after the Linux function __qdisc_run (net/sched/sch_generic.c) Dequeues multiple packets, until a quota is exceeded or sending a packet to the device failed. More... | |
void | SetNetDevice (Ptr< NetDevice > device) |
Set the NetDevice on which this queue discipline is installed. More... | |
virtual void | SetQuota (const uint32_t quota) |
Set the maximum number of dequeue operations following a packet enqueue. More... | |
![]() | |
Object () | |
Constructor. More... | |
virtual | ~Object () |
Destructor. More... | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. More... | |
void | Dispose (void) |
Dispose of this Object. More... | |
AggregateIterator | GetAggregateIterator (void) const |
Get an iterator to the Objects aggregated to this one. More... | |
virtual TypeId | GetInstanceTypeId (void) const |
Implement the GetInstanceTypeId method defined in ObjectBase. More... | |
template<typename T > | |
Ptr< T > | GetObject (void) const |
Get a pointer to the requested aggregated Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. More... | |
void | Initialize (void) |
Invoke DoInitialize on all Objects aggregated to this one. More... | |
![]() | |
SimpleRefCount () | |
Constructor. More... | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment. More... | |
void | Ref (void) const |
Increment the reference count. More... | |
void | Unref (void) const |
Decrement the reference count. More... | |
![]() | |
virtual | ~ObjectBase () |
Virtual destructor. More... | |
void | GetAttribute (std::string name, AttributeValue &value) const |
Get the value of an attribute, raising fatal errors if unsuccessful. More... | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising erros. More... | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. More... | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. More... | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. More... | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. More... | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. More... | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Register this type. More... | |
![]() | |
static void | Cleanup (void) |
Noop. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Protected Member Functions | |
virtual void | DoDispose (void) |
Dispose of the object. More... | |
![]() | |
virtual void | DoInitialize (void) |
Check whether the configuration is correct and initialize parameters. More... | |
void | Drop (Ptr< QueueDiscItem > item) |
Drop a packet. More... | |
![]() | |
Object (const Object &o) | |
Copy an Object. More... | |
virtual void | NotifyNewAggregate (void) |
Notify all Objects aggregated to this one of a new Object being aggregated. More... | |
![]() | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. More... | |
virtual void | NotifyConstructionCompleted (void) |
Notifier called once the ObjectBase is fully constructed. More... | |
Private Member Functions | |
double | CalculatePNew (double qAvg, double, bool gentle, double vA, double vB, double vC, double vD, double maxP) |
Returns a probability using these function parameters for the DropEarly function. More... | |
virtual bool | CheckConfig (void) |
Check whether the current configuration is correct. More... | |
virtual Ptr< QueueDiscItem > | DoDequeue (void) |
This function actually extracts a packet from the queue disc. More... | |
virtual bool | DoEnqueue (Ptr< QueueDiscItem > item) |
This function actually enqueues a packet into the queue disc. More... | |
virtual Ptr< const QueueDiscItem > | DoPeek (void) const |
This function returns a copy of the next packet the queue disc will extract. More... | |
uint32_t | DropEarly (Ptr< QueueDiscItem > item, uint32_t qSize) |
Check if a packet needs to be dropped due to probability mark. More... | |
double | Estimator (uint32_t nQueued, uint32_t m, double qAvg, double qW) |
Compute the average queue size. More... | |
virtual void | InitializeParams (void) |
Initialize the queue parameters. More... | |
double | ModifyP (double p, uint32_t count, uint32_t countBytes, uint32_t meanPktSize, bool wait, uint32_t size) |
Returns a probability using these function parameters for the DropEarly function. More... | |
void | UpdateMaxP (double newAve, Time now) |
Update m_curMaxP. More... | |
Private Attributes | |
double | m_alpha |
Increment parameter for m_curMaxP in ARED. More... | |
double | m_beta |
Decrement parameter for m_curMaxP in ARED. More... | |
double | m_bottom |
Lower bound for m_curMaxP in ARED. More... | |
uint32_t | m_cautious |
0 for default RED 1 experimental (see red-queue.cc) 2 experimental (see red-queue.cc) 3 use Idle packet size in the ptc More... | |
uint32_t | m_count |
Number of packets since last random number generation. More... | |
uint32_t | m_countBytes |
Number of bytes since last drop. More... | |
double | m_curMaxP |
Current max_p. More... | |
uint32_t | m_idle |
0/1 idle status More... | |
uint32_t | m_idlePktSize |
Avg pkt size used during idle times. More... | |
Time | m_idleTime |
Start of current idle period. More... | |
Time | m_interval |
Time interval to update m_curMaxP. More... | |
bool | m_isAdaptMaxP |
True to adapt m_curMaxP. More... | |
bool | m_isARED |
True to enable Adaptive RED. More... | |
bool | m_isGentle |
True to increases dropping prob. More... | |
bool | m_isNs1Compat |
Ns-1 compatibility. More... | |
bool | m_isWait |
True for waiting between dropped packets. More... | |
Time | m_lastSet |
Last time m_curMaxP was updated. More... | |
DataRate | m_linkBandwidth |
Link bandwidth. More... | |
Time | m_linkDelay |
Link delay. More... | |
double | m_lInterm |
The max probability of dropping a packet. More... | |
double | m_maxTh |
Max avg length threshold (bytes), should be >= 2*minTh. More... | |
uint32_t | m_meanPktSize |
Avg pkt size. More... | |
double | m_minTh |
Min avg length threshold (bytes) More... | |
Queue::QueueMode | m_mode |
Mode (Bytes or packets) More... | |
uint32_t | m_old |
0 when average queue first exceeds threshold More... | |
double | m_ptc |
packet time constant in packets/second More... | |
double | m_qAvg |
Average queue length. More... | |
uint32_t | m_queueLimit |
Queue limit in bytes / packets. More... | |
double | m_qW |
Queue weight given to cur queue size sample. More... | |
Time | m_rtt |
Rtt to be considered while automatically setting m_bottom in ARED. More... | |
Stats | m_stats |
RED statistics. More... | |
Time | m_targetDelay |
Target average queuing delay in ARED. More... | |
double | m_top |
Upper bound for m_curMaxP in ARED. More... | |
Ptr< UniformRandomVariable > | m_uv |
rng stream More... | |
double | m_vA |
1.0 / (m_maxTh - m_minTh) More... | |
double | m_vB |
-m_minTh / (m_maxTh - m_minTh) More... | |
double | m_vC |
(1.0 - m_curMaxP) / m_maxTh - used in "gentle" mode More... | |
double | m_vD |
2.0 * m_curMaxP - 1.0 - used in "gentle" mode More... | |
double | m_vProb |
Prob. More... | |
double | m_vProb1 |
Prob. More... | |
Additional Inherited Members | |
![]() | |
static TypeId | GetObjectIid (void) |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
A RED packet queue disc.
Introspection did not find any typical Config paths.
No TraceSources are defined for this type.
Size of this type is 552 bytes (on a 64-bit architecture).
Definition at line 81 of file red-queue-disc.h.
anonymous enum |
Drop types.
Enumerator | |
---|---|
DTYPE_NONE |
Ok, no drop. |
DTYPE_FORCED |
A "forced" drop. |
DTYPE_UNFORCED |
An "unforced" (random) drop. |
Definition at line 116 of file red-queue-disc.h.
ns3::RedQueueDisc::RedQueueDisc | ( | ) |
RedQueueDisc Constructor.
Create a RED queue disc
Definition at line 201 of file red-queue-disc.cc.
References m_uv, and NS_LOG_FUNCTION.
|
virtual |
Destructor.
Destructor
Definition at line 208 of file red-queue-disc.cc.
References NS_LOG_FUNCTION.
int64_t ns3::RedQueueDisc::AssignStreams | ( | int64_t | stream | ) |
Assign a fixed random variable stream number to the random variables used by this model.
Return the number of streams (possibly zero) that have been assigned.
stream | first stream index to use |
Definition at line 297 of file red-queue-disc.cc.
References m_uv, NS_LOG_FUNCTION, and ns3::RandomVariableStream::SetStream().
|
private |
Returns a probability using these function parameters for the DropEarly function.
qAvg | Average queue length |
maxTh | Max avg length threshold |
gentle | "gentle" algorithm |
vA | vA |
vB | vB |
vC | vC |
vD | vD |
maxP | max_p |
Definition at line 654 of file red-queue-disc.cc.
References NS_LOG_FUNCTION.
Referenced by DropEarly().
|
privatevirtual |
Check whether the current configuration is correct.
Default objects (such as internal queues) might be created by this method to ensure the configuration is correct.
Implements ns3::QueueDisc.
Definition at line 810 of file red-queue-disc.cc.
References ns3::QueueDisc::AddInternalQueue(), ns3::QueueDisc::GetInternalQueue(), GetMode(), ns3::QueueDisc::GetNInternalQueues(), ns3::QueueDisc::GetNPacketFilters(), ns3::QueueDisc::GetNQueueDiscClasses(), m_mode, m_queueLimit, NS_LOG_ERROR, NS_LOG_FUNCTION, ns3::Queue::QUEUE_MODE_BYTES, and ns3::Queue::QUEUE_MODE_PACKETS.
|
privatevirtual |
This function actually extracts a packet from the queue disc.
Implements ns3::QueueDisc.
Definition at line 765 of file red-queue-disc.cc.
References ns3::QueueDisc::GetInternalQueue(), ns3::QueueDisc::GetNBytes(), ns3::QueueDisc::GetNPackets(), m_idle, m_idleTime, ns3::Simulator::Now(), NS_LOG_FUNCTION, and NS_LOG_LOGIC.
|
protectedvirtual |
Dispose of the object.
Reimplemented from ns3::QueueDisc.
Definition at line 214 of file red-queue-disc.cc.
References ns3::QueueDisc::DoDispose(), m_uv, and NS_LOG_FUNCTION.
|
privatevirtual |
This function actually enqueues a packet into the queue disc.
item | item to enqueue |
Implements ns3::QueueDisc.
Definition at line 305 of file red-queue-disc.cc.
References ns3::QueueDisc::Drop(), DropEarly(), DTYPE_FORCED, DTYPE_NONE, DTYPE_UNFORCED, Estimator(), ns3::RedQueueDisc::Stats::forcedDrop, ns3::QueueDisc::GetInternalQueue(), GetMode(), ns3::QueueDisc::GetNBytes(), ns3::QueueDisc::GetNPackets(), m_cautious, m_count, m_countBytes, m_idle, m_idlePktSize, m_idleTime, m_isGentle, m_isNs1Compat, m_maxTh, m_meanPktSize, m_minTh, m_old, m_ptc, m_qAvg, m_queueLimit, m_qW, m_stats, m_vProb, ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::RedQueueDisc::Stats::qLimDrop, ns3::Queue::QUEUE_MODE_BYTES, ns3::Queue::QUEUE_MODE_PACKETS, and ns3::RedQueueDisc::Stats::unforcedDrop.
|
privatevirtual |
This function returns a copy of the next packet the queue disc will extract.
Implements ns3::QueueDisc.
Definition at line 792 of file red-queue-disc.cc.
References ns3::QueueDisc::GetInternalQueue(), ns3::QueueDisc::GetNBytes(), ns3::QueueDisc::GetNPackets(), NS_LOG_FUNCTION, and NS_LOG_LOGIC.
|
private |
Check if a packet needs to be dropped due to probability mark.
item | queue item |
qSize | queue size |
Definition at line 593 of file red-queue-disc.cc.
References CalculatePNew(), ns3::UniformRandomVariable::GetValue(), m_cautious, m_count, m_countBytes, m_curMaxP, m_isGentle, m_isWait, m_maxTh, m_meanPktSize, m_ptc, m_qAvg, m_qW, m_uv, m_vA, m_vB, m_vC, m_vD, m_vProb, m_vProb1, ModifyP(), NS_LOG_FUNCTION, and NS_LOG_LOGIC.
Referenced by DoEnqueue().
|
private |
Compute the average queue size.
nQueued | number of queued packets |
m | simulated number of packets arrival during idle period |
qAvg | average queue size |
qW | queue weight given to cur q size sample |
Definition at line 575 of file red-queue-disc.cc.
References m_interval, m_isAdaptMaxP, m_lastSet, ns3::Simulator::Now(), NS_LOG_FUNCTION, and UpdateMaxP().
Referenced by DoEnqueue().
double ns3::RedQueueDisc::GetAredAlpha | ( | void | ) |
Get the alpha value to adapt m_curMaxP.
Definition at line 248 of file red-queue-disc.cc.
References m_alpha, and NS_LOG_FUNCTION.
double ns3::RedQueueDisc::GetAredBeta | ( | void | ) |
Get the beta value to adapt m_curMaxP.
Definition at line 267 of file red-queue-disc.cc.
References m_beta, and NS_LOG_FUNCTION.
Queue::QueueMode ns3::RedQueueDisc::GetMode | ( | void | ) |
Get the encapsulation mode of this queue.
Get the encapsulation mode of this queue
Definition at line 229 of file red-queue-disc.cc.
References m_mode, and NS_LOG_FUNCTION.
Referenced by CheckConfig(), DoEnqueue(), GetQueueSize(), InitializeParams(), ModifyP(), AdaptiveRedQueueDiscTestCase::RunAdaptiveRedDiscTest(), AutoRedQueueDiscTestCase::RunAutoRedDiscTest(), and RedQueueDiscTestCase::RunRedTest().
uint32_t ns3::RedQueueDisc::GetQueueSize | ( | void | ) |
Get the current value of the queue in bytes or packets.
Definition at line 747 of file red-queue-disc.cc.
References ns3::QueueDisc::GetInternalQueue(), GetMode(), NS_ABORT_MSG, NS_LOG_FUNCTION, ns3::Queue::QUEUE_MODE_BYTES, and ns3::Queue::QUEUE_MODE_PACKETS.
Referenced by RedQueueDiscTestCase::RunRedTest().
RedQueueDisc::Stats ns3::RedQueueDisc::GetStats | ( | ) |
Get the RED statistics after running.
Definition at line 290 of file red-queue-disc.cc.
References m_stats, and NS_LOG_FUNCTION.
|
static |
Get the type ID.
Definition at line 74 of file red-queue-disc.cc.
References m_bottom, m_idlePktSize, m_interval, m_isAdaptMaxP, m_isARED, m_isGentle, m_isNs1Compat, m_isWait, m_lastSet, m_linkBandwidth, m_linkDelay, m_lInterm, m_maxTh, m_meanPktSize, m_minTh, m_qW, m_rtt, m_targetDelay, m_top, ns3::MakeBooleanAccessor(), ns3::MakeBooleanChecker(), ns3::MakeDataRateAccessor(), ns3::MakeDataRateChecker(), ns3::MakeDoubleAccessor(), ns3::MakeEnumAccessor(), ns3::MakeEnumChecker(), ns3::MakeTimeAccessor(), ns3::MakeTimeChecker(), ns3::MakeUintegerAccessor(), ns3::MilliSeconds(), ns3::Queue::QUEUE_MODE_BYTES, ns3::Queue::QUEUE_MODE_PACKETS, ns3::Seconds(), SetAredAlpha(), SetAredBeta(), SetMode(), ns3::TypeId::SetParent(), and SetQueueLimit().
|
privatevirtual |
Initialize the queue parameters.
Note: if the link bandwidth changes in the course of the simulation, the bandwidth-dependent RED parameters do not change. This should be fixed, but it would require some extra parameters, and didn't seem worth the trouble...
Implements ns3::QueueDisc.
Definition at line 428 of file red-queue-disc.cc.
References ns3::RedQueueDisc::Stats::forcedDrop, ns3::DataRate::GetBitRate(), GetMode(), ns3::Time::GetSeconds(), m_bottom, m_cautious, m_count, m_countBytes, m_curMaxP, m_idle, m_idleTime, m_isAdaptMaxP, m_isARED, m_isGentle, m_isWait, m_linkBandwidth, m_linkDelay, m_lInterm, m_maxTh, m_meanPktSize, m_minTh, m_old, m_ptc, m_qAvg, m_qW, m_rtt, m_stats, m_targetDelay, m_vA, m_vB, m_vC, m_vD, ns3::NanoSeconds(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_INFO, ns3::RedQueueDisc::Stats::qLimDrop, ns3::Queue::QUEUE_MODE_BYTES, and ns3::RedQueueDisc::Stats::unforcedDrop.
|
private |
Returns a probability using these function parameters for the DropEarly function.
p | Prob. of packet drop before "count" |
count | number of packets since last random number generation |
countBytes | number of bytes since last drop |
meanPktSize | Avg pkt size |
wait | True for waiting between dropped packets |
size | packet size |
Definition at line 695 of file red-queue-disc.cc.
References GetMode(), NS_LOG_FUNCTION, and ns3::Queue::QUEUE_MODE_BYTES.
Referenced by DropEarly().
void ns3::RedQueueDisc::SetAredAlpha | ( | double | alpha | ) |
Set the alpha value to adapt m_curMaxP.
alpha | The value of alpha to adapt m_curMaxP. |
Definition at line 236 of file red-queue-disc.cc.
References m_alpha, NS_LOG_FUNCTION, and NS_LOG_WARN.
Referenced by GetTypeId().
void ns3::RedQueueDisc::SetAredBeta | ( | double | beta | ) |
Set the beta value to adapt m_curMaxP.
beta | The value of beta to adapt m_curMaxP. |
Definition at line 255 of file red-queue-disc.cc.
References m_beta, NS_LOG_FUNCTION, and NS_LOG_WARN.
Referenced by GetTypeId().
void ns3::RedQueueDisc::SetMode | ( | Queue::QueueMode | mode | ) |
Set the operating mode of this queue.
Set operating mode
mode | The operating mode of this queue. |
Definition at line 222 of file red-queue-disc.cc.
References m_mode, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::RedQueueDisc::SetQueueLimit | ( | uint32_t | lim | ) |
Set the limit of the queue.
lim | The limit in bytes or packets. |
Definition at line 274 of file red-queue-disc.cc.
References m_queueLimit, and NS_LOG_FUNCTION.
Referenced by GetTypeId(), and RedQueueDiscTestCase::RunRedTest().
void ns3::RedQueueDisc::SetTh | ( | double | minTh, |
double | maxTh | ||
) |
Set the thresh limits of RED.
minTh | Minimum thresh in bytes or packets. |
maxTh | Maximum thresh in bytes or packets. |
Definition at line 281 of file red-queue-disc.cc.
References m_maxTh, m_minTh, NS_ASSERT, and NS_LOG_FUNCTION.
Referenced by RedQueueDiscTestCase::RunRedTest().
|
private |
|
private |
Increment parameter for m_curMaxP in ARED.
Definition at line 295 of file red-queue-disc.h.
Referenced by GetAredAlpha(), SetAredAlpha(), and UpdateMaxP().
|
private |
Decrement parameter for m_curMaxP in ARED.
Definition at line 296 of file red-queue-disc.h.
Referenced by GetAredBeta(), SetAredBeta(), and UpdateMaxP().
|
private |
Lower bound for m_curMaxP in ARED.
Definition at line 294 of file red-queue-disc.h.
Referenced by GetTypeId(), InitializeParams(), and UpdateMaxP().
|
private |
0 for default RED 1 experimental (see red-queue.cc) 2 experimental (see red-queue.cc) 3 use Idle packet size in the ptc
Definition at line 323 of file red-queue-disc.h.
Referenced by DoEnqueue(), DropEarly(), and InitializeParams().
|
private |
Number of packets since last random number generation.
Definition at line 316 of file red-queue-disc.h.
Referenced by DoEnqueue(), DropEarly(), and InitializeParams().
|
private |
Number of bytes since last drop.
Definition at line 311 of file red-queue-disc.h.
Referenced by DoEnqueue(), DropEarly(), and InitializeParams().
|
private |
Current max_p.
Definition at line 308 of file red-queue-disc.h.
Referenced by DropEarly(), InitializeParams(), and UpdateMaxP().
|
private |
0/1 idle status
Definition at line 313 of file red-queue-disc.h.
Referenced by DoDequeue(), DoEnqueue(), and InitializeParams().
|
private |
Avg pkt size used during idle times.
Definition at line 281 of file red-queue-disc.h.
Referenced by DoEnqueue(), and GetTypeId().
|
private |
Start of current idle period.
Definition at line 324 of file red-queue-disc.h.
Referenced by DoDequeue(), DoEnqueue(), and InitializeParams().
|
private |
Time interval to update m_curMaxP.
Definition at line 292 of file red-queue-disc.h.
Referenced by Estimator(), and GetTypeId().
|
private |
True to adapt m_curMaxP.
Definition at line 285 of file red-queue-disc.h.
Referenced by Estimator(), GetTypeId(), and InitializeParams().
|
private |
True to enable Adaptive RED.
Definition at line 284 of file red-queue-disc.h.
Referenced by GetTypeId(), and InitializeParams().
|
private |
True to increases dropping prob.
slowly when ave queue exceeds maxthresh
Definition at line 283 of file red-queue-disc.h.
Referenced by DoEnqueue(), DropEarly(), GetTypeId(), and InitializeParams().
|
private |
Ns-1 compatibility.
Definition at line 298 of file red-queue-disc.h.
Referenced by DoEnqueue(), and GetTypeId().
|
private |
True for waiting between dropped packets.
Definition at line 282 of file red-queue-disc.h.
Referenced by DropEarly(), GetTypeId(), and InitializeParams().
|
private |
Last time m_curMaxP was updated.
Definition at line 309 of file red-queue-disc.h.
Referenced by Estimator(), GetTypeId(), and UpdateMaxP().
|
private |
Link bandwidth.
Definition at line 299 of file red-queue-disc.h.
Referenced by GetTypeId(), and InitializeParams().
|
private |
Link delay.
Definition at line 300 of file red-queue-disc.h.
Referenced by GetTypeId(), and InitializeParams().
|
private |
The max probability of dropping a packet.
Definition at line 290 of file red-queue-disc.h.
Referenced by GetTypeId(), and InitializeParams().
|
private |
Max avg length threshold (bytes), should be >= 2*minTh.
Definition at line 287 of file red-queue-disc.h.
Referenced by DoEnqueue(), DropEarly(), GetTypeId(), InitializeParams(), SetTh(), and UpdateMaxP().
|
private |
Avg pkt size.
Definition at line 280 of file red-queue-disc.h.
Referenced by DoEnqueue(), DropEarly(), GetTypeId(), and InitializeParams().
|
private |
Min avg length threshold (bytes)
Definition at line 286 of file red-queue-disc.h.
Referenced by DoEnqueue(), GetTypeId(), InitializeParams(), SetTh(), and UpdateMaxP().
|
private |
Mode (Bytes or packets)
Definition at line 279 of file red-queue-disc.h.
Referenced by CheckConfig(), GetMode(), and SetMode().
|
private |
0 when average queue first exceeds threshold
Definition at line 312 of file red-queue-disc.h.
Referenced by DoEnqueue(), and InitializeParams().
|
private |
packet time constant in packets/second
Definition at line 314 of file red-queue-disc.h.
Referenced by DoEnqueue(), DropEarly(), and InitializeParams().
|
private |
Average queue length.
Definition at line 315 of file red-queue-disc.h.
Referenced by DoEnqueue(), DropEarly(), and InitializeParams().
|
private |
Queue limit in bytes / packets.
Definition at line 288 of file red-queue-disc.h.
Referenced by CheckConfig(), DoEnqueue(), and SetQueueLimit().
|
private |
Queue weight given to cur queue size sample.
Definition at line 289 of file red-queue-disc.h.
Referenced by DoEnqueue(), DropEarly(), GetTypeId(), and InitializeParams().
|
private |
Rtt to be considered while automatically setting m_bottom in ARED.
Definition at line 297 of file red-queue-disc.h.
Referenced by GetTypeId(), and InitializeParams().
|
private |
RED statistics.
Definition at line 276 of file red-queue-disc.h.
Referenced by DoEnqueue(), GetStats(), and InitializeParams().
|
private |
Target average queuing delay in ARED.
Definition at line 291 of file red-queue-disc.h.
Referenced by GetTypeId(), and InitializeParams().
|
private |
Upper bound for m_curMaxP in ARED.
Definition at line 293 of file red-queue-disc.h.
Referenced by GetTypeId(), and UpdateMaxP().
|
private |
rng stream
Definition at line 326 of file red-queue-disc.h.
Referenced by AssignStreams(), DoDispose(), DropEarly(), and RedQueueDisc().
|
private |
1.0 / (m_maxTh - m_minTh)
Definition at line 304 of file red-queue-disc.h.
Referenced by DropEarly(), and InitializeParams().
|
private |
-m_minTh / (m_maxTh - m_minTh)
Definition at line 305 of file red-queue-disc.h.
Referenced by DropEarly(), and InitializeParams().
|
private |
(1.0 - m_curMaxP) / m_maxTh - used in "gentle" mode
Definition at line 306 of file red-queue-disc.h.
Referenced by DropEarly(), and InitializeParams().
|
private |
2.0 * m_curMaxP - 1.0 - used in "gentle" mode
Definition at line 307 of file red-queue-disc.h.
Referenced by DropEarly(), and InitializeParams().
|
private |
Prob.
of packet drop
Definition at line 310 of file red-queue-disc.h.
Referenced by DoEnqueue(), and DropEarly().
|
private |
Prob.
of packet drop before "count"
Definition at line 303 of file red-queue-disc.h.
Referenced by DropEarly().