Bug 2389 - Internal queues need to notify their queue disc of packet drops
Internal queues need to notify their queue disc of packet drops
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: traffic-control
ns-3-dev
PC Linux
: P5 enhancement
Assigned To: Stefano Avallone
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-04-26 11:36 UTC by Stefano Avallone
Modified: 2016-05-11 06:25 UTC (History)
2 users (show)

See Also:


Attachments
Proposed fix (6.30 KB, patch)
2016-04-26 11:36 UTC, Stefano Avallone
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefano Avallone 2016-04-26 11:36:21 UTC
Created attachment 2400 [details]
Proposed fix

If we had a Queue subclass that may drop packets in DoDequeue or we added the possibility to remove elements from a queue (see below), the statistics (in particular, packet and byte count, number of dropped packets) kept by a queue disc having such a queue as internal queue would not be correct in case packets are dropped in the context of dequeue or remove operations on the queue.

The proposed fix follows the same logic as that followed to fix bug #2384, i.e., a callback is set when an internal queue is added to a queue disc so that the internal queue can notify the queue disc of dropped packets.

This fix (and that of bug #2384), along with code review [1], are required by fq-codel to correctly keep statistics. Code review [1] adds a Remove method to the Queue base class, which is needed by fq-codel to remove the packet from the queue with the largest backlog in case the fq-codel limit is exceeded. More details in the upcoming fq-codel code review.

[1] http://codereview.appspot.com/292540043
Comment 1 Tom Henderson 2016-05-09 13:19:59 UTC
Looks OK to me.
Comment 2 Stefano Avallone 2016-05-11 06:25:48 UTC
Fixed by changeset 12109:550aaa2b2767