Skip to content

Commit 7e4d3c6

Browse files
committed
RlcUm: remove packet loss statistics that were based on PDCP sequence numbers
PDCP sequences are NOT contiguous in a Dual Connectivity setup (RLC does not see the packets that are going via the other "leg"). Such statistics should be collected in PDCP layer!
1 parent 9994d3b commit 7e4d3c6

File tree

4 files changed

+13
-97
lines changed

4 files changed

+13
-97
lines changed

src/simu5g/stack/rlc/um/LteRlcUm.ned

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,11 @@ simple LteRlcUm like ILteRlcUm
4545
@statistic[rlcDelayUl](title="Delay at the rlc layer UL"; unit="s"; source="rlcDelayUl"; record=mean,vector);
4646
@signal[rlcThroughputUl];
4747
@statistic[rlcThroughputUl](title="Throughput at the rlc layer UL"; unit="Bps"; source="rlcThroughputUl"; record=mean,vector);
48-
@signal[rlcPacketLossUl];
49-
@statistic[rlcPacketLossUl](title="rlc Packet Loss"; unit=""; source="rlcPacketLossUl"; record=mean,sum,vector);
50-
@signal[rlcPacketLossDl];
51-
@statistic[rlcPacketLossDl](title="rlc Packet Loss"; unit=""; source="rlcPacketLossDl"; record=mean,sum,vector);
52-
@signal[rlcPacketLossTotal];
53-
@statistic[rlcPacketLossTotal](title="rlc Packet Loss"; unit=""; source="rlcPacketLossTotal"; record=mean,vector);
5448

5549
@signal[rlcCellThroughputUl];
5650
@statistic[rlcCellThroughputUl](title="Cell Throughput at the rlc layer UL"; unit="Bps"; source="rlcCellThroughputUl"; record=mean);
5751
@signal[rlcCellThroughputDl];
5852
@statistic[rlcCellThroughputDl](title="Cell Throughput at the rlc layer DL"; unit="Bps"; source="rlcCellThroughputDl"; record=mean);
59-
@signal[rlcCellPacketLossDl];
60-
@statistic[rlcCellPacketLossDl](title="rlc Cell Packet Loss"; unit=""; source="rlcCellPacketLossDl"; record=mean);
61-
@signal[rlcCellPacketLossUl];
62-
@statistic[rlcCellPacketLossUl](title="rlc Cell Packet Loss"; unit=""; source="rlcCellPacketLossUl"; record=mean);
6353

6454
//# PDU-level statistics
6555
@signal[rlcPduDelayDl];
@@ -70,10 +60,6 @@ simple LteRlcUm like ILteRlcUm
7060
@statistic[rlcPduDelayUl](title="Delay at the rlc layer UL"; unit="s"; source="rlcPduDelayUl"; record=mean,vector);
7161
@signal[rlcPduThroughputUl];
7262
@statistic[rlcPduThroughputUl](title="Throughput at the rlc layer UL"; unit="Bps"; source="rlcPduThroughputUl"; record=mean,vector);
73-
@signal[rlcPduPacketLossUl];
74-
@statistic[rlcPduPacketLossUl](title="rlc Packet Loss"; unit=""; source="rlcPduPacketLossUl"; record=mean,vector);
75-
@signal[rlcPduPacketLossDl];
76-
@statistic[rlcPduPacketLossDl](title="rlc Packet Loss"; unit=""; source="rlcPduPacketLossDl"; record=mean,vector);
7763

7864
@signal[receivedPacketFromUpperLayer];
7965
@statistic[receivedPacketFromUpperLayer](source="receivedPacketFromUpperLayer"; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none);

src/simu5g/stack/rlc/um/LteRlcUmD2D.ned

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,7 @@ simple LteRlcUmD2D extends LteRlcUm
3030
@statistic[rlcDelayD2D](title="Delay at the rlc layer D2D"; unit="s"; source="rlcDelayD2D"; record=mean,vector);
3131
@signal[rlcThroughputD2D];
3232
@statistic[rlcThroughputD2D](title="Throughput at the rlc layer D2D"; unit="Bps"; source="rlcThroughputD2D"; record=mean,vector);
33-
@signal[rlcPacketLossD2D];
34-
@statistic[rlcPacketLossD2D](title="rlc Packet Loss"; unit=""; source="rlcPacketLossD2D"; record=mean,vector);
3533

