lte: Use ConnectFailSafe to connect PDCP traces
It also reverts back the change done to DrbCreatedTrace TraceSource in 59276b0d
see merge request !302
This commit is contained in:
@@ -1832,6 +1832,7 @@ all packets in the transmission buffer, thus notifying to the MAC the
|
||||
exact buffer size.
|
||||
|
||||
|
||||
.. _sec-sm-rlc:
|
||||
|
||||
SM RLC
|
||||
++++++
|
||||
|
||||
@@ -342,6 +342,8 @@ for uplink and downlink):
|
||||
18. Maximum PDCP PDU size
|
||||
|
||||
|
||||
**Note:** The PDCP traces for data radio bearers are not generated when
|
||||
:ref:`sec-sm-rlc` is used.
|
||||
|
||||
MAC KPIs are basically a trace of the resource allocation reported by
|
||||
the scheduler upon the start of every subframe. They are stored in
|
||||
|
||||
@@ -189,10 +189,10 @@ RadioBearerStatsConnector::NotifyRandomAccessSuccessfulUe (RadioBearerStatsConne
|
||||
}
|
||||
|
||||
void
|
||||
RadioBearerStatsConnector::CreatedDrbEnb (RadioBearerStatsConnector* c, std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t lcid, std::string rlcType)
|
||||
RadioBearerStatsConnector::CreatedDrbEnb (RadioBearerStatsConnector* c, std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t lcid)
|
||||
{
|
||||
NS_LOG_FUNCTION (c << context << imsi << cellId << rnti << (uint16_t)lcid << rlcType);
|
||||
c->ConnectTracesDrbEnb (context, imsi, cellId, rnti, lcid, rlcType);
|
||||
NS_LOG_FUNCTION (c << context << imsi << cellId << rnti << (uint16_t)lcid);
|
||||
c->ConnectTracesDrbEnb (context, imsi, cellId, rnti, lcid);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -203,10 +203,10 @@ RadioBearerStatsConnector::CreatedSrb1Ue (RadioBearerStatsConnector* c, std::str
|
||||
}
|
||||
|
||||
void
|
||||
RadioBearerStatsConnector::CreatedDrbUe (RadioBearerStatsConnector* c, std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t lcid, std::string rlcType)
|
||||
RadioBearerStatsConnector::CreatedDrbUe (RadioBearerStatsConnector* c, std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t lcid)
|
||||
{
|
||||
NS_LOG_FUNCTION (c << context << imsi << cellId << rnti << (uint16_t)lcid << rlcType);
|
||||
c->ConnectTracesDrbUe (context, imsi, cellId, rnti, lcid, rlcType);
|
||||
NS_LOG_FUNCTION (c << context << imsi << cellId << rnti << (uint16_t)lcid);
|
||||
c->ConnectTracesDrbUe (context, imsi, cellId, rnti, lcid);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -285,7 +285,7 @@ RadioBearerStatsConnector::ConnectTracesSrb1 (std::string context, uint64_t imsi
|
||||
}
|
||||
|
||||
void
|
||||
RadioBearerStatsConnector::ConnectTracesDrbEnb (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t lcid, std::string rlcType)
|
||||
RadioBearerStatsConnector::ConnectTracesDrbEnb (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t lcid)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << context << imsi << cellId << rnti << (uint16_t)lcid);
|
||||
NS_LOG_LOGIC ("expected context should match /NodeList/*/DeviceList/*/LteEnbRrc/");
|
||||
@@ -303,21 +303,25 @@ RadioBearerStatsConnector::ConnectTracesDrbEnb (std::string context, uint64_t im
|
||||
Config::Connect (basePath + "/LteRlc/RxPDU",
|
||||
MakeBoundCallback (&UlRxPduCallback, arg));
|
||||
}
|
||||
if (m_pdcpStats && rlcType != "ns3::LteRlcSm")
|
||||
if (m_pdcpStats)
|
||||
{
|
||||
Ptr<BoundCallbackArgument> arg = Create<BoundCallbackArgument> ();
|
||||
arg->imsi = imsi;
|
||||
arg->cellId = cellId;
|
||||
arg->stats = m_pdcpStats;
|
||||
Config::Connect (basePath + "/LtePdcp/TxPDU",
|
||||
bool foundTxPdcp = Config::ConnectFailSafe (basePath + "/LtePdcp/TxPDU",
|
||||
MakeBoundCallback (&DlTxPduCallback, arg));
|
||||
Config::Connect (basePath + "/LtePdcp/RxPDU",
|
||||
bool foundRxPdcp = Config::ConnectFailSafe (basePath + "/LtePdcp/RxPDU",
|
||||
MakeBoundCallback (&UlRxPduCallback, arg));
|
||||
if (!foundTxPdcp && !foundRxPdcp)
|
||||
{
|
||||
NS_LOG_WARN ("Unable to connect PDCP traces. This may happen if RlcSm is used");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
RadioBearerStatsConnector::ConnectTracesDrbUe (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t lcid, std::string rlcType)
|
||||
RadioBearerStatsConnector::ConnectTracesDrbUe (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t lcid)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << context << imsi << cellId << rnti << (uint16_t)lcid);
|
||||
NS_LOG_LOGIC ("expected context should match /NodeList/*/DeviceList/*/LteUeRrc/");
|
||||
@@ -335,16 +339,20 @@ RadioBearerStatsConnector::ConnectTracesDrbUe (std::string context, uint64_t ims
|
||||
Config::Connect (basePath + "/LteRlc/RxPDU",
|
||||
MakeBoundCallback (&DlRxPduCallback, arg));
|
||||
}
|
||||
if (m_pdcpStats && rlcType != "ns3::LteRlcSm")
|
||||
if (m_pdcpStats)
|
||||
{
|
||||
Ptr<BoundCallbackArgument> arg = Create<BoundCallbackArgument> ();
|
||||
arg->imsi = imsi;
|
||||
arg->cellId = cellId;
|
||||
arg->stats = m_pdcpStats;
|
||||
Config::Connect (basePath + "/LtePdcp/TxPDU",
|
||||
bool foundTxPdcp = Config::ConnectFailSafe (basePath + "/LtePdcp/TxPDU",
|
||||
MakeBoundCallback (&UlTxPduCallback, arg));
|
||||
Config::Connect (basePath + "/LtePdcp/RxPDU",
|
||||
bool foundRxPdcp = Config::ConnectFailSafe (basePath + "/LtePdcp/RxPDU",
|
||||
MakeBoundCallback (&DlRxPduCallback, arg));
|
||||
if (!foundTxPdcp && !foundRxPdcp)
|
||||
{
|
||||
NS_LOG_WARN ("Unable to connect PDCP traces. This may happen if RlcSm is used");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -117,9 +117,8 @@ public:
|
||||
* \param cellid
|
||||
* \param rnti
|
||||
* \param lcid
|
||||
* \param rlcType
|
||||
*/
|
||||
static void CreatedDrbEnb (RadioBearerStatsConnector* c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti, uint8_t lcid, std::string rlcType);
|
||||
static void CreatedDrbEnb (RadioBearerStatsConnector* c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti, uint8_t lcid);
|
||||
|
||||
/**
|
||||
* Function hooked to DrbCreated trace source at UE RRC,
|
||||
@@ -131,9 +130,8 @@ public:
|
||||
* \param cellid
|
||||
* \param rnti
|
||||
* \param lcid
|
||||
* \param rlcType
|
||||
*/
|
||||
static void CreatedDrbUe (RadioBearerStatsConnector* c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti, uint8_t lcid, std::string rlcType);
|
||||
static void CreatedDrbUe (RadioBearerStatsConnector* c, std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti, uint8_t lcid);
|
||||
|
||||
/**
|
||||
* Disconnects all trace sources at eNB to RLC and PDCP calculators.
|
||||
@@ -190,9 +188,8 @@ private:
|
||||
* \param cellId
|
||||
* \param rnti
|
||||
* \param lcid
|
||||
* \param rlcType
|
||||
*/
|
||||
void ConnectTracesDrbEnb (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t lcid, std::string rlcType);
|
||||
void ConnectTracesDrbEnb (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t lcid);
|
||||
|
||||
/**
|
||||
* Connects DRB trace sources at UE to RLC and PDCP calculators
|
||||
@@ -201,9 +198,8 @@ private:
|
||||
* \param cellId
|
||||
* \param rnti
|
||||
* \param lcid
|
||||
* \param rlcType
|
||||
*/
|
||||
void ConnectTracesDrbUe (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t lcid, std::string rlcType);
|
||||
void ConnectTracesDrbUe (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t lcid);
|
||||
|
||||
Ptr<RadioBearerStatsCalculator> m_rlcStats; //!< Calculator for RLC Statistics
|
||||
Ptr<RadioBearerStatsCalculator> m_pdcpStats; //!< Calculator for PDCP Statistics
|
||||
|
||||
@@ -444,7 +444,7 @@ UeManager::SetupDataRadioBearer (EpsBearer bearer, uint8_t bearerId, uint32_t gt
|
||||
drbInfo->m_pdcp = pdcp;
|
||||
}
|
||||
|
||||
m_drbCreatedTrace (m_imsi, m_rrc->ComponentCarrierToCellId (m_componentCarrierId), m_rnti, lcid, rlcTypeId.GetName ());
|
||||
m_drbCreatedTrace (m_imsi, m_rrc->ComponentCarrierToCellId (m_componentCarrierId), m_rnti, lcid);
|
||||
|
||||
std::vector<LteCcmRrcSapProvider::LcsConfig> lcOnCcMapping = m_rrc->m_ccmRrcSapProvider->SetupDataRadioBearer (bearer, bearerId, m_rnti, lcid, m_rrc->GetLogicalChannelGroup (bearer), rlc->GetLteMacSapUser ());
|
||||
// LteEnbCmacSapProvider::LcInfo lcinfo;
|
||||
|
||||
@@ -559,10 +559,9 @@ private:
|
||||
/**
|
||||
* The `DrbCreated` trace source. Fired when DRB is created, i.e.
|
||||
* the RLC and PDCP entities are created for one logical channel.
|
||||
* Exporting IMSI, cell ID, RNTI, LCID, and the TypeId of the RLC
|
||||
* entity.
|
||||
* Exporting IMSI, cell ID, RNTI, LCID.
|
||||
*/
|
||||
TracedCallback<uint64_t, uint16_t, uint16_t, uint8_t, std::string> m_drbCreatedTrace;
|
||||
TracedCallback<uint64_t, uint16_t, uint16_t, uint8_t> m_drbCreatedTrace;
|
||||
|
||||
uint16_t m_sourceX2apId; ///< source X2 ap ID
|
||||
uint16_t m_targetX2apId; ///< target X2 ap ID
|
||||
|
||||
@@ -1526,7 +1526,7 @@ LteUeRrc::ApplyRadioResourceConfigDedicated (LteRrcSap::RadioResourceConfigDedic
|
||||
|
||||
m_drbMap.insert (std::pair<uint8_t, Ptr<LteDataRadioBearerInfo> > (dtamIt->drbIdentity, drbInfo));
|
||||
|
||||
m_drbCreatedTrace (m_imsi, m_cellId, m_rnti, dtamIt->drbIdentity, rlcTypeId.GetName ());
|
||||
m_drbCreatedTrace (m_imsi, m_cellId, m_rnti, dtamIt->drbIdentity);
|
||||
|
||||
|
||||
struct LteUeCmacSapProvider::LogicalChannelConfig lcConfig;
|
||||
|
||||
@@ -917,10 +917,9 @@ private:
|
||||
/**
|
||||
* The `DrbCreated` trace source. Fired when DRB is created, i.e.
|
||||
* the RLC and PDCP entities are created for one logical channel.
|
||||
* Exporting IMSI, cell ID, RNTI, LCID, and the TypeId of the RLC
|
||||
* entity.
|
||||
* Exporting IMSI, cell ID, RNTI, LCID.
|
||||
*/
|
||||
TracedCallback<uint64_t, uint16_t, uint16_t, uint8_t, std::string> m_drbCreatedTrace;
|
||||
TracedCallback<uint64_t, uint16_t, uint16_t, uint8_t> m_drbCreatedTrace;
|
||||
/**
|
||||
* The 'PhySyncDetection' trace source. Fired when UE RRC
|
||||
* receives in-sync or out-of-sync indications from UE PHY
|
||||
|
||||
Reference in New Issue
Block a user