This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
arvind.sirsikar gerrit-no-reply at lists.osmocom.org
Review at https://gerrit.osmocom.org/826
EGPRS: Adds support of row 4 of Table 10.4.14a.1 of 44.060
Earlier there was no proper handling row 4 of Table 10.4.14a.1 of 44.060.
Which has been fixed in this patch.
Related: OS#1811
Change-Id: I2cd0fca3ed28a553ede3f4b8a7d3267284dd2c9b
---
M src/decoding.cpp
M src/tbf_ul.cpp
M tests/edge/EdgeTest.cpp
M tests/tbf/TbfTest.cpp
M tests/tbf/TbfTest.err
5 files changed, 26 insertions(+), 25 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/26/826/1
diff --git a/src/decoding.cpp b/src/decoding.cpp
index 7c00ff7..515a75c 100644
--- a/src/decoding.cpp
+++ b/src/decoding.cpp
@@ -73,8 +73,8 @@
chunks[num_chunks].is_complete = true;
} else if (li->li == 0 && num_chunks == 0 && li->e == 1) {
/* TS 44.060, table 10.4.14a.1, row 4 */
- chunks[num_chunks].length = LENGTH_TO_END;
- chunks[num_chunks].is_complete = is_last_block;
+ chunks[num_chunks].length = 0;
+ chunks[num_chunks].is_complete = true;
} else if (li->li == 127 && li->e == 1) {
/* TS 44.060, table 10.4.14a.1, row 3 & 5 */
/* only filling bytes left */
diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp
index 7e0732c..f67ffd7 100644
--- a/src/tbf_ul.cpp
+++ b/src/tbf_ul.cpp
@@ -67,14 +67,18 @@
for (i = 0; i < num_frames; i++) {
frame = frames + i;
- bts->rlc_ul_payload_bytes(frame->length);
+ if (frame->length) {
+ bts->rlc_ul_payload_bytes(frame->length);
- LOGP(DRLCMACUL, LOGL_DEBUG, "-- Frame %d starts at offset %d, "
- "length=%d, is_complete=%d\n",
- i + 1, frame->offset, frame->length, frame->is_complete);
+ LOGP(DRLCMACUL, LOGL_DEBUG, "-- Frame %d "
+ "starts at offset %d, "
+ "length=%d, is_complete=%d\n",
+ i + 1, frame->offset, frame->length,
+ frame->is_complete);
- m_llc.append_frame(data + frame->offset, frame->length);
- m_llc.consume(frame->length);
+ m_llc.append_frame(data + frame->offset, frame->length);
+ m_llc.consume(frame->length);
+ }
if (frame->is_complete) {
/* send frame to SGSN */
diff --git a/tests/edge/EdgeTest.cpp b/tests/edge/EdgeTest.cpp
index 06153b9..3537aa7 100644
--- a/tests/edge/EdgeTest.cpp
+++ b/tests/edge/EdgeTest.cpp
@@ -496,31 +496,24 @@
OSMO_ASSERT(chunks[2].length == 1);
OSMO_ASSERT(!chunks[2].is_complete);
- /*
- * TODO: simulate row 4 of Table 10.4.14a.1
- * should expect 1 complete. but currently it fails
- * due to bug. The assert will be fixed along with actual
- * fix
- */
rdbi.e = 0;
rdbi.ti = 0;
- rdbi.cv = 0;
+ rdbi.cv = 1;
tlli = 0;
offs = 0;
data[offs++] = 1;
num_chunks = Decoding::rlc_data_from_ul_data(&rdbi, cs, data,
chunks, ARRAY_SIZE(chunks), &tlli);
- /* TODO: we should see 2 chunks here */
- OSMO_ASSERT(num_chunks == 1);
+ OSMO_ASSERT(num_chunks == 2);
OSMO_ASSERT(chunks[0].offset == 1);
- /*
- * TODO: it should be complete
- * and length as 0
- */
- OSMO_ASSERT(chunks[0].length == 43);
+ OSMO_ASSERT(chunks[0].length == 0);
OSMO_ASSERT(chunks[0].is_complete);
+ OSMO_ASSERT(chunks[1].offset == 1);
+ OSMO_ASSERT(chunks[1].length == 43);
+ OSMO_ASSERT(!chunks[1].is_complete);
+
printf("=== end %s ===\n", __func__);
}
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index b00c49e..81a41bf 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -727,12 +727,13 @@
egprs3->rsb = 0;
egprs3->spb = 0;
egprs3->pi = 0;
+
+ /* row 4 of Table 10.4.14a.1 */
data_msg[4] = 0x2;
data_msg[5] = 0x0;
pdch->rcv_block(data_msg, 49, *fn, &meas);
- /* TODO: should expect m_index as 43 */
- OSMO_ASSERT(ul_tbf->m_llc.m_index == 87);
+ OSMO_ASSERT(ul_tbf->m_llc.m_index == 43);
return ul_tbf;
}
diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err
index aceb9b4..18ca207 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -6463,7 +6463,10 @@
- Raising V(R) to 2
- Taking block 1 out, raising V(Q) to 2
- Assembling frames: (len=44)
--- Frame 1 starts at offset 1, length=43, is_complete=0
+TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) complete UL frame len=44
+LLC [PCU -> SGSN] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) len=44
+No bctx
+-- Frame 2 starts at offset 1, length=43, is_complete=0
- No gaps in received block, last block: BSN=1 CV=7
Got 'TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)', TA=7
Got MS: TLLI = 0xf1223344, TA = 7
--
To view, visit https://gerrit.osmocom.org/826
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2cd0fca3ed28a553ede3f4b8a7d3267284dd2c9b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: arvind.sirsikar <arvind.sirsikar at radisys.com>