add comment explaining the need to warn in case of failed allocate a TB in the scheduler when there are still pending bytes

This commit is contained in:
Francisco 2021-01-20 16:26:48 +00:00 committed by Andre Puschmann
parent 9ab7373251
commit e27ded9e55
1 changed files with 3 additions and 1 deletions

View File

@ -452,13 +452,15 @@ tbs_info sched_ue::allocate_new_dl_mac_pdu(sched::dl_sched_data_t* data,
h->new_tx( h->new_tx(
user_mask, tb, tti_tx_dl, tb_info.mcs, tb_info.tbs_bytes, data->dci.location.ncce, get_ue_cfg().maxharq_tx); user_mask, tb, tti_tx_dl, tb_info.mcs, tb_info.tbs_bytes, data->dci.location.ncce, get_ue_cfg().maxharq_tx);
} else { } else {
// Note: At this point, the allocation of bytes to a TB should not fail, unless the RLC buffers have been
// emptied by another allocated tb_idx.
uint32_t pending_bytes = lch_handler.get_dl_tx_total(); uint32_t pending_bytes = lch_handler.get_dl_tx_total();
if (pending_bytes > 0) { if (pending_bytes > 0) {
Warning("SCHED: Failed to allocate DL TB with tb_idx=%d, tbs=%d, pid=%d. Pending DL buffer data=%d\n", Warning("SCHED: Failed to allocate DL TB with tb_idx=%d, tbs=%d, pid=%d. Pending DL buffer data=%d\n",
tb, tb,
rem_tbs, rem_tbs,
h->get_id(), h->get_id(),
lch_handler.get_dl_tx_total()); pending_bytes);
} else { } else {
Info("SCHED: DL TB tb_idx=%d, tbs=%d, pid=%d did not get allocated.\n", tb, rem_tbs, h->get_id()); Info("SCHED: DL TB tb_idx=%d, tbs=%d, pid=%d did not get allocated.\n", tb, rem_tbs, h->get_id());
} }