From e2d26b5a8cd83b04ea23bb58cccf628ff1105618 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 20 Oct 2021 14:45:28 +0200 Subject: [PATCH] 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 --- lib/src/rlc/rlc_um_nr.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/src/rlc/rlc_um_nr.cc b/lib/src/rlc/rlc_um_nr.cc index 9ec8032ea..72316f3de 100644 --- a/lib/src/rlc/rlc_um_nr.cc +++ b/lib/src/rlc/rlc_um_nr.cc @@ -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();