wifi: Add ICF sender address to IcfDropReason trace
This commit is contained in:
@@ -26,6 +26,7 @@ This file is a best-effort approach to solving this issue; we will do our best b
|
||||
* (dsr) Reformatted documentation and added a new concept figure.
|
||||
* (flow-monitor) Reformatted documentation and added a new concept figure.
|
||||
* (internet-apps) Added a parameter to the RADVD helper to announce a prefix without the autoconfiguration flag.
|
||||
* (wifi) Callbacks connected to the `WifiMac::IcfDropReason` trace source are now passed a `struct IcfDropInfo` object that has three fields indicating the reason for dropping the ICF, the ID of the link on which the ICF was dropped and the MAC address of the sender of the ICF.
|
||||
|
||||
### Changes to build system
|
||||
|
||||
|
||||
@@ -1658,7 +1658,7 @@ EhtFrameExchangeManager::DropReceivedIcf()
|
||||
// started before the reception of the ICF ended. We drop this ICF and let the
|
||||
// UL TXOP continue.
|
||||
NS_LOG_DEBUG("Drop ICF because another EMLSR link is being used");
|
||||
m_icfDropCallback(WifiIcfDrop::USING_OTHER_LINK, m_linkId);
|
||||
m_icfDropCallback({WifiIcfDrop::USING_OTHER_LINK, m_linkId, m_bssid});
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1692,7 +1692,7 @@ EhtFrameExchangeManager::DropReceivedIcf()
|
||||
NS_LOG_DEBUG(
|
||||
"Drop ICF due to not enough time for the main PHY to switch link; reason = "
|
||||
<< *reason);
|
||||
m_icfDropCallback(*reason, m_linkId);
|
||||
m_icfDropCallback({*reason, m_linkId, m_bssid});
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ class EhtFrameExchangeManager : public HeFrameExchangeManager
|
||||
void SetIcfPaddingAndTxVector(CtrlTriggerHeader& trigger, WifiTxVector& txVector) const;
|
||||
|
||||
/// ICF drop reason traced callback (WifiMac exposes this trace source)
|
||||
TracedCallback<WifiIcfDrop, uint8_t> m_icfDropCallback;
|
||||
WifiMac::IcfDropTracedCallback m_icfDropCallback;
|
||||
|
||||
protected:
|
||||
void DoDispose() override;
|
||||
|
||||
@@ -376,10 +376,10 @@ WifiMac::GetTypeId()
|
||||
MakeTraceSourceAccessor(&WifiMac::m_psduMapResponseTimeoutCallback),
|
||||
"ns3::WifiMac::PsduMapResponseTimeoutCallback")
|
||||
.AddTraceSource("IcfDropReason",
|
||||
"An ICF is dropped by an EMLSR client for the given reason on the "
|
||||
"link with the given ID. This trace source is actually fed by the "
|
||||
"EHT Frame Exchange Manager through the m_icfDropCallback member "
|
||||
"variable.",
|
||||
"An ICF sent by the given sender is dropped by an EMLSR client for "
|
||||
"the given reason on the link with the given ID. This trace source "
|
||||
"is actually fed by the EHT Frame Exchange Manager through the "
|
||||
"m_icfDropCallback member variable.",
|
||||
MakeTraceSourceAccessor(&WifiMac::m_icfDropCallback),
|
||||
"ns3::WifiMac::IcfDropCallback");
|
||||
return tid;
|
||||
|
||||
@@ -811,6 +811,24 @@ class WifiMac : public Object
|
||||
uint8_t tid,
|
||||
uint8_t linkId) const;
|
||||
|
||||
/// Information reported by ICF drop trace
|
||||
struct IcfDropInfo
|
||||
{
|
||||
WifiIcfDrop reason{}; ///< the reason why the ICF was dropped by the EMLSR client
|
||||
uint8_t linkId{}; ///< the ID of the link on which the ICF was dropped
|
||||
Mac48Address sender; ///< the sender of the ICF
|
||||
};
|
||||
|
||||
/**
|
||||
* TracedCallback signature for ICF drop events.
|
||||
*
|
||||
* @param info information reported by ICF drop trace
|
||||
*/
|
||||
typedef void (*IcfDropCallback)(const IcfDropInfo& info);
|
||||
|
||||
/// TracedCallback for ICF drop events typedef
|
||||
using IcfDropTracedCallback = TracedCallback<const IcfDropInfo&>;
|
||||
|
||||
protected:
|
||||
void DoInitialize() override;
|
||||
void DoDispose() override;
|
||||
@@ -1380,17 +1398,6 @@ class WifiMac : public Object
|
||||
*/
|
||||
PsduMapResponseTimeoutTracedCallback m_psduMapResponseTimeoutCallback;
|
||||
|
||||
/**
|
||||
* TracedCallback signature for ICF drop events.
|
||||
*
|
||||
* @param reason the reason why the ICF was dropped by the EMLSR client
|
||||
* @param linkId the ID of the link on which the ICF was dropped
|
||||
*/
|
||||
typedef void (*IcfDropCallback)(WifiIcfDrop reason, uint8_t linkId);
|
||||
|
||||
/// TracedCallback for ICF drop events typedef
|
||||
using IcfDropTracedCallback = TracedCallback<WifiIcfDrop, uint8_t>;
|
||||
|
||||
IcfDropTracedCallback m_icfDropCallback; //!< traced callback for ICF drop events
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user