mux_nr: improve logging when building UL MAC PDU

master
Andre Puschmann 4 years ago
parent 880bd66db4
commit 8024bf7820

@ -44,7 +44,7 @@ public:
uint32_t pid;
uint16_t rnti;
uint32_t tti;
uint32_t tbs;
uint32_t tbs; // transport block size in Bytes
} mac_nr_grant_ul_t;
/// For UL, payload buffer remains in MAC

@ -45,9 +45,11 @@ srsran::unique_byte_buffer_t mux_nr::get_pdu(uint32_t max_pdu_len)
// initialize MAC PDU
srsran::unique_byte_buffer_t phy_tx_pdu = srsran::make_byte_buffer();
if (phy_tx_pdu == nullptr) {
logger.error("Couldn't allocate PDU in %s().", __FUNCTION__);
return nullptr;
}
logger.debug("Building new MAC PDU (%d B)", max_pdu_len);
tx_pdu.init_tx(phy_tx_pdu.get(), max_pdu_len, true);
if (msg3_is_pending()) {
@ -84,7 +86,7 @@ srsran::unique_byte_buffer_t mux_nr::get_pdu(uint32_t max_pdu_len)
// Add SDU if RLC has something to tx
if (pdu_len > 0) {
rlc_buff->N_bytes = pdu_len;
logger.info(rlc_buff->msg, rlc_buff->N_bytes, "Read %d B from RLC", rlc_buff->N_bytes);
logger.debug(rlc_buff->msg, rlc_buff->N_bytes, "Read %d B from RLC", rlc_buff->N_bytes);
// add to MAC PDU and pack
if (tx_pdu.add_sdu(lc.lcid, rlc_buff->msg, rlc_buff->N_bytes) != SRSRAN_SUCCESS) {

Loading…
Cancel
Save