Improve nr_rrc_processing_timer procedures
This commit is contained in:
@@ -203,8 +203,4 @@ void nr_mac_gNB_rrc_ul_failure_reset(const module_id_t Mod_instP,
|
||||
const sub_frame_t subframeP,
|
||||
const rnti_t rntiP);
|
||||
|
||||
bool nr_rrc_disabled_mac_scheduling(const module_id_t Mod_instP,
|
||||
const frame_t frameP,
|
||||
const sub_frame_t subframeP,
|
||||
const rnti_t rntiP);
|
||||
#endif
|
||||
|
||||
@@ -425,6 +425,10 @@ void config_common(int Mod_idP, int ssb_SubcarrierOffset, int pdsch_AntennaPorts
|
||||
|
||||
}
|
||||
|
||||
void nr_rrc_mac_schedule_ue_enabled(module_id_t module_id, rnti_t rnti, bool schedule_enabled) {
|
||||
const int UE_id = find_nr_UE_id(module_id,rnti);
|
||||
RC.nrmac[module_id]->UE_info.UE_sched_ctrl[UE_id].schedule_enabled = schedule_enabled;
|
||||
}
|
||||
|
||||
int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
int ssb_SubcarrierOffset,
|
||||
|
||||
@@ -518,7 +518,7 @@ void nr_store_dlsch_buffer(module_id_t module_id,
|
||||
lcid = DL_SCH_LCID_DCCH;
|
||||
} else if (sched_ctrl->rlc_status[DL_SCH_LCID_DCCH1].bytes_in_buffer > 0) {
|
||||
lcid = DL_SCH_LCID_DCCH1;
|
||||
} else if (!nr_rrc_disabled_mac_scheduling(module_id, frame, slot, rnti)) {
|
||||
} else if (sched_ctrl->schedule_enabled == true) {
|
||||
lcid = DL_SCH_LCID_DTCH;
|
||||
} else {
|
||||
continue;
|
||||
|
||||
@@ -2220,6 +2220,7 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *CellG
|
||||
sched_ctrl->pucch_consecutive_dtx_cnt = 0;
|
||||
sched_ctrl->pusch_consecutive_dtx_cnt = 0;
|
||||
sched_ctrl->ul_failure = 0;
|
||||
sched_ctrl->schedule_enabled = true;
|
||||
|
||||
sched_ctrl->sched_srs.frame = -1;
|
||||
sched_ctrl->sched_srs.slot = -1;
|
||||
|
||||
@@ -1177,10 +1177,7 @@ void pf_ul(module_id_t module_id,
|
||||
const bool do_sched = nr_UE_is_to_be_scheduled(module_id, 0, UE_id, sched_pusch->frame, sched_pusch->slot);
|
||||
|
||||
LOG_D(NR_MAC,"pf_ul: do_sched UE %d => %s\n",UE_id,do_sched ? "yes" : "no");
|
||||
if (B == 0 && !do_sched)
|
||||
continue;
|
||||
|
||||
if (nr_rrc_disabled_mac_scheduling(module_id, frame, slot, UE_info->rnti[UE_id])) {
|
||||
if ( (B == 0 && !do_sched) || (sched_ctrl->schedule_enabled == false) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +45,8 @@ void config_common(int Mod_idP,
|
||||
NR_ServingCellConfigCommon_t *scc
|
||||
);
|
||||
|
||||
void nr_rrc_mac_schedule_ue_enabled(module_id_t module_id, rnti_t rnti, bool schedule_enabled);
|
||||
|
||||
int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
int ssb_SubcarrierOffset,
|
||||
int pdsch_AntennaPorts,
|
||||
|
||||
@@ -646,6 +646,8 @@ typedef struct {
|
||||
/// UL HARQ processes that await retransmission
|
||||
NR_list_t retrans_ul_harq;
|
||||
NR_UE_mac_ce_ctrl_t UE_mac_ce_ctrl;// MAC CE related information
|
||||
/// Flag to indicate if MAC scheduling is enabled or disabled by RRC (e.g. during RRC processing time)
|
||||
bool schedule_enabled;
|
||||
} NR_UE_sched_ctrl_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -391,21 +391,4 @@ void nr_mac_gNB_rrc_ul_failure_reset(const module_id_t Mod_instP,
|
||||
} else {
|
||||
LOG_W(RRC,"Frame %d, Subframe %d: UL failure reset: UE %x unknown \n",frameP,subframeP,rntiP);
|
||||
}
|
||||
}
|
||||
|
||||
bool nr_rrc_disabled_mac_scheduling(const module_id_t Mod_instP,
|
||||
const frame_t frameP,
|
||||
const sub_frame_t subframeP,
|
||||
const rnti_t rntiP) {
|
||||
bool ret = false;
|
||||
struct rrc_gNB_ue_context_s *ue_context_p = NULL;
|
||||
ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[Mod_instP], rntiP);
|
||||
if (ue_context_p != NULL) {
|
||||
if(ue_context_p->ue_context.nr_rrc_processing_timer > 0) {
|
||||
ret = true;
|
||||
}
|
||||
} else {
|
||||
LOG_W(RRC,"Frame %d, Subframe %d: UE 0x%04x unknown \n",frameP,subframeP,rntiP);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
@@ -140,11 +140,13 @@ void openair_nr_rrc_on(const protocol_ctxt_t *const ctxt_pP) {
|
||||
RC.nrrrc[ctxt_pP->module_id]->carrier.Srb0.Active = 1;
|
||||
}
|
||||
|
||||
void enable_nr_rrc_processing_timer(rrc_gNB_ue_context_t *ue_context_pP,
|
||||
NR_SubcarrierSpacing_t subcarrierSpacing,
|
||||
uint32_t delay_ms) {
|
||||
void enable_nr_rrc_processing_timer(module_id_t module_id,
|
||||
rrc_gNB_ue_context_t *ue_context_pP,
|
||||
NR_SubcarrierSpacing_t subcarrierSpacing,
|
||||
uint32_t delay_ms) {
|
||||
ue_context_pP->ue_context.nr_rrc_processing_timer = 1;
|
||||
ue_context_pP->ue_context.nr_rrc_processing_delay = delay_ms << subcarrierSpacing;
|
||||
nr_rrc_mac_schedule_ue_enabled(module_id, ue_context_pP->ue_context.rnti, false);
|
||||
}
|
||||
|
||||
///---------------------------------------------------------------------------------------------------------------///
|
||||
@@ -731,7 +733,8 @@ rrc_gNB_generate_defaultRRCReconfiguration(
|
||||
NULL,
|
||||
ue_p->masterCellGroup);
|
||||
|
||||
enable_nr_rrc_processing_timer(ue_context_pP,
|
||||
enable_nr_rrc_processing_timer(ctxt_pP->module_id,
|
||||
ue_context_pP,
|
||||
rrc->carrier.servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,
|
||||
NR_RRC_PROCESSING_DELAY_MS);
|
||||
|
||||
@@ -998,7 +1001,8 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
|
||||
NULL,
|
||||
cellGroupConfig);
|
||||
|
||||
enable_nr_rrc_processing_timer(ue_context_pP,
|
||||
enable_nr_rrc_processing_timer(ctxt_pP->module_id,
|
||||
ue_context_pP,
|
||||
rrc->carrier.servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,
|
||||
NR_RRC_PROCESSING_DELAY_MS);
|
||||
|
||||
@@ -1175,7 +1179,8 @@ rrc_gNB_modify_dedicatedRRCReconfiguration(
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
enable_nr_rrc_processing_timer(ue_context_pP,
|
||||
enable_nr_rrc_processing_timer(ctxt_pP->module_id,
|
||||
ue_context_pP,
|
||||
RC.nrrrc[ctxt_pP->module_id]->carrier.servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,
|
||||
NR_RRC_PROCESSING_DELAY_MS);
|
||||
|
||||
@@ -1280,7 +1285,8 @@ rrc_gNB_generate_dedicatedRRCReconfiguration_release(
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
enable_nr_rrc_processing_timer(ue_context_pP,
|
||||
enable_nr_rrc_processing_timer(ctxt_pP->module_id,
|
||||
ue_context_pP,
|
||||
RC.nrrrc[ctxt_pP->module_id]->carrier.servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,
|
||||
NR_RRC_PROCESSING_DELAY_MS);
|
||||
|
||||
@@ -1834,7 +1840,8 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete(
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
enable_nr_rrc_processing_timer(ue_context_pP,
|
||||
enable_nr_rrc_processing_timer(ctxt_pP->module_id,
|
||||
ue_context_pP,
|
||||
RC.nrrrc[ctxt_pP->module_id]->carrier.servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,
|
||||
NR_RRC_PROCESSING_DELAY_MS);
|
||||
|
||||
@@ -3460,6 +3467,7 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
|
||||
ue_context_p->ue_context.nr_rrc_processing_timer++;
|
||||
if(ue_context_p->ue_context.nr_rrc_processing_timer >= ue_context_p->ue_context.nr_rrc_processing_delay) {
|
||||
ue_context_p->ue_context.nr_rrc_processing_timer = 0;
|
||||
nr_rrc_mac_schedule_ue_enabled(ctxt_pP->module_id, ue_context_p->ue_context.rnti, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user