DropOldest and DropNewest in OcbWifiMac leading to same outputs

24 views
Skip to first unread message

Boong Baang

unread,
Nov 5, 2019, 8:34:38 PM11/5/19
to ns-3-users
I am trying to use a DropOldest policy at the Mac layer of wifi devices, and for that I used

 
Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac/$ns3::OcbWifiMac/Txop/Queue/DropPolicy", StringValue("DropOldest"));
Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac/$ns3::OcbWifiMac/VO_Txop/Queue/DropPolicy", StringValue("DropOldest"));
Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac/$ns3::OcbWifiMac/VI_Txop/Queue/DropPolicy", StringValue("DropOldest"));
Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac/$ns3::OcbWifiMac/BE_Txop/Queue/DropPolicy", StringValue("DropOldest"));
Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac/$ns3::OcbWifiMac/BK_Txop/Queue/DropPolicy", StringValue("DropOldest"));

I am assigning IDs to the packets in their order of generation (i.e. in the order the GenerateTraffic function is called) and all the 10 packets are generated at once. But in both the cases, whether I use DropOldest or DropNewest, I get the first 2 packets that were generated and it seems the queue is following the default behavior of dropping the newer packets.  I am assuming the packet that is generated by the GenerateTraffic in an earlier call, e.g. in the first call (as GenerateTraffic is called in a loop for each of the packet to be generated) will be an older packet compared to a packet that was generated in a later call to GenerateTraffic, e,g, the 10th call. 


DropNewest is set using this command. I am setting it for all the queues as I am not sure which one of the 5 queues will be handling the packets generated.
Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac/$ns3::OcbWifiMac/Txop/Queue/DropPolicy", StringValue("DropNewest"));
Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac/$ns3::OcbWifiMac/VO_Txop/Queue/DropPolicy", StringValue("DropNewest"));
Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac/$ns3::OcbWifiMac/VI_Txop/Queue/DropPolicy", StringValue("DropNewest"));
Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac/$ns3::OcbWifiMac/BE_Txop/Queue/DropPolicy", StringValue("DropNewest"));
Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac/$ns3::OcbWifiMac/BK_Txop/Queue/DropPolicy", StringValue("DropNewest"));

I also generated a text file that will indicate value of each of the attribute set inside the program, and it shows DropOldest when I use that. But the results for both DropOldest and DropNewest are coming to be same.

I am attaching the file to look at the issue.

I also have the trace that gives information on when a packet is queued and dequed (EnqueueTrace and DequeueTrace), but am unable to associate that information to the individual packets (e.g. all my packets have an unique ID). How can I associate the calls to the trace files to the packet that is getting queued and dequeued?
verify_oldest_drop.cc
Reply all
Reply to author
Forward
0 new messages