Bug 2634

Summary: Move Queue::Enqueue operations to subclass
Product: ns-3 Reporter: Tom Henderson <tomh>
Component: networkAssignee: Stefano Avallone <stavallo>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: unspecified   
Hardware: All   
OS: All   
Attachments: patch to fix

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.