|
|
|
@ -298,7 +298,7 @@ int get_required_prb_dl(const sched_ue_cell& cell,
|
|
|
|
|
|
|
|
|
|
uint32_t get_required_prb_ul(const sched_ue_cell& cell, uint32_t req_bytes)
|
|
|
|
|
{
|
|
|
|
|
const static int MIN_ALLOC_BYTES = 10; /// There should be enough space for RLC header + BSR + some payload
|
|
|
|
|
const static int MIN_ALLOC_BYTES = 10;
|
|
|
|
|
if (req_bytes == 0) {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
@ -317,7 +317,9 @@ uint32_t get_required_prb_ul(const sched_ue_cell& cell, uint32_t req_bytes)
|
|
|
|
|
uint32_t final_tbs = std::get<3>(ret);
|
|
|
|
|
while (final_tbs < MIN_ALLOC_BYTES and req_prbs < cell.cell_cfg->nof_prb()) {
|
|
|
|
|
// Note: If PHR<0 is limiting the max nof PRBs per UL grant, the UL grant may become too small to fit any
|
|
|
|
|
// data other than headers + BSR. In this edge-case, force an increase the nof required PRBs.
|
|
|
|
|
// data other than headers + BSR. Besides, forcing unnecessary segmentation, it may additionally
|
|
|
|
|
// forbid the UE from fitting small RRC messages (e.g. RRCReconfComplete) in the UL grants.
|
|
|
|
|
// To avoid TBS<10, we force an increase the nof required PRBs.
|
|
|
|
|
req_prbs++;
|
|
|
|
|
final_tbs = compute_tbs_approx(req_prbs);
|
|
|
|
|
}
|
|
|
|
|