How do I go about making the Queue in the MAC layer of wifi devices a Last Come First Served (LIFO) from the default FIFO order?

70 views
Skip to first unread message

Boong Baang

unread,
Nov 4, 2019, 12:11:48 PM11/4/19
to ns-3-users
The attribute to directly change the queue to DROP_OLDEST to DROP_NEWEST exists which becomes a LIFO for a queue size of 1, but I was not able to find a general way of making the queue into an LIFO from the default settings.

  Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac/$ns3::OcbWifiMac/Txop/Queue/MaxSize", StringValue ("1p"));
 
Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac/$ns3::OcbWifiMac/Txop/Queue/DropPolicy", StringValue("DropOldest"));
 
Config::Set ("/NodeList/*/$ns3::Node/DeviceList/*/$ns3::WifiNetDevice/Mac/$ns3::OcbWifiMac/Txop/$ns3::Txop/Queue/$ns3::WifiMacQueue/MaxSize", StringValue ("1p"));
 
Config::Set ("/NodeList/*/$ns3::Node/DeviceList/*/$ns3::WifiNetDevice/Mac/$ns3::OcbWifiMac/Txop/$ns3::Txop/Queue/$ns3::WifiMacQueue/DropPolicy", StringValue("DropOldest"));

Any help in that direction will be greatly appreciated.
my-wave-simple-80211p-revised.cc

Avik Dutta

unread,
Nov 4, 2019, 12:56:10 PM11/4/19
to ns-3-users
I think  for your purpose you have to make change in the mac_low.cc 

Boong Baang

unread,
Nov 4, 2019, 4:02:52 PM11/4/19
to ns-3-users
Both for the LIFO and DropOldest ? 
DropOldest can be set directly, and I was thinking if the queue object can be changed to a stack like behavior, I can have LIFO but I am unable to figure out where the modification can be done.

Reply all
Reply to author
Forward
0 new messages