Skip to content

Commit 1c2d5f9

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 35507c1 commit 1c2d5f9

5 files changed

Lines changed: 165 additions & 315 deletions

File tree

src/simu5g/stack/packetFlowManager/PacketFlowManagerEnb.cc

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,12 @@ void PacketFlowManagerEnb::insertRlcPdu(LogicalCid lcid, const inet::Ptr<LteRlcU
263263
}
264264

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

272273
EV << "PacketFlowManagerEnb::insertRlcPdu - pdcpSdu " << pdcpSno << " with length: " << pdcpPduLength << " bytes" << endl;
273274
//
@@ -282,18 +283,12 @@ void PacketFlowManagerEnb::insertRlcPdu(LogicalCid lcid, const inet::Ptr<LteRlcU
282283
if (pit == desc->pdcpStatus_.end())
283284
throw cRuntimeError("%s::insertRlcPdu - PdcpStatus for PDCP sno [%d] not present, this should not happen", pfmType.c_str(), pdcpSno);
284285

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

src/simu5g/stack/packetFlowManager/PacketFlowManagerUe.cc

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

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

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

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

182-
if (idx == rlcPdu->getNumSdu() - 1) {
183-
// 01 or 11, lsb 1 (3GPP TS 36.322)
184-
// means -> Last byte of the Data field does not correspond to the last byte of a RLC SDU.
185-
if (fi.lastIsFragment) {
186-
pit->second.hasArrivedAll = false;
187-
}
188-
else {
189-
pit->second.hasArrivedAll = true;
190-
}
183+
// Since there's only one SDU per PDU, check if it's a fragment using FI
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;
191188
}
192189
else {
193190
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
@@ -31,8 +31,8 @@ class LteRlcDataPdu extends inet::FieldsChunk
3131
{
3232
chunkLength = inet::b(1);
3333

34-
inet::Packet* sdu[] @sizeGetter(getNumSdu) @owned;
35-
size_t sduSize[];
34+
inet::Packet* sdu @owned;
35+
size_t sduSize;
3636

3737
// Sequence number of the PDU
3838
unsigned int pduSequenceNumber = 0;
@@ -44,49 +44,51 @@ class LteRlcDataPdu extends inet::FieldsChunk
4444
cplusplus(LteRlcDataPdu) {{
4545
public:
4646
/**
47-
* pushSdu() gets ownership of the packet
48-
* and stores it inside the RLC SDU list
49-
* in back position
47+
* setSdu() gets ownership of the packet
48+
* and stores it as the single RLC SDU (with size)
5049
*
5150
* @param pkt packet to store
51+
* @param size size to store
5252
*/
53-
virtual void pushSdu(inet::Packet *pkt);
54-
virtual void pushSdu(inet::Packet *pkt, int size);
53+
virtual void setSdu(inet::Packet *pkt, int size);
5554

5655
/**
57-
* popSdu() pops a packet from the front of
58-
* the SDU list and drops ownership before
59-
* returning it
56+
* popSdu() returns the SDU packet and drops ownership
57+
* before returning it
6058
*
61-
* @return popped packet
59+
* @return the SDU packet
6260
*/
6361
virtual inet::Packet *popSdu(size_t& size);
62+
63+
/**
64+
* Check if PDU has an SDU
65+
*/
66+
virtual bool hasSdu() const;
6467
}}
6568

6669
cplusplus(cc) {{
6770

68-
void LteRlcDataPdu::pushSdu(inet::Packet *pkt)
69-
{
70-
pushSdu(pkt, pkt->getByteLength());
71-
}
7271

73-
void LteRlcDataPdu::pushSdu(inet::Packet *pkt, int size)
72+
73+
void LteRlcDataPdu::setSdu(inet::Packet *pkt, int size)
7474
{
75-
appendSdu(pkt);
76-
appendSduSize(size);
77-
ASSERT(getNumSdu() == 1);
75+
setSdu(pkt); // Use the auto-generated setter
76+
setSduSize(size);
7877
}
7978

8079
inet::Packet *LteRlcDataPdu::popSdu(size_t& size)
8180
{
82-
auto pkt = removeSdu(0);
83-
eraseSdu(0);
84-
85-
size = getSduSize(0);
86-
eraseSduSize(0);
81+
size = getSduSize();
82+
auto pkt = const_cast<inet::Packet*>(removeSdu());
83+
setSduSize(0);
8784
return pkt;
8885
}
8986

87+
bool LteRlcDataPdu::hasSdu() const
88+
{
89+
return getSdu() != nullptr;
90+
}
91+
9092
}}
9193

9294
//

0 commit comments

Comments
 (0)