|
Bugzilla – Full Text Bug Listing |
| Summary: | WifiMac traces not being called | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | sayandev |
| Component: | wifi | Assignee: | Nicola Baldo <nicola> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | ns-bugs, ruben, tjkopena, tomh |
| Priority: | P5 | ||
| Version: | ns-3.13 | ||
| Hardware: | All | ||
| OS: | All | ||
|
Description
sayandev
2012-04-20 15:38:44 UTC
First, thank you for a well written bug report.
The problem is that the WifiMac trace sources are not being called by the model anymore. There are a number of "Notify()" methods defined that are hooked to these callbacks. However, it seems that these methods are no longer called (perhaps dropped in the past when Wifi model was refactored). We don't have any test coverage to detect this, apparently.
I am going to rename this bug report and reassign to WiFi. We need to audit these traces in WifiMac:
MacTx: A packet has been received from higher layers and is being processed in preparation for queueing for transmission.
MacTxDrop: A packet has been dropped in the MAC layer before being queued for transmission.
MacPromiscRx: A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a promiscuous trace,
MacRx: A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a non-promiscuous trace,
MacRxDrop: A packet has been dropped in the MAC layer after it has been passed up from the physical layer.
and make sure they are called by the subclasses, and put in some test code to cover these trace sources. It would probably help to go back to the point in time when these were added, to see what point in the Wifi stack they were calling something, and then find the corresponding places in the current code.
(In reply to comment #1) > First, thank you for a well written bug report. > > The problem is that the WifiMac trace sources are not being called by the model > anymore. There are a number of "Notify()" methods defined that are hooked to > these callbacks. However, it seems that these methods are no longer called > (perhaps dropped in the past when Wifi model was refactored). We don't have > any test coverage to detect this, apparently. > Actually it seems to me that the Notify() methods are called from WifiNetDevice, e.g.: bool WifiNetDevice::SendFrom (Ptr<Packet> packet, const Address& source, const Address& dest, uint16_t protocolNumber) { [snip] m_mac->NotifyTx (packet); and I think that's the correct place to fire the trace to behave like said in the trace description. The names "MacTx" etc. where chosen to be consistent with other models, please see this changeset: http://code.nsnam.org/ns-3-dev/rev/fec2f830d015 changeset: 7861:8e2308aaeab4 turns out it was just a stupid bug in wifi-example-sim, the remote address of the application was not set properly, and the packet did not even reach the WifiNetDevice for transmission. |