Skip to content

Commit 265f8b8

Browse files
herlesupreethcodebot
authored andcommitted
sched: build fallback UE TB info either for SRB0 or SRB1 but not both for a PDSCH grant
1 parent 1a767c2 commit 265f8b8

File tree

1 file changed

+3
-1
lines changed
  • lib/scheduler/ue_scheduling

1 file changed

+3
-1
lines changed

lib/scheduler/ue_scheduling/ue.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,10 @@ unsigned ue::build_dl_fallback_transport_block_info(dl_msg_tb_info& tb_info, uns
158158
unsigned total_subpdu_bytes = 0;
159159
total_subpdu_bytes += allocate_ue_con_res_id_mac_ce(tb_info, dl_lc_ch_mgr, tb_size_bytes);
160160
// Since SRB0 PDU cannot be segmented, skip SRB0 if remaining TB size is not enough to fit entire PDU.
161-
if ((tb_size_bytes - total_subpdu_bytes) >= dl_lc_ch_mgr.pending_bytes(LCID_SRB0)) {
161+
if (dl_lc_ch_mgr.has_pending_bytes(LCID_SRB0) and
162+
((tb_size_bytes - total_subpdu_bytes) >= dl_lc_ch_mgr.pending_bytes(LCID_SRB0))) {
162163
total_subpdu_bytes += allocate_mac_sdus(tb_info, dl_lc_ch_mgr, tb_size_bytes - total_subpdu_bytes, LCID_SRB0);
164+
return total_subpdu_bytes;
163165
}
164166
total_subpdu_bytes += allocate_mac_sdus(tb_info, dl_lc_ch_mgr, tb_size_bytes - total_subpdu_bytes, LCID_SRB1);
165167
return total_subpdu_bytes;

0 commit comments

Comments
 (0)