36-
@signal[rlcCellPacketLossD2D];
37-
@statistic[rlcCellPacketLossD2D](title="rlc Cell Packet Loss"; unit=""; source="rlcCellPacketLossD2D"; record=mean,vector);
3834
@signal[rlcCellThroughputD2D];
3935
@statistic[rlcCellThroughputD2D](title="Cell Throughput at the rlc layer D2D"; unit="Bps"; source="rlcCellThroughputD2D"; record=mean,vector);
4036

@@ -43,7 +39,5 @@ simple LteRlcUmD2D extends LteRlcUm
4339
@statistic[rlcPduDelayD2D](title="Delay at the rlc layer D2D"; unit="s"; source="rlcPduDelayD2D"; record=mean,vector);
4440
@signal[rlcPduThroughputD2D];
4541
@statistic[rlcPduThroughputD2D](title="Throughput at the rlc layer D2D"; unit="Bps"; source="rlcPduThroughputD2D"; record=mean,vector);
46-
@signal[rlcPduPacketLossD2D];
47-
@statistic[rlcPduPacketLossD2D](title="rlc Packet Loss"; unit=""; source="rlcPduPacketLossD2D"; record=mean,vector);
4842
}
4943

src/simu5g/stack/rlc/um/UmRxEntity.cc

Lines changed: 8 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,14 @@ using namespace inet;
2323
unsigned int UmRxEntity::totalCellPduRcvdBytes_ = 0;
2424
unsigned int UmRxEntity::totalCellRcvdBytes_ = 0;
2525

26-
simsignal_t UmRxEntity::rlcPacketLossTotalSignal_ = registerSignal("rlcPacketLossTotal");
27-
28-
simsignal_t UmRxEntity::rlcCellPacketLossSignal_[2] = { cComponent::registerSignal("rlcCellPacketLossDl"), cComponent::registerSignal("rlcCellPacketLossUl") };
29-
simsignal_t UmRxEntity::rlcPacketLossSignal_[2] = { cComponent::registerSignal("rlcPacketLossDl"), cComponent::registerSignal("rlcPacketLossUl") };
30-
simsignal_t UmRxEntity::rlcPduPacketLossSignal_[2] = { cComponent::registerSignal("rlcPduPacketLossDl"), cComponent::registerSignal("rlcPduPacketLossUl") };
26+
// RLC-UM signals - only valid statistics (throughput and delay, no packet loss)
3127
simsignal_t UmRxEntity::rlcDelaySignal_[2] = { cComponent::registerSignal("rlcDelayDl"), cComponent::registerSignal("rlcDelayUl") };
3228
simsignal_t UmRxEntity::rlcThroughputSignal_[2] = { cComponent::registerSignal("rlcThroughputDl"), cComponent::registerSignal("rlcThroughputUl") };
3329
simsignal_t UmRxEntity::rlcPduDelaySignal_[2] = { cComponent::registerSignal("rlcPduDelayDl"), cComponent::registerSignal("rlcPduDelayUl") };
3430
simsignal_t UmRxEntity::rlcPduThroughputSignal_[2] = { cComponent::registerSignal("rlcPduThroughputDl"), cComponent::registerSignal("rlcPduThroughputUl") };
3531
simsignal_t UmRxEntity::rlcCellThroughputSignal_[2] = { cComponent::registerSignal("rlcCellThroughputDl"), cComponent::registerSignal("rlcCellThroughputUl") };
3632

