Skip to content

Commit 2d4c1cb

Browse files
robertfalkenbergcodebot
authored andcommitted
rlc_tx_am: correct si field of last ReTx segment
1 parent fa31ea6 commit 2d4c1cb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/rlc/rlc_tx_am_entity.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,8 @@ byte_buffer_chain rlc_tx_am_entity::build_retx_pdu(uint32_t grant_len)
400400

401401
// Compute maximum payload length
402402
uint32_t retx_payload_len = std::min(retx.length, grant_len - expected_hdr_len);
403-
bool sdu_complete = retx_payload_len == retx.length;
403+
bool retx_complete = retx_payload_len == retx.length;
404+
bool sdu_complete = retx.so + retx_payload_len >= sdu_info.sdu.length();
404405

405406
// Configure SI
406407
rlc_si_field si = rlc_si_field::full_sdu;
@@ -430,7 +431,7 @@ byte_buffer_chain rlc_tx_am_entity::build_retx_pdu(uint32_t grant_len)
430431

431432
// Update RETX queue. This must be done before calculating
432433
// the polling bit, to make sure the poll bit is calculated correctly
433-
if (sdu_complete) {
434+
if (retx_complete) {
434435
// remove RETX from queue
435436
retx_queue.pop();
436437
} else {

0 commit comments

Comments
 (0)