Bug 2634 - Move Queue::Enqueue operations to subclass
Move Queue::Enqueue operations to subclass
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: network
unspecified
All All
: P3 normal
Assigned To: Stefano Avallone
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-01-25 15:57 UTC by Tom Henderson
Modified: 2017-06-08 04:42 UTC (History)
0 users

See Also:


Attachments
patch to fix (1.96 KB, patch)
2017-01-25 15:57 UTC, Tom Henderson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Henderson 2017-01-25 15:57:44 UTC
Created attachment 2763 [details]
patch to fix

Current Queue::Enqueue (item) enforces a tail-drop policy since item is discarded if the queue is full, preventing other drop policies (like "drop head").
Comment 1 Tom Henderson 2017-06-03 15:59:49 UTC
This patch is obsoleted by recent class Queue changes; resetting to Patch Wanted for the moment.
Comment 2 Stefano Avallone 2017-06-08 04:42:02 UTC
There is no need for a patch, since the current implementation of Queue already supports policies like drop head. In fact, the Enqueue method is now provided by the subclasses, while the Queue base class provides the DoEnqueue (pos, item) method to insert an item in the queue at the specified position. Thus, the Enqueue method of a subclass could discard an item if the queue is full to make room for the new item.