@@ -329,6 +329,7 @@ static alloc_result alloc_ul_ue(const slice_ue& u,
329329 bool schedule_sr_only,
330330 srslog::basic_logger& logger,
331331 ran_slice_id_t slice_id,
332+ slot_point pusch_slot,
332333 std::optional<unsigned > ul_new_tx_max_nof_rbs_per_ue_per_slot = {})
333334{
334335 unsigned pending_newtx_bytes = 0 ;
@@ -358,7 +359,7 @@ static alloc_result alloc_ul_ue(const slice_ue& u,
358359
359360 // Iterate through allocation parameter candidates.
360361 for (const ul_harq_process* h_ul : harq_candidates) {
361- ue_pusch_grant grant{&u, ue_cc.cell_index , h_ul->id };
362+ ue_pusch_grant grant{&u, ue_cc.cell_index , h_ul->id , pusch_slot };
362363 if (not is_retx) {
363364 grant.recommended_nof_bytes = pending_newtx_bytes;
364365 grant.max_nof_rbs = ul_new_tx_max_nof_rbs_per_ue_per_slot;
@@ -416,19 +417,17 @@ void scheduler_time_rr::dl_sched(ue_pdsch_allocator& pdsch_alloc,
416417 };
417418 result = round_robin_apply (ues, next_dl_ue_index, drb_newtx_ue_function);
418419 next_dl_ue_index = result.first ;
419- if (result.second == alloc_status::skip_slot) {
420- return ;
421- }
422420 }
423421}
424422
425423void scheduler_time_rr::ul_sched (ue_pusch_allocator& pusch_alloc,
426424 const ue_resource_grid_view& res_grid,
427425 ul_ran_slice_candidate& slice_candidate)
428426{
429- const slice_ue_repository& ues = slice_candidate.get_slice_ues ();
430- const unsigned max_rbs = slice_candidate.remaining_rbs ();
431- const ran_slice_id_t slice_id = slice_candidate.id ();
427+ const slice_ue_repository& ues = slice_candidate.get_slice_ues ();
428+ const unsigned max_rbs = slice_candidate.remaining_rbs ();
429+ const ran_slice_id_t slice_id = slice_candidate.id ();
430+ const slot_point pusch_slot = slice_candidate.get_slot_tx ();
432431
433432 if (ues.empty () or max_rbs == 0 ) {
434433 // No UEs to be scheduled or if there are no RBs to be scheduled in slice.
@@ -439,18 +438,20 @@ void scheduler_time_rr::ul_sched(ue_pusch_allocator& pusch_alloc,
439438 const unsigned ul_new_tx_max_nof_rbs_per_ue_per_slot =
440439 compute_max_nof_rbs_per_ue_per_slot (ues, false , res_grid, expert_cfg, max_rbs);
441440 // First, schedule UEs with pending SR.
442- auto sr_ue_function = [this , &pusch_alloc, ul_new_tx_max_nof_rbs_per_ue_per_slot, slice_id](const slice_ue& u) {
443- return alloc_ul_ue (u, pusch_alloc, false , true , logger, slice_id, ul_new_tx_max_nof_rbs_per_ue_per_slot);
444- };
441+ auto sr_ue_function =
442+ [this , &pusch_alloc, ul_new_tx_max_nof_rbs_per_ue_per_slot, slice_id, pusch_slot](const slice_ue& u) {
443+ return alloc_ul_ue (
444+ u, pusch_alloc, false , true , logger, slice_id, pusch_slot, ul_new_tx_max_nof_rbs_per_ue_per_slot);
445+ };
445446 auto result = round_robin_apply (ues, next_ul_ue_index, sr_ue_function);
446447 next_ul_ue_index = result.first ;
447448 if (result.second == alloc_status::skip_slot) {
448449 return ;
449450 }
450451
451452 // Second, schedule UEs with re-transmissions.
452- auto data_retx_ue_function = [this , &pusch_alloc, slice_id](const slice_ue& u) {
453- return alloc_ul_ue (u, pusch_alloc, true , false , logger, slice_id);
453+ auto data_retx_ue_function = [this , &pusch_alloc, slice_id, pusch_slot ](const slice_ue& u) {
454+ return alloc_ul_ue (u, pusch_alloc, true , false , logger, slice_id, pusch_slot );
454455 };
455456 result = round_robin_apply (ues, next_ul_ue_index, data_retx_ue_function);
456457 next_ul_ue_index = result.first ;
@@ -461,13 +462,11 @@ void scheduler_time_rr::ul_sched(ue_pusch_allocator& pusch_alloc,
461462 // Then, schedule UEs with new transmissions.
462463 if (ul_new_tx_max_nof_rbs_per_ue_per_slot > 0 ) {
463464 auto data_tx_ue_function =
464- [this , &pusch_alloc, ul_new_tx_max_nof_rbs_per_ue_per_slot, slice_id](const slice_ue& u) {
465- return alloc_ul_ue (u, pusch_alloc, false , false , logger, slice_id, ul_new_tx_max_nof_rbs_per_ue_per_slot);
465+ [this , &pusch_alloc, ul_new_tx_max_nof_rbs_per_ue_per_slot, slice_id, pusch_slot](const slice_ue& u) {
466+ return alloc_ul_ue (
467+ u, pusch_alloc, false , false , logger, slice_id, pusch_slot, ul_new_tx_max_nof_rbs_per_ue_per_slot);
466468 };
467469 result = round_robin_apply (ues, next_ul_ue_index, data_tx_ue_function);
468470 next_ul_ue_index = result.first ;
469- if (result.second == alloc_status::skip_slot) {
470- return ;
471- }
472471 }
473472}
0 commit comments