EthernetQosRedQueue

Package: inet.linklayer.ethernet.common

EthernetQosRedQueue

compound module

Queue module that gives the PAUSE frames a higher priority, and using Random Early Detection algorithm on data frames, and can be parametrized with an IPacketQueue for serving the data frames.

classifier : like IPacketClassifier

EthernetFrameClassifier: Classifier that forwards Ethernet PAUSE frames to the pauseOut gate, and other frames to the...

IPacketClassifier: This module interface is implemented by packet classifier modules.

Source:
classifier: <default("EthernetFrameClassifier")> like IPacketClassifier {
    parameters:
        @display("p=100,200");
} pauseQueue : like IPacketQueue

DropTailQueue: This module is a limited packet queue which drops packets at the tail of the queue.

IPacketQueue: This module interface is implemented by packet queue modules.

Source:
pauseQueue: <default("DropTailQueue")> like IPacketQueue {
    parameters:
        @display("p=250,100");
} redFilter : RedDropper

This module implements Random Early Detection (RED).

Source:
redFilter: RedDropper {
    @display("p=190,300");
} dataQueue : like IPacketQueue

DropTailQueue: This module is a limited packet queue which drops packets at the tail of the queue.

IPacketQueue: This module interface is implemented by packet queue modules.

Source:
dataQueue: <default("DropTailQueue")> like IPacketQueue {
    parameters:
        @display("p=310,300;q=l2queue");
} scheduler : like IPacketScheduler

PriorityScheduler: This scheduler pulls packets from the first non-empty among its connected packet providers.

IPacketScheduler: This module interface is implemented by packet scheduler modules.

Source:
scheduler: <default("PriorityScheduler")> like IPacketScheduler {
    parameters:
        @display("p=400,200");
}

Usage diagram

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Extends

Name Type Description
CompoundPacketQueueBase compound module

This compound module serves as a base module for complex packet queues formed by combining several queueing components.

Parameters

Name Type Default value Description
displayStringTextFormat string "contains %p pk (%l) pushed %u created %c\n pulled %o removed %r dropped %d"

determines the text that is written on top of the submodule

packetCapacity int -1

maximum number of packets in the queue, no limit by default

dataCapacity int -1b

maximum total length of packets in the queue, no limit by default

dropperClass string ""

determines which packets are dropped when the queue is overloaded, packets are not dropped by default; the parameter must be the name of a C++ class which implements the IPacketDropperFunction C++ interface and is registered via Register_Class

Properties

Name Value Description
display i=block/queue
class CompoundPacketQueueBase
defaultStatistic queueLength:vector

Gates

Name Direction Size Description
in input
out output

Signals

Name Type Unit
packetRemoved inet::Packet
packetPushStarted inet::Packet
packetDropped inet::Packet
packetPushEnded inet::Packet?
packetPulled inet::Packet

Statistics

Name Title Source Record Unit Interpolation Mode
queueBitLength queue bit length warmup(atomic(constant0(localSignal(packetPushEnded)) + sum(packetLength(localSignal(packetPushStarted))) - sum(packetLength(localSignal(packetPulled))) - sum(packetLength(localSignal(packetRemoved))) - sum(packetLength(localSignal(packetDropped))))) last, max, timeavg, vector b sample-hold
queueLength queue length warmup(atomic(constant0(localSignal(packetPushEnded)) + count(localSignal(packetPushStarted)) - count(localSignal(packetPulled)) - count(localSignal(packetRemoved)) - count(localSignal(packetDropped)))) last, max, timeavg, vector pk sample-hold
droppedPacketsQueueOverflow dropped packets: queue overflow packetDropReasonIsQueueOverflow(localSignal(packetDropped)) count pk none
queueingTime queueing times queueingTime(localSignal(packetPulled)) histogram, vector s none
incomingDataRate incoming datarate throughput(localSignal(packetPushStarted)) vector bps linear
flowQueueingTime flow queueing times queueingTime(demuxFlow(localSignal(packetPulled))) histogram, vector s none
incomingPacketLengths incoming packet lengths packetLength(localSignal(packetPushStarted)) sum, histogram, vector b none
flowIncomingDataRate flow specific incoming data rate throughput(flowPacketLength(demuxFlow(localSignal(packetPushStarted)))) vector bps linear
outgoingDataRate outgoing datarate throughput(localSignal(packetPulled)) vector bps linear
outgoingPacketLengths outgoing packet lengths packetLength(localSignal(packetPulled)) sum, histogram, vector b none
droppedPacketLengthsQueueOverflow dropped packet lengths: queue overflow packetLength(packetDropReasonIsQueueOverflow(localSignal(packetDropped))) sum, vector b none
flowOutgoingDataRate flow specific outgoing data rate throughput(flowPacketLength(demuxFlow(localSignal(packetPulled)))) vector bps linear
incomingPackets incoming packets localSignal(packetPushStarted) count pk
outgoingPackets outgoing packets localSignal(packetPulled) count pk

Unassigned submodule parameters

Name Type Default value Description
redFilter.displayStringTextFormat string "dropped %d/%p pk (%k/%l)"

determines the text that is written on top of the submodule

redFilter.backpressure bool false
redFilter.collectionModule string ""
redFilter.wq double 0.002

weight of the current queue length in the averaged queue length, in range [0.0, 1.0]

redFilter.minth double 5

minimum threshold for avg queue length

redFilter.maxth double 50

maximum threshold for avg queue length (=buffer capacity), in range (minth,packetCapacity]

redFilter.maxp double 0.02

maximum value for pbs, in range [0.0, 1.0]

redFilter.pkrate double 150

average packet rate for calculations when queue is empty

redFilter.useEcn bool false

if enabled, packets are marked with ECN if applicable

redFilter.packetCapacity int int(maxth)

packets are dropped if queue length is greater

Source code

//
// Queue module that gives the PAUSE frames a higher priority,
// and using Random Early Detection algorithm on data frames,
// and can be parametrized with an ~IPacketQueue for serving the
// data frames.
//
module EthernetQosRedQueue extends CompoundPacketQueueBase like IPacketQueue
{
    parameters:
        @display("i=block/queue");
    submodules:
        classifier: <default("EthernetFrameClassifier")> like IPacketClassifier {
            parameters:
                @display("p=100,200");
        }
        pauseQueue: <default("DropTailQueue")> like IPacketQueue {
            parameters:
                @display("p=250,100");
        }
        redFilter: RedDropper {
            @display("p=190,300");
        }
        dataQueue: <default("DropTailQueue")> like IPacketQueue {
            parameters:
                @display("p=310,300;q=l2queue");
        }
        scheduler: <default("PriorityScheduler")> like IPacketScheduler {
            parameters:
                @display("p=400,200");
        }
    connections:
        in --> classifier.in;
        classifier.out++ --> pauseQueue.in;
        classifier.out++ --> redFilter.in;
        pauseQueue.out --> scheduler.in++;
        dataQueue.out --> scheduler.in++;
        scheduler.out --> out;
        redFilter.out --> dataQueue.in;
}

File: src/inet/linklayer/ethernet/common/EthernetQosQueue.ned