37-
simsignal_t UmRxEntity::rlcPacketLossD2DSignal_ = registerSignal("rlcPacketLossD2D");
38-
simsignal_t UmRxEntity::rlcPduPacketLossD2DSignal_ = registerSignal("rlcPduPacketLossD2D");
33+
// D2D signals - only valid statistics (throughput and delay, no packet loss)
3934
simsignal_t UmRxEntity::rlcDelayD2DSignal_ = registerSignal("rlcDelayD2D");
4035
simsignal_t UmRxEntity::rlcThroughputD2DSignal_ = registerSignal("rlcThroughputD2D");
4136
simsignal_t UmRxEntity::rlcPduDelayD2DSignal_ = registerSignal("rlcPduDelayD2D");
@@ -256,65 +251,41 @@ void UmRxEntity::moveRxWindow(int pos)
256251
//void UmRxEntity::toPdcp(LteRlcSdu* rlcSdu)
257252
void UmRxEntity::toPdcp(Packet *pktAux)
258253
{
259-
260254
auto rlcSdu = pktAux->popAtFront<LteRlcSdu>();
261255
LteRlcUm *lteRlc = this->rlc_;
262256

263257
auto lteInfo = pktAux->getTag<FlowControlInfo>();
264-
unsigned int sno = rlcSdu->getSnoMainPacket();
265258
unsigned int length = pktAux->getByteLength();
266259
simtime_t ts = pktAux->getCreationTime();
267260

268261
// create a PDCP PDU and send it to the upper layer
269262
MacNodeId ueId;
270-
if (lteInfo->getDirection() == DL || lteInfo->getDirection() == D2D || lteInfo->getDirection() == D2D_MULTI) // This module is at a UE
263+
if (lteInfo->getDirection() == DL || lteInfo->getDirection() == D2D || lteInfo->getDirection() == D2D_MULTI)
271264
ueId = ownerNodeId_;
272265
else // UL. This module is at the eNB: get the node id of the sender
273266
ueId = lteInfo->getSourceId();
274267

275268
cModule *ue = binder_->getRlcByNodeId(ueId, UM);
276-
// check whether some PDCP PDUs have not been delivered
277-
while (sno > lastSnoDelivered_ + 1) {
278-
lastSnoDelivered_++;
279-
280-
if (nodeB_ != nullptr)
281-
nodeB_->emit(rlcCellPacketLossSignal_[dir_], 1.0);
282-
283-
// emit statistic: packet loss
284-
if (ue != nullptr) {
285-
if (lteInfo->getDirection() != D2D && lteInfo->getDirection() != D2D_MULTI)
286-
ue->emit(rlcPacketLossSignal_[dir_], 1.0);
287-
else
288-
ue->emit(rlcPacketLossD2DSignal_, 1.0);
289-
ue->emit(rlcPacketLossTotalSignal_, 1.0);
290-
}
291-
}
292-
// update the last sno delivered to the current sno
293-
lastSnoDelivered_ = sno;
294269

295-
// emit statistics
296270

271+
// emit statistics (throughput and delay only - no packet loss)
297272
totalCellRcvdBytes_ += length;
298273
totalRcvdBytes_ += length;
299274
double cellTputSample = (double)totalCellRcvdBytes_ / (NOW - getSimulation()->getWarmupPeriod());
300275
double tputSample = (double)totalRcvdBytes_ / (NOW - getSimulation()->getWarmupPeriod());
276+
301277
if (ue != nullptr) {
302278
if (lteInfo->getDirection() != D2D && lteInfo->getDirection() != D2D_MULTI) { // UE in IM
303279
ue->emit(rlcThroughputSignal_[dir_], tputSample);
304-
ue->emit(rlcPacketLossSignal_[dir_], 0.0);
305-
ue->emit(rlcPacketLossTotalSignal_, 0.0);
306280
ue->emit(rlcDelaySignal_[dir_], (NOW - ts).dbl());
307281
}
308282
else {
309283
ue->emit(rlcThroughputD2DSignal_, tputSample);
310-
ue->emit(rlcPacketLossD2DSignal_, 0.0);
311-
ue->emit(rlcPacketLossTotalSignal_, 0.0);
312284
ue->emit(rlcDelayD2DSignal_, (NOW - ts).dbl());
313285
}
314286
}
315287
if (nodeB_ != nullptr) {
316288
nodeB_->emit(rlcCellThroughputSignal_[dir_], cellTputSample);
317-
nodeB_->emit(rlcCellPacketLossSignal_[dir_], 0.0);
318289
}
319290

320291
EV << NOW << " UmRxEntity::toPdcp Created PDCP PDU with length " << pktAux->getByteLength() << " bytes" << endl;
@@ -368,7 +339,6 @@ void UmRxEntity::reassemble(unsigned int index)
368339
if (resetFlag_) {
369340
// by doing this, the first extracted SDU will be considered in order. For example, when D2D is enabled,
370341
// this helps to retrieve the synchronization between SNs at the tx and rx after a mode switch
371-
lastSnoDelivered_ = sduSno - 1;
372342
resetFlag_ = false;
373343
ignoreFragment = true;
374344
}
@@ -628,38 +598,12 @@ void UmRxEntity::reassemble(unsigned int index)
628598
received_.at(index) = false;
629599
EV << NOW << " UmRxEntity::reassemble Removed PDU from position " << index << endl;
630600

631-
// emit statistics
632-
MacNodeId ueId;
633-
if (lteInfo->getDirection() == DL || lteInfo->getDirection() == D2D || lteInfo->getDirection() == D2D_MULTI) // This module is at a UE
634-
ueId = ownerNodeId_;
635-
else // UL. This module is at the eNB: get the node id of the sender
636-
ueId = lteInfo->getSourceId();
601+
// RLC-UM reassembly complete - no statistics emission needed here
602+
// RLC PDU processing is successful at this point
637603

638-
cModule *ue = binder_->getRlcByNodeId(ueId, UM);
639-
// check whether some PDCP PDUs have not been delivered
640-
while (pduSno > lastPduReassembled_ + 1) {
641-
// emit statistic: packet loss
642-
if (lteInfo->getDirection() != D2D && lteInfo->getDirection() != D2D_MULTI) { // UE in IM
643-
ue->emit(rlcPduPacketLossSignal_[dir_], 1.0);
644-
}
645-
else {
646-
ue->emit(rlcPduPacketLossD2DSignal_, 1.0);
647-
}
648-
649-
lastPduReassembled_++;
650-
}
651-
652-
// update the last sno reassembled to the current sno
604+
// update the last PDU reassembled to the current PDU sequence number
653605
lastPduReassembled_ = pduSno;
654606

655-
// emit statistic: packet loss
656-
if (lteInfo->getDirection() != D2D && lteInfo->getDirection() != D2D_MULTI) { // UE in IM
657-
ue->emit(rlcPduPacketLossSignal_[dir_], 0.0);
658-
}
659-
else {
660-
ue->emit(rlcPduPacketLossD2DSignal_, 0.0);
661-
}
662-
663607
pktPdu->insertAtFront(pdu);
664608

665609
delete pktPdu;

src/simu5g/stack/rlc/um/UmRxEntity.h

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,13 @@ class UmRxEntity : public cSimpleModule
8080
unsigned int currentPduSno; // next PDU sequence number expected
8181
} buffered_;
8282

