rlc_um_nr: log PDU without SN if full SDU is transmitted

PDUs that contain full SDUs don't have SNs, so the log should be
without it
This commit is contained in:
Andre Puschmann 2021-10-20 14:45:28 +02:00
parent 3eb1862ab9
commit e2d26b5a8c
1 changed files with 6 additions and 1 deletions

View File

@ -199,7 +199,12 @@ uint32_t rlc_um_nr::rlc_um_nr_tx::build_data_pdu(unique_byte_buffer_t pdu, uint8
srsran_expect(
ret <= nof_bytes, "Error while packing MAC PDU (more bytes written (%d) than expected (%d)!", ret, nof_bytes);
logger.info(payload, ret, "%s Tx PDU SN=%d (%d B)", rb_name.c_str(), header.sn, pdu->N_bytes);
if (header.si == rlc_nr_si_field_t::full_sdu) {
// log without SN
logger.info(payload, ret, "%s Tx PDU (%d B)", rb_name.c_str(), pdu->N_bytes);
} else {
logger.info(payload, ret, "%s Tx PDU SN=%d (%d B)", rb_name.c_str(), header.sn, pdu->N_bytes);
}
debug_state();