rlc_am: reduce log level when provided PDU size is too small

This commit is contained in:
Andre Puschmann 2019-06-25 18:37:17 +02:00
parent a3d95c8370
commit 0012868e91
2 changed files with 9 additions and 9 deletions

View File

@ -445,7 +445,7 @@ void rlc::add_bearer(uint32_t lcid, srslte_rlc_config_t cnfg)
rlc_log->error("Error inserting RLC entity in to array\n."); rlc_log->error("Error inserting RLC entity in to array\n.");
goto delete_and_exit; goto delete_and_exit;
} }
rlc_log->warning("Added radio bearer %s in %s\n", rrc->get_rb_name(lcid).c_str(), rlc_mode_text[cnfg.rlc_mode]); rlc_log->info("Added radio bearer %s in %s\n", rrc->get_rb_name(lcid).c_str(), rlc_mode_text[cnfg.rlc_mode]);
goto unlock_and_exit; goto unlock_and_exit;
} else { } else {
rlc_log->warning("Bearer %s already created.\n", rrc->get_rb_name(lcid).c_str()); rlc_log->warning("Bearer %s already created.\n", rrc->get_rb_name(lcid).c_str());

View File

@ -542,8 +542,7 @@ int rlc_am::rlc_am_tx::build_status_pdu(uint8_t *payload, uint32_t nof_bytes)
debug_state(); debug_state();
pdu_len = rlc_am_write_status_pdu(&tx_status, payload); pdu_len = rlc_am_write_status_pdu(&tx_status, payload);
} else{ } else{
log->warning("%s Cannot tx status PDU - %d bytes available, %d bytes required\n", log->info("%s Cannot tx status PDU - %d bytes available, %d bytes required\n", RB_NAME, nof_bytes, pdu_len);
RB_NAME, nof_bytes, pdu_len);
pdu_len = 0; pdu_len = 0;
} }
@ -672,8 +671,10 @@ int rlc_am::rlc_am_tx::build_segment(uint8_t *payload, uint32_t nof_bytes, rlc_a
} }
if (nof_bytes <= head_len) { if (nof_bytes <= head_len) {
log->warning("%s Cannot build a PDU segment - %d bytes available, %d bytes required for header\n", log->info("%s Cannot build a PDU segment - %d bytes available, %d bytes required for header\n",
RB_NAME, nof_bytes, head_len); RB_NAME,
nof_bytes,
head_len);
return 0; return 0;
} }
@ -823,10 +824,9 @@ int rlc_am::rlc_am_tx::build_data_pdu(uint8_t *payload, uint32_t nof_bytes)
uint32_t pdu_space = SRSLTE_MIN(nof_bytes, pdu->get_tailroom()); uint32_t pdu_space = SRSLTE_MIN(nof_bytes, pdu->get_tailroom());
uint8_t *pdu_ptr = pdu->msg; uint8_t *pdu_ptr = pdu->msg;
if(pdu_space <= head_len + 1) if (pdu_space <= head_len + 1) {
{ log->info(
log->warning("%s Cannot build a PDU - %d bytes available, %d bytes required for header\n", "%s Cannot build a PDU - %d bytes available, %d bytes required for header\n", RB_NAME, nof_bytes, head_len);
RB_NAME, nof_bytes, head_len);
return 0; return 0;
} }