From 9ab7373251b0aae002cfa0ded647b43f096ea542 Mon Sep 17 00:00:00 2001 From: Francisco Date: Wed, 20 Jan 2021 15:28:07 +0000 Subject: [PATCH] Encode correctly DCI format2A when one of the TBs is empty --- srsenb/src/stack/mac/sched_ue.cc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/srsenb/src/stack/mac/sched_ue.cc b/srsenb/src/stack/mac/sched_ue.cc index 23e86bd59..f32e026c9 100644 --- a/srsenb/src/stack/mac/sched_ue.cc +++ b/srsenb/src/stack/mac/sched_ue.cc @@ -452,7 +452,18 @@ tbs_info sched_ue::allocate_new_dl_mac_pdu(sched::dl_sched_data_t* data, 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); } else { - Warning("SCHED: Failed to allocate DL harq pid=%d\n", h->get_id()); + uint32_t pending_bytes = lch_handler.get_dl_tx_total(); + 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", + tb, + rem_tbs, + h->get_id(), + lch_handler.get_dl_tx_total()); + } else { + Info("SCHED: DL TB tb_idx=%d, tbs=%d, pid=%d did not get allocated.\n", tb, rem_tbs, h->get_id()); + } + tb_info.tbs_bytes = 0; + tb_info.mcs = 0; } return tb_info;