83-
// Sequence number of the last SDU delivered to the upper layer
84-
unsigned int lastSnoDelivered_ = 0;
85-
8683
// Sequence number of the last correctly reassembled PDU
8784
unsigned int lastPduReassembled_ = 0;
8885

8986
bool init_ = false;
9087

9188
// If true, the next PDU and the corresponding SDUs are considered in order
92-
// (modify the lastPduReassembled_ and lastSnoDelivered_ counters)
89+
// (modify the lastPduReassembled_ counter)
9390
// useful for D2D after a mode switch
9491
bool resetFlag_;
9592

@@ -113,26 +110,21 @@ class UmRxEntity : public cSimpleModule
113110
simtime_t t2_; // point in time the burst begins
114111
simtime_t t1_; // point in time last packet sent during burst
115112

116-
//Statistics
113+
//Statistics - RLC-UM only tracks throughput and delay (no packet loss based on PDCP sequence numbers)
117114
static unsigned int totalCellPduRcvdBytes_;
118115
static unsigned int totalCellRcvdBytes_;
119116
unsigned int totalPduRcvdBytes_;
120117
unsigned int totalRcvdBytes_;
121118
Direction dir_ = UNKNOWN_DIRECTION;
122-
static simsignal_t rlcCellPacketLossSignal_[2];
123-
static simsignal_t rlcPacketLossSignal_[2];
124-
static simsignal_t rlcPduPacketLossSignal_[2];
119+
120+
// Valid statistics for RLC-UM (throughput and delay)
125121
static simsignal_t rlcDelaySignal_[2];
126122
static simsignal_t rlcPduDelaySignal_[2];
127123
static simsignal_t rlcCellThroughputSignal_[2];
128124
static simsignal_t rlcThroughputSignal_[2];
129125
static simsignal_t rlcPduThroughputSignal_[2];
130126

131-
static simsignal_t rlcPacketLossTotalSignal_;
132-
133-
// statistics for D2D
134-
static simsignal_t rlcPacketLossD2DSignal_;
135-
static simsignal_t rlcPduPacketLossD2DSignal_;
127+
// statistics for D2D (throughput and delay only)
136128
static simsignal_t rlcDelayD2DSignal_;
137129
static simsignal_t rlcPduDelayD2DSignal_;
138130
static simsignal_t rlcThroughputD2DSignal_;

0 commit comments

Comments
 (0)