AQM enhancements

From Nsnam
Jump to: navigation, search

Main Page - Current Development - Developer FAQ - Tools - Related Projects - Project Ideas - Summer Projects

Installation - Troubleshooting - User FAQ - HOWTOs - Samples - Models - Education - Contributed Code - Papers

This page summarizes some design and status in adding more AQM models to ns-3.

Current state (ns-3.21 and ns-3.22)

ns-3.21 and ns-3.22 have two AQM models: RED and CoDel. Both presently derive from class ns3::Queue and can be installed in Csma and PointToPoint NetDevice types (but not Wifi or LTE). The RED model was developed by Duy Nguyen and is a port of the classical RED queue model from ns-2, originally developed by Sally Floyd. The CoDel model started as a port by Andrew McGregor and was finished off in a 2014 GSoC project by Anh Nguyen.

ns-3.21 and ns-3.22 don't have support for ECN, mainly because it is not trivial to access/modify the IP packet header while at the device layer in ns-3; this paper has more details.

Lack of IP header access in the queues also hinders the inclusion of FQ Codel and SFQ Codel variants, which were also proposed in 2012.

Proposed way forward

Natale Patriciello proposed adding a Linux-like priority queue sublayer to the IP stack, in a post to ns-developers list in December 2014. This would allow IP-aware queues easier access to IP headers, and would more closely mimic the Linux stack design. This would require changes to all NetDevices to support a backpressure/flow control mechanism between the IP-layer queues and the device queues.

Tom Henderson is prototyping Natale's idea with a testing repository that also contains a new model for pfifo_fast and the most recent FQ and SFQ codel models.


(described in terms of IPv4 stack; similar design for IPv6 stack)

Class Ipv4Interface is extended to hold an instance of a ns3::PriorityQueue. Packets that used to be sent to the device (after ARP resolution) are now enqueued in the priority queue, and dequeued when the underlying device is ready. The priority queues types are planned to be:

  • RED
  • CoDel
  • SFQ CoDel
  • FQ CoDel
  • other future IP-aware queues

The main reason that class ns3::Queue cannot be reused is that the queue needs to store the hardware address also which is not yet serialized onto the packet. While a Packet Tag could be used, it is cleaner to just enqueue a structure of (Ptr<Packet>, Address).

Packets can be dequeued from the priority queue if the underlying device is ready. The underlying NetDevice implements an IsReady() method, and also a DeviceReadyCallback that is called if the device was previously not ready, but became ready. This callback should wake up the Ipv4Interface to continue to send packets down until the device becomes busy again. The overlying Ipv4Interface object registers a method with this NetDevice callback.

The base class PriorityQueue is similar to the base class Queue, but it enqueues a different object. Whereas ns3::Queue enqueues Ptr<Packet>, ns3::PriorityQueue enqueues a structure that includes Ptr<Packet> but also an Address which is the underlying MAC address.


hg clone


3/9/15: some prototype code to realize this idea over Point-to-Point NetDevice is posted in the repository.

Waiting for some review/comment from Natale

Once that is in place, plan to:

  • convert CoDel and RED to ns3::PriorityQueue
  • get some benchmarking programs and Tmix working against the new queues
  • port over the most recent SFQ Codel and FQ Codel from Anh's GSoC repository