Mac Retransmission ad MacDrop

341 views
Skip to first unread message

Matteo Danieletto

unread,
Jul 8, 2015, 4:11:00 AM7/8/15
to ns-3-...@googlegroups.com
Hi all,
I am interesting, for some simulations, to collect the total number of packet retransmission at Mac layer during a run. 
I found the point where the Mac retransmissions are counted, 
My question is:

is there a better way (tracing) than modify the ns3 core?

The second question 
When 
  • MacRxDrop: A packet has been dropped in the MAC layer after it has been passed up from the physical layer.
succeed? 

Thank you
Matteo

Sebastien Deronne

unread,
Jul 8, 2015, 4:59:41 AM7/8/15
to ns-3-...@googlegroups.com
1/ Maybe those traces could help:
 
    MacTxDataFailed: this is triggered each time a transmission fails, regardless there is a retransmission that will be scheduled.
  

    MacTxFinalDataFailed: this is triggered if a retransmissions fails and that no retransmission is scheduled (packet is dropped).

I believe by combining those traces you could get what you want.

2/ What is your question? This is not clear.

Matteo Danieletto

unread,
Jul 8, 2015, 12:21:06 PM7/8/15
to ns-3-...@googlegroups.com
Hi Sebastian 
thank you to replay me.

Yes I think that combining both traces I can obtain the measurement I want. 

For the second question, when a packet is dropped? I understood the packet comes from the PHY layer and MAC layer drop it, but why the MAC layer drop packet? The MAC queue is full and/or other events?


Thank you
Matteo

Tommaso Pecorella

unread,
Jul 8, 2015, 12:39:25 PM7/8/15
to ns-3-...@googlegroups.com
LMLATCFY (Let Me Look At The Code or You).

StaWifiMac::Receive (Ptr<Packet> packet, const WifiMacHeader *hdr)
...
      NS_LOG_LOGIC
("packet is not for us");
     
NotifyRxDrop (packet);
...
          NS_LOG_LOGIC
("Received data frame while not associated: ignore");
         
NotifyRxDrop (packet);
...
          NS_LOG_LOGIC
("Received data frame not from the DS: ignore");
         
NotifyRxDrop (packet);
...
          NS_LOG_LOGIC
("Received data frame not from the BSS we are associated with: ignore");
         
NotifyRxDrop (packet);
...
     
//This is a frame aimed at an AP, so we can safely ignore it.
     
NotifyRxDrop (packet);

ApWifiMac::Receive (Ptr<Packet> packet, const WifiMacHeader *hdr)
...
         
//this is an AP-to-AP frame
         
//we ignore for now.
         
NotifyRxDrop (packet);
...
         
//we can ignore these frames since
         
//they are not targeted at the AP
         
NotifyRxDrop (packet);


Suggestion: a good IDE (e.g., Eclipse, NetBeans, etc.) can do wonderful tricks.

T.

PS: no, there's no Rx queue at MAC level. There's a Tx queue only, Rx packets are immediately delivered to upper layers.

Matteo Danieletto

unread,
Jul 9, 2015, 9:48:15 PM7/9/15
to ns-3-...@googlegroups.com
Thank you.
I have small final question about the trace.
To call the trace MacTxFinalDataFailed and MacTxDataFailed I used the following path:

/NodeList/*/DeviceList/*/RemoteStationManager/MacTxFinalDataFailed and MacTxDataFailed
and it works using Config::Connect

But, before to achieve that path I wrote with WifiRemoteStationManager instead to RemoteStationManager  and the functions weren't triggered.

Do you know why?
Thank you
Matteo

Konstantinos

unread,
Jul 10, 2015, 4:22:47 AM7/10/15
to ns-3-...@googlegroups.com, mdani...@eng.ucsd.edu
Hi Matteo,

I will refer you the the NS-3 API for WifiRemoteStationManager 

and more specifically, the point where the config path is given

ns3::WifiRemoteStationManager is accessible through the following paths with Config::Set and Config::Connect:

  • "/NodeList/[i]/DeviceList/[i]/$ns3::WifiNetDevice/RemoteStationManager"
This, will answer your question.
Reply all
Reply to author
Forward
0 new messages