Bug 2352 - Add 'drop oldest' drop policy to WifiMacQueue
Add 'drop oldest' drop policy to WifiMacQueue
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: wifi
unspecified
All All
: P5 enhancement
Assigned To: sebastien.deronne
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-31 13:11 UTC by Tom Henderson
Modified: 2016-06-04 07:47 UTC (History)
2 users (show)

See Also:


Attachments
patch (3.19 KB, patch)
2016-03-31 13:11 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 2016-03-31 13:11:45 UTC
Created attachment 2362 [details]
patch

Some applications need to preserve the newest generated packet and drop
the oldest one from the MAC layer queue.  This patch enables an option
to change the drop policy on the queue.  If the drop oldest policy is
selected, the oldest packet in the queue will be dropped and the new
packet will be inserted at the tail of the queue. The drop-oldest
policy was added to transmit the latest generated packet with most
recent information instead of an old packet.

This patch has been developed jointly at WINLAB, Rutgers University and
West Virginia University as part of the V2V safety communications
scalability activity of the Interoperability Issues of Vehicle-to-Vehicle
Based Safety Systems (V2V-Interoperability) Project headed by the
Crash Avoidance Metrics Partnership (CAMP) Vehicle Safety
Communications 3 (VSC3) Consortium, in partnership with the United States
Department of Transportation (USDOT).
Comment 1 Tom Henderson 2016-03-31 13:12:45 UTC
(patch posted on behalf of Ali Rostami)
Comment 2 sebastien.deronne 2016-03-31 16:18:02 UTC
Agreed
Comment 3 Stefano Avallone 2016-04-19 11:37:35 UTC
I think it is safe to apply this patch. Perhaps we might replace:

PacketQueue::iterator it = m_queue.begin();
m_queue.erase(it);

by:

m_queue.pop_front ();
Comment 4 sebastien.deronne 2016-04-20 16:18:32 UTC
I suggest to deliver this patch to the mainstream, maybe including comments from Stefano as well.
Comment 5 sebastien.deronne 2016-06-04 07:47:40 UTC
pushed in changeset 12141:8756fe6b6f52