Skip to content

Commit faf1c8f

Browse files
committed
RlcUm: Remove the packet concatenation feature, as it has been dropped in NR
Make the sdu[] array into a simple Packet* pointer. The NR version of RLC-UM apparently no longer supports concatenation of frames like the LTE version did. We primarily want to simulate NR *faithfully*, and want to reduce code complexity. If our LTE sinumlations wont support concatenation, thats not a big loss. Failures: /simulations/lte/d2d/ -f omnetpp.ini -c SinglePair-modeSwitching-TCP -r 0 (some fingerprint mismatch: actual 'af32-f624/tplx;4094-ad1e/~tNl;19d3-cac1/sz', expected: '84ba-4c0e/tplx;2397-71d7/~tNl;5ce6-7fb0/sz') /simulations/lte/d2d/ -f omnetpp.ini -c SinglePair-TCP-D2D -r 0 (some fingerprint mismatch: actual 'bd6e-f89d/tplx;4b4b-28eb/~tNl;45b8-7ead/sz', expected: 'fc14-7d33/tplx;f180-9ce7/~tNl;9fd8-8ee6/sz') /simulations/lte/d2d/ -f omnetpp.ini -c SinglePair-TCP-Infra -r 0 (some fingerprint mismatch: actual '7739-6c73/tplx;8924-b181/~tNl;9f7e-6875/sz', expected: 'e869-80bc/tplx;941a-f243/~tNl;22e5-f0ad/sz') /simulations/lte/d2d/ -f omnetpp.ini -c MultiplePairs-TCP-Infra -r 0 (some fingerprint mismatch: actual '16c4-e5d3/tplx;048b-012f/~tNl;009c-aced/sz', expected: '7b57-e17c/tplx;16e7-ef30/~tNl;628c-4332/sz') /simulations/lte/d2d/ -f omnetpp.ini -c MultiplePairs-TCP-D2D -r 0 (some fingerprint mismatch: actual '56ed-9758/tplx;eca7-8a09/~tNl;074e-d28f/sz', expected: '8ccf-6a78/tplx;23a4-d6da/~tNl;f0fc-5d4a/sz') /simulations/lte/d2d/ -f omnetpp.ini -c MultiplePairs-TCP-D2D-wReuse -r 0 (some fingerprint mismatch: actual 'baa6-b47d/tplx;b7e7-aeb1/~tNl;ef0b-1117/sz', expected: '212b-5fd3/tplx;46fc-d54d/~tNl;dbff-460d/sz') /simulations/lte/d2d/ -f omnetpp.ini -c SinglePair-Validation -r 0 (some fingerprint mismatch: actual 'a2bc-e26c/tplx;d7bb-07a8/~tNl;c96b-ba9b/sz', expected: 'd19f-6158/tplx;a3d5-47a3/~tNl;83cd-2ccb/sz') /simulations/lte/test_handover/ -f omnetpp.ini -c FileTransfer-D2D -r 0 (some fingerprint mismatch: actual 'eee6-c633/tplx;0a3a-3616/~tNl;6efb-d137/sz', expected: 'd19a-6bb5/tplx;51d4-9e4e/~tNl;cb4a-63c8/sz') /simulations/lte/test_handover/ -f omnetpp.ini -c FileTransfer-DL_UL -r 0 (some fingerprint mismatch: actual 'f6c2-06cc/tplx;9a92-bcb1/~tNl;dd59-5398/sz', expected: '10c7-8a82/tplx;757d-1928/~tNl;8ccc-dd1c/sz') /simulations/lte/test_handover/ -f omnetpp.ini -c VoIP-DL -r 0 (some fingerprint mismatch: actual '4a6c-61e0/tplx;27ad-a6fe/~tNl;1dda-51ea/sz', expected: '0504-3fd4/tplx;27a9-76fe/~tNl;9a0c-090f/sz') /simulations/lte/test_handover/ -f omnetpp.ini -c VoIP-D2D -r 0 (some fingerprint mismatch: actual '4d51-c85c/tplx;16f9-6e31/~tNl;6d12-c7c7/sz', expected: '92ab-9520/tplx;0727-6df3/~tNl;7d5d-0c80/sz') /simulations/lte/test_handover/ -f omnetpp.ini -c VoIP-UL -r 0 (some fingerprint mismatch: actual 'a688-754e/tplx;a464-84ad/~tNl;65ae-97cb/sz', expected: '0f4d-80bf/tplx;38bc-ff7a/~tNl;648f-2154/sz') /simulations/lte/tutorial/ -f omnetpp.ini -c SingleCell-UL -r 0 (some fingerprint mismatch: actual 'bd39-ada3/tplx;311a-16c0/~tNl;a6a3-ab0d/sz', expected: 'b8a4-5f58/tplx;c931-a91a/~tNl;b8dd-b4f3/sz') /simulations/nr/d2d/ -f omnetpp.ini -c MultiplePairs-TCP-D2D -r 0 (some fingerprint mismatch: actual 'f6ce-953b/tplx;ce15-811a/~tNl;0c0b-e744/sz', expected: 'dadb-2d57/tplx;eecc-633e/~tNl;8e75-53a6/sz') /simulations/nr/d2d/ -f omnetpp.ini -c MultiplePairs-TCP-Infra -r 0 (some fingerprint mismatch: actual '1c62-1a8e/tplx;d6a6-c2da/~tNl;49cd-ae21/sz', expected: 'f26f-6e77/tplx;24d8-1559/~tNl;480b-6a23/sz') /simulations/nr/d2d/ -f omnetpp.ini -c MultiplePairs-TCP-D2D-wReuse -r 0 (some fingerprint mismatch: actual '5f60-8f6b/tplx;5ff5-30a1/~tNl;3b19-5ce6/sz', expected: 'bd89-d3e8/tplx;30ad-ffa5/~tNl;0e7f-6c21/sz') /simulations/nr/d2d/ -f omnetpp.ini -c SinglePair-modeSwitching-TCP -r 0 (some fingerprint mismatch: actual '0cd6-c96d/tplx;c5aa-151e/~tNl;ffa7-1f4c/sz', expected: 'd3d1-e332/tplx;8597-c1f9/~tNl;571d-9784/sz') /simulations/nr/d2d/ -f omnetpp.ini -c SinglePair-modeSwitching-UDP -r 0 (some fingerprint mismatch: actual '2b8e-1b2c/tplx;1d9e-435c/~tNl;b55f-9aa5/sz', expected: 'b721-c052/tplx;2bc1-af23/~tNl;4d10-cc86/sz') /simulations/nr/d2d/ -f omnetpp.ini -c MultiplePairs-UDP-D2D -r 0 (some fingerprint mismatch: actual '61c0-4e7b/tplx;109a-eef5/~tNl;bb0e-eef3/sz', expected: '04f4-b3d9/tplx;a3c4-cf74/~tNl;1219-806c/sz') /simulations/nr/d2d/ -f omnetpp.ini -c SinglePair-TCP-Infra -r 0 (some fingerprint mismatch: actual 'd4bb-5a2d/tplx;d46b-5012/~tNl;7ccc-03a9/sz', expected: '2e6b-f0a2/tplx;45f8-118a/~tNl;583d-cbd7/sz') /simulations/nr/d2d/ -f omnetpp.ini -c SinglePair-TCP-D2D -r 0 (some fingerprint mismatch: actual '2ffb-0786/tplx;c768-7e2a/~tNl;009a-b697/sz', expected: '5ab1-923a/tplx;27ae-f313/~tNl;de82-3cbd/sz') /simulations/nr/d2d/ -f omnetpp.ini -c MultiplePairs-UDP-D2D-wReuse -r 0 (some fingerprint mismatch: actual '03b5-85c8/tplx;252f-96e1/~tNl;6fc4-129e/sz', expected: '13eb-51e9/tplx;adc9-b531/~tNl;0a68-6959/sz') /simulations/nr/d2d/ -f omnetpp.ini -c SinglePair-UDP-D2D -r 0 (some fingerprint mismatch: actual '9d13-b055/tplx;54a5-d877/~tNl;c3ff-8873/sz', expected: '3570-8aeb/tplx;4088-dab5/~tNl;88a8-91fd/sz') /simulations/nr/d2d/ -f omnetpp.ini -c SinglePair-UDP-Infra -r 0 (some fingerprint mismatch: actual '65e6-6e9d/tplx;ded0-d434/~tNl;484b-55cf/sz', expected: '68c0-04a2/tplx;e0aa-31d2/~tNl;a283-5224/sz') /simulations/lte/demo/ -f omnetpp.ini -c CBR-UL -r 5 (some fingerprint mismatch: actual '4187-eba5/tplx;2148-10e6/~tNl;6fdd-be32/sz', expected: 'ba20-1cd6/tplx;5caa-75f5/~tNl;91f7-d162/sz') /simulations/lte/demo/ -f omnetpp.ini -c SchedulersTest -r 12 (some fingerprint mismatch: actual 'a0c9-88f9/tplx;9429-8728/~tNl;ab84-35f4/sz', expected: '1276-9dac/tplx;85ed-1dc1/~tNl;b078-47f1/sz') /simulations/lte/demo/ -f omnetpp.ini -c SchedulersTest -r 0 (some fingerprint mismatch: actual 'c2c8-6abc/tplx;ec1f-aa12/~tNl;0ae3-fb2d/sz', expected: '5cf3-9e11/tplx;ea4d-5c4b/~tNl;a79e-32af/sz') /simulations/nr/d2d/ -f omnetpp.ini -c MultiplePairs-UDP-Infra -r 0 (some fingerprint mismatch: actual 'f1c6-985f/tplx;bbf5-11fb/~tNl;d181-1d81/sz', expected: '7160-acef/tplx;56c3-4be3/~tNl;57c3-53fc/sz') /simulations/nr/mec/multiMecHost/ -f omnetpp.ini -c MultiMec -r 0 (some fingerprint mismatch: actual '1981-bf20/tplx;7adc-2779/~tNl;56d1-d95b/sz', expected: '3e58-a38a/tplx;7e7a-c2e9/~tNl;6476-c7f6/sz') /simulations/nr/mec/rnisTest/ -f omnetpp.ini -c RnisTest -r 0 (some fingerprint mismatch: actual '20fe-ab6c/tplx;109f-a3ff/~tNl;fe3c-5e0f/sz', expected: 'f0a7-cc5d/tplx;2f5f-768e/~tNl;4f90-7bdf/sz') /simulations/nr/mec/singleMecHost/ -f omnetpp.ini -c BgGeneratorApp -r 0 (some fingerprint mismatch: actual '0c6a-fb4d/tplx;57fe-a680/~tNl', expected: '3935-1346/tplx;86a6-e080/~tNl') /simulations/nr/mec/singleMecHost/ -f omnetpp.ini -c LoadGenerator -r 0 (some fingerprint mismatch: actual '4734-a929/tplx;e056-a3fb/~tNl', expected: 'a733-9d72/tplx;2b01-d5d6/~tNl') /simulations/nr/mec/singleMecHost/ -f omnetpp.ini -c SingleMec -r 0 (some fingerprint mismatch: actual 'd353-804a/tplx;c969-fd79/~tNl', expected: '9ae9-3fbd/tplx;5f2b-db50/~tNl') /simulations/nr/mec/singleMecHost/ -f omnetpp.ini -c OneFg_NindependentMecApps -r 0 (some fingerprint mismatch: actual '106c-2d15/tplx;a1a9-721c/~tNl', expected: '1cbb-de52/tplx;6245-83ad/~tNl') /simulations/nr/standalone_multicell/ -f omnetpp.ini -c CBR-DL -r 0 (some fingerprint mismatch: actual '75e6-34c3/tplx;120f-e6ed/~tNl;37ee-96c3/sz', expected: 'f70c-4c61/tplx;b3c2-e460/~tNl;e907-139f/sz') /simulations/nr/mec/singleMecHost/ -f omnetpp.ini -c ThreeFg_NindependentMecApps -r 0 (some fingerprint mismatch: actual '9078-b98f/tplx;55f5-50ed/~tNl', expected: '7da7-89e3/tplx;b7ee-3669/~tNl') /simulations/nr/mec/multiOperator/ -f omnetpp.ini -c MultiOperator_MultiMec -r 0 (some fingerprint mismatch: actual '6c7d-ba3e/tplx;df5e-154c/~tNl;bd6b-7103/sz', expected: 'd8f4-f693/tplx;1499-2b16/~tNl;db6a-0f90/sz') /simulations/nr/mec/multiOperator/ -f omnetpp.ini -c MultiOperator_SingleMec -r 0 (some fingerprint mismatch: actual 'c8eb-171c/tplx;bc87-19fd/~tNl;a44d-21d4/sz', expected: '79b7-8dc4/tplx;6dcd-af12/~tNl;4725-efb5/sz') /simulations/nr/test_multiCarrier/ -f omnetpp.ini -c SingleCarrier-CBR-DL -r 0 (some fingerprint mismatch: actual '3825-0e83/tplx;d98a-fc0f/~tNl;d774-1fc4/sz', expected: '4521-db69/tplx;8d19-b671/~tNl;1685-860b/sz') /simulations/nr/test_tdd/ -f omnetpp.ini -c TestTdd -r 0 (some fingerprint mismatch: actual '6047-51f1/tplx;99e4-e080/~tNl;77cf-22b0/sz', expected: '4799-d648/tplx;9d02-1496/~tNl;0fe6-0364/sz') /simulations/nr/test_numerology/ -f omnetpp.ini -c MultiCell-CBR-DL -r 0 (some fingerprint mismatch: actual '75f9-b0a7/tplx;f517-a7c2/~tNl;6465-8e69/sz', expected: '05d7-7d70/tplx;d384-e6f6/~tNl;5d85-9897/sz') /simulations/nr/test_multiCarrier/ -f omnetpp.ini -c SingleCarrier-CBR-UL -r 0 (some fingerprint mismatch: actual '2a7a-51d3/tplx;6083-aea5/~tNl;c0a7-7b90/sz', expected: 'd9bf-a2bf/tplx;ba84-6119/~tNl;355c-b3cb/sz') /simulations/nr/test_numerology/ -f omnetpp.ini -c SingleCell-CBR-UL -r 0 (some fingerprint mismatch: actual 'c7cd-6ddc/tplx;6197-6d6d/~tNl;ed5c-aee2/sz', expected: '0dbe-139f/tplx;6ea8-3e1a/~tNl;fecc-224b/sz') /simulations/nr/test_numerology/ -f omnetpp.ini -c MultiCell-CBR-UL -r 0 (some fingerprint mismatch: actual 'ee5f-2956/tplx;284e-0325/~tNl;e63a-8fe7/sz', expected: '3d27-c61c/tplx;6ea1-c40a/~tNl;3036-ef0c/sz') /simulations/nr/test_multiCarrier/ -f omnetpp.ini -c MultiCarrier-CBR-UL -r 0 (some fingerprint mismatch: actual '291b-1ab9/tplx;ec05-a97f/~tNl;dcc1-5c4d/sz', expected: '0770-3300/tplx;7910-d256/~tNl;2688-1ed9/sz') ---------------------------------------------------------------------- Ran 118 tests in 132.555s FAILED (failures=45)
1 parent b9d5929 commit faf1c8f

