From 9009c3439c4cf27dbd22e7fd029580f60a133dff Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Mon, 19 Apr 2021 10:44:59 +0200 Subject: [PATCH] rlc_um_nr: convert log entries to info if they are expected dropping a PDU and not being able to build a PDU if the grant is too small is expected and should therefore not cause a log warning. --- lib/src/upper/rlc_um_nr.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/src/upper/rlc_um_nr.cc b/lib/src/upper/rlc_um_nr.cc index 03f7bf4da..b02060334 100644 --- a/lib/src/upper/rlc_um_nr.cc +++ b/lib/src/upper/rlc_um_nr.cc @@ -156,10 +156,10 @@ int rlc_um_nr::rlc_um_nr_tx::build_data_pdu(unique_byte_buffer_t pdu, uint8_t* p // Calculate actual header length uint32_t head_len = rlc_um_nr_packed_length(header); if (pdu_space <= head_len + 1) { - logger.warning("%s Cannot build a PDU - %d bytes available, %d bytes required for header", - rb_name.c_str(), - nof_bytes, - head_len); + logger.info("%s Cannot build a PDU - %d bytes available, %d bytes required for header", + rb_name.c_str(), + nof_bytes, + head_len); return 0; } @@ -287,7 +287,7 @@ void rlc_um_nr::rlc_um_nr_rx::timer_expired(uint32_t timeout_id) if (reassembly_timer.id() == timeout_id) { logger.info("%s reassembly timeout expiry - updating RX_Next_Reassembly and reassembling", rb_name.c_str()); - logger.warning("Lost PDU SN: %d", RX_Next_Reassembly); + logger.info("Lost PDU SN=%d", RX_Next_Reassembly); metrics.num_lost_pdus++; if (rx_sdu != nullptr) { @@ -341,8 +341,8 @@ unique_byte_buffer_t rlc_um_nr::rlc_um_nr_rx::rlc_um_nr_strip_pdu_header(const r const uint32_t nof_bytes) { unique_byte_buffer_t sdu = make_byte_buffer(); - if (!sdu) { - logger.error("Discarting packet: no space in buffer pool"); + if (sdu == nullptr) { + logger.error("Couldn't allocate PDU in %s().", __FUNCTION__); return nullptr; } memcpy(sdu->msg, payload, nof_bytes);