@@ -209,11 +209,18 @@ static alloc_outcome alloc_dl_ue(const ue& u,
209209 const ue_resource_grid_view& res_grid,
210210 ue_pdsch_allocator& pdsch_alloc,
211211 bool is_retx,
212+ bool ue_with_srb_data_only,
212213 srslog::basic_logger& logger,
213214 optional<unsigned > dl_new_tx_max_nof_rbs_per_ue_per_slot = {})
214215{
215- if (not is_retx and not u.has_pending_dl_newtx_bytes ()) {
216- return alloc_outcome::skip_ue;
216+ if (not is_retx) {
217+ if (not u.has_pending_dl_newtx_bytes ()) {
218+ return alloc_outcome::skip_ue;
219+ }
220+ if (ue_with_srb_data_only and not u.has_pending_dl_newtx_bytes (LCID_SRB1) and
221+ not u.has_pending_dl_newtx_bytes (LCID_SRB2)) {
222+ return alloc_outcome::skip_ue;
223+ }
217224 }
218225
219226 // Prioritize PCell over SCells.
@@ -486,16 +493,22 @@ void scheduler_time_rr::dl_sched(ue_pdsch_allocator& pdsch_alloc,
486493{
487494 // First schedule re-transmissions.
488495 auto retx_ue_function = [this , &res_grid, &pdsch_alloc](const ue& u) {
489- return alloc_dl_ue (u, res_grid, pdsch_alloc, true , logger);
496+ return alloc_dl_ue (u, res_grid, pdsch_alloc, true , false , logger);
490497 };
491498 next_dl_ue_index = round_robin_apply (ues, next_dl_ue_index, retx_ue_function);
492499
500+ // Second, schedule UEs with SRB data.
501+ auto srb_newtx_ue_function = [this , &res_grid, &pdsch_alloc](const ue& u) {
502+ return alloc_dl_ue (u, res_grid, pdsch_alloc, false , true , logger);
503+ };
504+ next_dl_ue_index = round_robin_apply (ues, next_dl_ue_index, srb_newtx_ue_function);
505+
493506 // Then, schedule new transmissions.
494507 const unsigned dl_new_tx_max_nof_rbs_per_ue_per_slot =
495508 compute_max_nof_rbs_per_ue_per_slot (ues, true , res_grid, expert_cfg);
496509 if (dl_new_tx_max_nof_rbs_per_ue_per_slot > 0 ) {
497510 auto tx_ue_function = [this , &res_grid, &pdsch_alloc, dl_new_tx_max_nof_rbs_per_ue_per_slot](const ue& u) {
498- return alloc_dl_ue (u, res_grid, pdsch_alloc, false , logger, dl_new_tx_max_nof_rbs_per_ue_per_slot);
511+ return alloc_dl_ue (u, res_grid, pdsch_alloc, false , false , logger, dl_new_tx_max_nof_rbs_per_ue_per_slot);
499512 };
500513 next_dl_ue_index = round_robin_apply (ues, next_dl_ue_index, tx_ue_function);
501514 }
0 commit comments