Merge branch 'develop' of https://gitlab.eurecom.fr/oai/openairinterface5g into code-cleanup-20210716

This commit is contained in:
Laurent THOMAS
2021-08-04 19:57:45 +02:00
24 changed files with 1365 additions and 135 deletions
+17
View File
@@ -583,6 +583,23 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
memset(cc[CC_id].vrb_map_UL, 0, 100);
cc[CC_id].mcch_active = 0;
clear_nfapi_information(RC.mac[module_idP], CC_id, frameP, subframeP);
/* hack: skip BCH RBs in subframe 0 for DL scheduling,
* because with high MCS we may exceed code rate 0.93
* when using those RBs (36.213 7.1.7 says the UE may
* skip decoding if the code rate is higher than 0.93)
* TODO: remove this hack, deal with physical bits properly
* i.e. reduce MCS in the scheduler if code rate > 0.93
*/
if (subframeP == 0) {
int i;
int bw = cc[CC_id].mib->message.dl_Bandwidth;
/* start and count defined for RBs: 6, 15, 25, 50, 75, 100 */
int start[6] = { 0, 4, 9, 22, 34, 47 };
int count[6] = { 6, 7, 7, 6, 7, 6 };
for (i = 0; i < count[bw]; i++)
cc[CC_id].vrb_map[start[bw] + i] = 1;
}
}
/* Refresh UE list based on UEs dropped by PHY in previous subframe */
+19
View File
@@ -113,10 +113,29 @@ bool try_allocate_harq_retransmission(module_id_t Mod_id,
LOG_D(MAC, "cannot allocate UE %d: no CCE can be allocated\n", UE_id);
return false;
}
/* if nb_rb is not multiple of RBGsize, then last RBG must be free
* (it will be allocated just below)
*/
if (nb_rb % RBGsize && !rbgalloc_mask[N_RBG-1]) {
LOG_E(MAC, "retransmission: last RBG already allocated (this should not happen)\n");
return false;
}
ue_ctrl->pre_dci_dl_pdu_idx = idx;
// retransmissions: directly allocate
*n_rbg_sched -= nb_rbg;
ue_ctrl->pre_nb_available_rbs[CC_id] += nb_rb;
if (nb_rb % RBGsize) {
/* special case: if nb_rb is not multiple of RBGsize, then allocate last RBG.
* If we instead allocated another RBG then we will retransmit with more
* RBs and the UE will not accept it.
* (This has been seen in a test with cots UEs, if not true, then change
* code as needed.)
* At this point rbgalloc_mask[N_RBG-1] == 1 due to the test above.
*/
ue_ctrl->rballoc_sub_UE[CC_id][N_RBG-1] = 1;
rbgalloc_mask[N_RBG-1] = 0;
nb_rbg--;
}
for (; nb_rbg > 0; start_rbg++) {
if (!rbgalloc_mask[start_rbg])
continue;