EGPRS: Fix issue with row 4 of Table 10.4.14a.1 of 44.060 version 7.27.0 Release 7
row 4 of Table 10.4.14a.1 of Spec 44.060 version 7.27.0 Release 7. Says "The previous RLC data block contains a Upper Layer PDU, or a part of it, that fills precisely the previous data block and for which there is no length indicator in that RLC data block. The current RLC data block contains a Upper Layer PDU that either fills the current RLC data block precisely or continues in the next RLC data block." So when we receive block with 1st LI: value=0 and Value of E bit in the same octet as 1, we expect 2 chunks with 1st chunk as length as 0 and complete and 2nd chunk as length non zero. But with this bug we see only 1 chunk causing incorrect assembling This issue has been fixed in this patch. Related: OS#1811 Change-Id: I2cd0fca3ed28a553ede3f4b8a7d3267284dd2c9b
This commit is contained in:
parent
3463bd4adc
commit
22a901905c
|
@ -67,14 +67,11 @@ static int parse_extensions_egprs(const uint8_t *data, unsigned int data_len,
|
||||||
"but no more chunks possible\n");
|
"but no more chunks possible\n");
|
||||||
return -ENOSPC;
|
return -ENOSPC;
|
||||||
}
|
}
|
||||||
if (li->li == 0 && num_chunks == 0 && li->e == 0) {
|
if (li->li == 0 && num_chunks == 0) {
|
||||||
/* TS 44.060, table 10.4.14a.1, row 2a */
|
/* TS 44.060, table 10.4.14a.1, row 2a */
|
||||||
|
/* TS 44.060, table 10.4.14a.1, row 4 */
|
||||||
chunks[num_chunks].length = 0;
|
chunks[num_chunks].length = 0;
|
||||||
chunks[num_chunks].is_complete = true;
|
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;
|
|
||||||
} else if (li->li == 127 && li->e == 1) {
|
} else if (li->li == 127 && li->e == 1) {
|
||||||
/* TS 44.060, table 10.4.14a.1, row 3 & 5 */
|
/* TS 44.060, table 10.4.14a.1, row 3 & 5 */
|
||||||
/* only filling bytes left */
|
/* only filling bytes left */
|
||||||
|
|
|
@ -67,14 +67,18 @@ int gprs_rlcmac_ul_tbf::assemble_forward_llc(const gprs_rlc_data *_data)
|
||||||
for (i = 0; i < num_frames; i++) {
|
for (i = 0; i < num_frames; i++) {
|
||||||
frame = 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, "
|
LOGP(DRLCMACUL, LOGL_DEBUG, "-- Frame %d "
|
||||||
"length=%d, is_complete=%d\n",
|
"starts at offset %d, "
|
||||||
i + 1, frame->offset, frame->length, frame->is_complete);
|
"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.append_frame(data + frame->offset, frame->length);
|
||||||
m_llc.consume(frame->length);
|
m_llc.consume(frame->length);
|
||||||
|
}
|
||||||
|
|
||||||
if (frame->is_complete) {
|
if (frame->is_complete) {
|
||||||
/* send frame to SGSN */
|
/* send frame to SGSN */
|
||||||
|
|
|
@ -496,13 +496,6 @@ static void test_rlc_unit_decoder()
|
||||||
OSMO_ASSERT(chunks[2].length == 1);
|
OSMO_ASSERT(chunks[2].length == 1);
|
||||||
OSMO_ASSERT(!chunks[2].is_complete);
|
OSMO_ASSERT(!chunks[2].is_complete);
|
||||||
|
|
||||||
/*
|
|
||||||
* TODO: simulate 3GPP TS 44.060 version 7.27.0 Release 7
|
|
||||||
* row 4 of Table 10.4.14a.1
|
|
||||||
* should expect 2 chunks. but currently it fails
|
|
||||||
* due to bug. The assert will be fixed along with actual
|
|
||||||
* fix
|
|
||||||
*/
|
|
||||||
rdbi.e = 0;
|
rdbi.e = 0;
|
||||||
rdbi.ti = 0;
|
rdbi.ti = 0;
|
||||||
rdbi.cv = 1;
|
rdbi.cv = 1;
|
||||||
|
@ -512,17 +505,14 @@ static void test_rlc_unit_decoder()
|
||||||
num_chunks = Decoding::rlc_data_from_ul_data(&rdbi, cs, data,
|
num_chunks = Decoding::rlc_data_from_ul_data(&rdbi, cs, data,
|
||||||
chunks, ARRAY_SIZE(chunks), &tlli);
|
chunks, ARRAY_SIZE(chunks), &tlli);
|
||||||
|
|
||||||
/*
|
OSMO_ASSERT(num_chunks == 2);
|
||||||
* TODO: we expect 2 chunks here
|
|
||||||
* index 0 as complete and index 1 as incomplete
|
|
||||||
* due to current bug we see only 1 chunk
|
|
||||||
* assert for index 1 will be added in subsequent
|
|
||||||
* patch
|
|
||||||
*/
|
|
||||||
OSMO_ASSERT(num_chunks == 1);
|
|
||||||
OSMO_ASSERT(chunks[0].offset == 1);
|
OSMO_ASSERT(chunks[0].offset == 1);
|
||||||
OSMO_ASSERT(chunks[0].length == 43);
|
OSMO_ASSERT(chunks[0].length == 0);
|
||||||
OSMO_ASSERT(!chunks[0].is_complete);
|
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__);
|
printf("=== end %s ===\n", __func__);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1980,8 +1980,7 @@ static gprs_rlcmac_ul_tbf *tbf_li_decoding(BTS *the_bts,
|
||||||
data_msg[5] = 0x0;
|
data_msg[5] = 0x0;
|
||||||
pdch->rcv_block(data_msg, 49, *fn, &meas);
|
pdch->rcv_block(data_msg, 49, *fn, &meas);
|
||||||
|
|
||||||
/* TODO: should expect m_index as 43 */
|
OSMO_ASSERT(ul_tbf->m_llc.m_index == 43);
|
||||||
OSMO_ASSERT(ul_tbf->m_llc.m_index == 87);
|
|
||||||
|
|
||||||
return ul_tbf;
|
return ul_tbf;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6489,7 +6489,10 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=01 00 0
|
||||||
- Raising V(R) to 2
|
- Raising V(R) to 2
|
||||||
- Taking block 1 out, raising V(Q) to 2
|
- Taking block 1 out, raising V(Q) to 2
|
||||||
- Assembling frames: (len=44)
|
- 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
|
- 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 'TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS)', TA=7
|
||||||
Got MS: TLLI = 0xf1223344, TA = 7
|
Got MS: TLLI = 0xf1223344, TA = 7
|
||||||
|
|
Loading…
Reference in New Issue