network: Move RED model, test and examples to the traffic-control module

This move prepares RED to become a queue disc. Building of RED
model, tests and examples is disabled until the conversion is done.
This commit is contained in:
Pasquale Imputato
2016-03-08 10:45:27 -08:00
parent 9e79ad7d45
commit e02e86faa7
9 changed files with 15 additions and 73 deletions

View File

@@ -7,11 +7,10 @@ Queues
============= Subsection (#.#.#)
############# Paragraph (no number)
This section documents a few queue objects, typically associated with
NetDevice models, that are maintained as part of the ``network`` module:
This section documents the queue object, typically associated with
NetDevice models, that is maintained as part of the ``network`` module:
* DropTail
* Random Early Detection
Model Description
*****************
@@ -32,11 +31,13 @@ Design
======
An abstract base class, class Queue, is typically used and subclassed
for specific scheduling and drop policies. Common operations
include:
for specific scheduling and drop policies. A class QueueItem is introduced
to model the items stored in a queue. The base class QueueItem only contains
a pointer to a packet. Subclasses may be defined to store additional information.
Common operations provided by the base class Queue include:
* ``bool Enqueue (Ptr<Packet> p)``: Enqueue a packet
* ``Ptr<Packet> Dequeue (void)``: Dequeue a packet
* ``bool Enqueue (Ptr<QueueItem> item)``: Enqueue a packet
* ``Ptr<QueueItem> Dequeue (void)``: Dequeue a packet
* ``uint32_t GetNPackets (void)``: Get the queue depth, in packets
* ``uint32_t GetNBytes (void)``: Get the queue depth, in packets
@@ -54,27 +55,6 @@ DropTail
This is a basic first-in-first-out (FIFO) queue that performs a tail drop
when the queue is full.
Random Early Detection
######################
Random Early Detection (RED) is a queue variant that aims to provide
early signals to transport protocol congestion control (e.g. TCP) that
congestion is imminent, so that they back off their rate gracefully
rather than with a bunch of tail-drop losses (possibly incurring
TCP timeout). The model in ns-3 is a port of Sally Floyd's ns-2
RED model.
Scope and Limitations
=====================
The RED model just supports default RED. Adaptive RED is not supported.
References
==========
The RED queue aims to be close to the results cited in:
S.Floyd, K.Fall http://icir.org/floyd/papers/redsims.ps
Usage
*****
@@ -82,8 +62,7 @@ Helpers
=======
A typical usage pattern is to create a device helper and to configure
the queue type and attributes from the helper, such as this example
from ``src/network/examples/red-tests.cc``:
the queue type and attributes from the helper, such as this example:
.. sourcecode:: cpp
@@ -99,34 +78,14 @@ from ``src/network/examples/red-tests.cc``:
p2p.SetChannelAttribute ("Delay", StringValue ("3ms"));
NetDeviceContainer devn1n2 = p2p.Install (n1n2);
p2p.SetQueue ("ns3::RedQueue", // only backbone link has RED queue
"LinkBandwidth", StringValue (redLinkDataRate),
"LinkDelay", StringValue (redLinkDelay));
p2p.SetDeviceAttribute ("DataRate", StringValue (redLinkDataRate));
p2p.SetChannelAttribute ("Delay", StringValue (redLinkDelay));
p2p.SetQueue ("ns3::DropTailQueue",
"LinkBandwidth", StringValue (linkDataRate),
"LinkDelay", StringValue (linkDelay));
p2p.SetDeviceAttribute ("DataRate", StringValue (linkDataRate));
p2p.SetChannelAttribute ("Delay", StringValue (linkDelay));
NetDeviceContainer devn2n3 = p2p.Install (n2n3);
Attributes
==========
The RED queue contains a number of attributes that control the RED
policies:
* Mode (bytes or packets)
* MeanPktSize
* IdlePktSize
* Wait (time)
* Gentle mode
* MinTh, MaxTh
* QueueLimit
* Queue weight
* LInterm
* LinkBandwidth
* LinkDelay
Consult the ns-3 documentation for explanation of these attributes.
Output
======
@@ -154,12 +113,5 @@ Examples
========
The drop-tail queue is used in several examples, such as
``examples/udp/udp-echo.cc``. The RED queue example is found at
``src/network/examples/red-tests.cc``.
Validation
**********
The RED model has been validated and the report is currently stored
at: https://github.com/downloads/talau/ns-3-tcp-red/report-red-ns3.pdf
``examples/udp/udp-echo.cc``.

View File

@@ -10,11 +10,5 @@ def build(bld):
obj = bld.create_ns3_program('main-packet-tag', ['network'])
obj.source = 'main-packet-tag.cc'
obj = bld.create_ns3_program('red-tests', ['point-to-point', 'internet', 'applications', 'flow-monitor'])
obj.source = 'red-tests.cc'
obj = bld.create_ns3_program('droptail_vs_red', ['point-to-point', 'point-to-point-layout', 'internet', 'applications'])
obj.source = 'droptail_vs_red.cc'
obj = bld.create_ns3_program('packet-socket-apps', ['core', 'network'])
obj.source = 'packet-socket-apps.cc'

View File

@@ -10,7 +10,6 @@
cpp_examples = [
("main-packet-header", "True", "True"),
("main-packet-tag", "True", "True"),
("red-tests", "True", "True"),
]
# A list of Python examples to run in order to ensure that they remain

View File

@@ -50,7 +50,6 @@ def build(bld):
'utils/pcap-file-wrapper.cc',
'utils/queue.cc',
'utils/radiotap-header.cc',
'utils/red-queue.cc',
'utils/simple-channel.cc',
'utils/simple-net-device.cc',
'utils/sll-header.cc',
@@ -77,7 +76,6 @@ def build(bld):
'test/packet-test-suite.cc',
'test/packet-metadata-test.cc',
'test/pcap-file-test-suite.cc',
'test/red-queue-test-suite.cc',
'test/sequence-number-test-suite.cc',
'test/packet-socket-apps-test-suite.cc',
]
@@ -134,7 +132,6 @@ def build(bld):
'utils/generic-phy.h',
'utils/queue.h',
'utils/radiotap-header.h',
'utils/red-queue.h',
'utils/sequence-number.h',
'utils/sgi-hashmap.h',
'utils/simple-channel.h',