5 files changed

Lines changed: 165 additions & 315 deletions

File tree

src/simu5g/stack/packetFlowObserver/PacketFlowObserverEnb.cc

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,12 @@ void PacketFlowObserverEnb::insertRlcPdu(LogicalCid lcid, const inet::Ptr<LteRlc
265265
}
266266

267267
FramingInfo fi = rlcPdu->getFramingInfo();
268-
for (size_t idx = 0; idx < rlcPdu->getNumSdu(); ++idx) {
269-
auto sduPacket = rlcPdu->getSdu(idx);
268+
// NR-style: handle single SDU per PDU (no concatenation)
269+
if (rlcPdu->hasSdu()) {
270+
auto sduPacket = rlcPdu->getSdu();
270271
auto pdcpTag = sduPacket->getTag<PdcpTrackingTag>();
271272
unsigned int pdcpSno = pdcpTag->getPdcpSequenceNumber();
272-
size_t pdcpPduLength = rlcPdu->getSduSize(idx); // TODO fix with size of the chunk!!
273+
size_t pdcpPduLength = rlcPdu->getSduSize(); // single SDU size
273274

274275
EV << "PacketFlowObserverEnb::insertRlcPdu - pdcpSdu " << pdcpSno << " with length: " << pdcpPduLength << " bytes" << endl;
275276
//
@@ -284,18 +285,12 @@ void PacketFlowObserverEnb::insertRlcPdu(LogicalCid lcid, const inet::Ptr<LteRlc
284285
if (pit == desc->pdcpStatus_.end())
285286
throw cRuntimeError("%s::insertRlcPdu - PdcpStatus for PDCP sno [%d] not present, this should not happen", pfmType.c_str(), pdcpSno);
286287

287-
// last pdcp
288-
if (idx == rlcPdu->getNumSdu() - 1) {
289-
// 01 or 11, lsb 1 (3GPP TS 36.322)
290-
// means -> Last byte of the Data field does not correspond to the last byte of a RLC SDU.
291-
if (fi.lastIsFragment) {
292-
pit->second.hasArrivedAll = false;
293-
}
294-
else {
295-
pit->second.hasArrivedAll = true;
296-
}
288+
// Since there's only one SDU per PDU, check if it's a fragment using FI
289+
// 01 or 11, lsb 1 (3GPP TS 36.322)
290+
// means -> Last byte of the Data field does not correspond to the last byte of a RLC SDU.
291+
if (fi.lastIsFragment) {
292+
pit->second.hasArrivedAll = false;
297293
}
298-
// since it is not the last part of the rlc, this pdcp has been entirely inserted in RLCs
299294
else {
300295
pit->second.hasArrivedAll = true;
301296
}

src/simu5g/stack/packetFlowObserver/PacketFlowObserverUe.cc

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,12 @@ void PacketFlowObserverUe::insertRlcPdu(LogicalCid lcid, const inet::Ptr<LteRlcU
161161
EV_FATAL << NOW << "node id " << num(desc->nodeId_) - 1025 << " " << pfmType << "::insertRlcPdu - Logical CID " << lcid << endl;
162162

163163
FramingInfo fi = rlcPdu->getFramingInfo();
164-
for (size_t idx = 0; idx < rlcPdu->getNumSdu(); ++idx) {
165-
auto sduPacket = rlcPdu->getSdu(idx);
164+
// NR-style: handle single SDU per PDU (no concatenation)
165+
if (rlcPdu->hasSdu()) {
166+
auto sduPacket = rlcPdu->getSdu();
166167
auto pdcpTag = sduPacket->getTag<PdcpTrackingTag>();
167168
unsigned int pdcpSno = pdcpTag->getPdcpSequenceNumber();
168-
size_t pdcpPduLength = rlcPdu->getSduSize(idx); // TODO fix with size of the chunk!!
169+
size_t pdcpPduLength = rlcPdu->getSduSize(); // single SDU size
169170

170171
EV << pfmType << "::insertRlcPdu - pdcpSdu " << pdcpSno << " with length: " << pdcpPduLength << " bytes" << endl;
171172

@@ -180,15 +181,11 @@ void PacketFlowObserverUe::insertRlcPdu(LogicalCid lcid, const inet::Ptr<LteRlcU
180181
if (pit == desc->pdcpStatus_.end())
181182
throw cRuntimeError("%s::insertRlcPdu - PdcpStatus for PDCP sno [%d] not present, this should not happen", pfmType.c_str(), pdcpSno);
182183

183-
if (idx == rlcPdu->getNumSdu() - 1) {
184-
// 01 or 11, lsb 1 (3GPP TS 36.322)
185-
// means -> Last byte of the Data field does not correspond to the last byte of a RLC SDU.
186-
if (fi.lastIsFragment) {
187-
pit->second.hasArrivedAll = false;
188-
}
189-
else {
190-
pit->second.hasArrivedAll = true;
191-
}
184+
// Since there's only one SDU per PDU, check if it's a fragment using FI
185+
// 01 or 11, lsb 1 (3GPP TS 36.322)
186+
// means -> Last byte of the Data field does not correspond to the last byte of a RLC SDU.
187+
if (fi.lastIsFragment) {
188+
pit->second.hasArrivedAll = false;
192189
}
193190
else {
194191
pit->second.hasArrivedAll = true;

src/simu5g/stack/rlc/packet/LteRlcPdu.msg

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ class LteRlcDataPdu extends inet::FieldsChunk
3434
{
3535
chunkLength = inet::b(1);
3636

37-
inet::Packet* sdu[] @sizeGetter(getNumSdu) @owned;
38-
size_t sduSize[];
37+
inet::Packet* sdu @owned;
38+
size_t sduSize;
3939

4040
// Sequence number of the PDU
4141
unsigned int pduSequenceNumber = 0;
@@ -47,33 +47,33 @@ class LteRlcDataPdu extends inet::FieldsChunk
4747
cplusplus(LteRlcDataPdu) {{
4848
public:
4949
/**
50-
* pushSdu() gets ownership of the packet
51-
* and stores it inside the RLC SDU list
52-
* in back position
50+
* setSdu() gets ownership of the packet
51+
* and stores it as the single RLC SDU (with size)
5352
*
5453
* @param pkt packet to store
54+
* @param size size to store
5555
*/
56-
virtual void pushSdu(inet::Packet *pkt);
57-
virtual void pushSdu(inet::Packet *pkt, int size);
56+
virtual void setSdu(inet::Packet *pkt, int size);
5857

5958
/**
60-
* popSdu() pops a packet from the front of
61-
* the SDU list and drops ownership before
62-
* returning it
59+
* popSdu() returns the SDU packet and drops ownership
60+
* before returning it
6361
*
64-
* @return popped packet
62+
* @return the SDU packet
6563
*/
6664
virtual inet::Packet *popSdu(size_t& size);
65+
66+
/**
67+
* Check if PDU has an SDU
68+
*/
69+
virtual bool hasSdu() const;
6770
}}
6871

6972
cplusplus(cc) {{
7073

71-
void LteRlcDataPdu::pushSdu(inet::Packet *pkt)
72-
{
73-
pushSdu(pkt, pkt->getByteLength());
74-
}
7574

76-
void LteRlcDataPdu::pushSdu(inet::Packet *pkt, int size)
75+
76+
void LteRlcDataPdu::setSdu(inet::Packet *pkt, int size)
7777
{
7878
// Clear tags to make sure they are not "tunnelled" over to the receiver node and "accidentally"
7979
// used there -- with the exception of PdcpTrackingTag, as RLC-UM (UmRxEntity.cc) still refers to it.
@@ -82,21 +82,23 @@ void LteRlcDataPdu::pushSdu(inet::Packet *pkt, int size)
8282
if (pdcpTag != nullptr)
8383
*pkt->addTag<PdcpTrackingTag>() = *pdcpTag;
8484

85-
appendSdu(pkt);
86-
appendSduSize(size);
87-
ASSERT(getNumSdu() == 1);
85+
setSdu(pkt); // Use the auto-generated setter
86+
setSduSize(size);
8887
}
8988

9089
inet::Packet *LteRlcDataPdu::popSdu(size_t& size)
9190
{
92-
auto pkt = removeSdu(0);
93-
eraseSdu(0);
94-
95-
size = getSduSize(0);
96-
eraseSduSize(0);
91+
size = getSduSize();
92+
auto pkt = const_cast<inet::Packet*>(removeSdu());
93+
setSduSize(0);
9794
return pkt;
9895
}
9996

97+
bool LteRlcDataPdu::hasSdu() const
98+
{
99+
return getSdu() != nullptr;
100+
}
101+
100102
}}
101103

102104
//

0 commit comments

Comments
 (0)