From 59cd4d5f557c929e97127abe3d3e427bfc3fb306 Mon Sep 17 00:00:00 2001 From: Stefano Avallone Date: Thu, 14 Sep 2017 18:12:19 +0200 Subject: [PATCH] traffic-control: (fixes #2751) Ensure queue discs keep correct statistics --- CHANGES.html | 8 + RELEASE_NOTES | 1 + examples/traffic-control/traffic-control.cc | 22 +- src/network/utils/queue.h | 4 + src/traffic-control/doc/queue-discs.rst | 24 +- src/traffic-control/model/codel-queue-disc.cc | 12 +- .../model/fq-codel-queue-disc.cc | 2 +- .../model/pfifo-fast-queue-disc.cc | 8 +- src/traffic-control/model/pie-queue-disc.cc | 8 +- src/traffic-control/model/queue-disc.cc | 275 +++++++++++------- src/traffic-control/model/queue-disc.h | 197 +++++++------ src/traffic-control/model/red-queue-disc.cc | 8 +- 12 files changed, 341 insertions(+), 228 deletions(-) diff --git a/CHANGES.html b/CHANGES.html index 2cee77ab3..9ede25951 100644 --- a/CHANGES.html +++ b/CHANGES.html @@ -95,6 +95,14 @@ us a note on ns-developers mailing list.

  • MqQueueDisc, a multi-queue aware queue disc modelled after the mq qdisc in Linux, has been introduced.
  • +
  • Added QueueDisc::GetStats() which returns detailed statistics about the operations of a queue disc. + Consequently, a number of methods of the QueueDisc class have been removed: GetTotalReceivedPackets(), + GetTotalReceivedBytes(), GetTotalDroppedPackets(), GetTotalDroppedBytes(), + GetTotalRequeuedPackets(), GetTotalRequeuedBytes(). +
  • +
  • Two new methods, QueueDisc::DropBeforeEnqueue() and QueueDisc::DropAfterDequeue() have + been introduced to replace QueueDisc::Drop(). Correspondingly, two new trace sources have been added to the QueueDisc class: DropBeforeEnqueue and DropAfterDequeue. +
  • Changes to existing API: