Commit 206f17b2 authored by LouisAdrien's avatar LouisAdrien

[under test] Fix CDRX starts at RRCReconfComplete again; new comments

parent 9c811d22
...@@ -387,7 +387,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) { ...@@ -387,7 +387,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
for (int I = 0; I < sizeof(PLMNParams) / sizeof(paramdef_t); ++I) for (int I = 0; I < sizeof(PLMNParams) / sizeof(paramdef_t); ++I)
PLMNParams[I].chkPptr = &(config_check_PLMNParams[I]); PLMNParams[I].chkPptr = &(config_check_PLMNParams[I]);
//RRC_CONFIGURATION_REQ (msg_p).rrc_inactivity_timer_thres = RRC_INACTIVITY_THRESH; // set to 0 to deactivate
// In the configuration file it is in seconds. For RRC it has to be in milliseconds // In the configuration file it is in seconds. For RRC it has to be in milliseconds
RRC_CONFIGURATION_REQ (msg_p).rrc_inactivity_timer_thres = (*ENBParamList.paramarray[i][ENB_RRC_INACTIVITY_THRES_IDX].uptr) * 1000; RRC_CONFIGURATION_REQ (msg_p).rrc_inactivity_timer_thres = (*ENBParamList.paramarray[i][ENB_RRC_INACTIVITY_THRES_IDX].uptr) * 1000;
RRC_CONFIGURATION_REQ (msg_p).cell_identity = enb_id; RRC_CONFIGURATION_REQ (msg_p).cell_identity = enb_id;
......
...@@ -750,7 +750,7 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -750,7 +750,7 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
case LTE_UL_DCCH_MessageType__c1_PR_rrcConnectionReconfigurationComplete: case LTE_UL_DCCH_MessageType__c1_PR_rrcConnectionReconfigurationComplete:
LOG_I(F1AP, "[MSG] RRC UL rrcConnectionReconfigurationComplete\n"); LOG_I(F1AP, "[MSG] RRC UL rrcConnectionReconfigurationComplete\n");
/* CDRX: (under test) activated when RRC Connection Reconfiguration was sent */ /* CDRX: activated when RRC Connection Reconfiguration Complete is received */
int UE_id_mac = find_UE_id(instance, rnti); int UE_id_mac = find_UE_id(instance, rnti);
if (UE_id_mac == -1) { if (UE_id_mac == -1) {
...@@ -762,7 +762,7 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -762,7 +762,7 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
if (UE_scheduling_control->cdrx_waiting_ack == TRUE) { if (UE_scheduling_control->cdrx_waiting_ack == TRUE) {
UE_scheduling_control->cdrx_waiting_ack = FALSE; UE_scheduling_control->cdrx_waiting_ack = FALSE;
// UE_scheduling_control->cdrx_configured = TRUE; // Set to TRUE when RRC Connection Reconfiguration is sent (under test) UE_scheduling_control->cdrx_configured = TRUE; // Set to TRUE when RRC Connection Reconfiguration Complete is received
LOG_I(F1AP, "CDRX configuration after first RRC Connection Reconfiguration Complete reception\n"); LOG_I(F1AP, "CDRX configuration after first RRC Connection Reconfiguration Complete reception\n");
} }
/* End of CDRX processing */ /* End of CDRX processing */
......
...@@ -990,7 +990,7 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP, ...@@ -990,7 +990,7 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
/* /*
* Configure local DRX timers and thresholds following the drx_configuration input * Configure local CDRX timers and thresholds following the drx_configuration input
*/ */
void eNB_Config_Local_DRX( void eNB_Config_Local_DRX(
module_id_t Mod_id, module_id_t Mod_id,
...@@ -1022,20 +1022,19 @@ void eNB_Config_Local_DRX( ...@@ -1022,20 +1022,19 @@ void eNB_Config_Local_DRX(
/* Check drx_Configuration */ /* Check drx_Configuration */
if (drx_Configuration == NULL) { if (drx_Configuration == NULL) {
LOG_I(MAC, "drx_Configuration parameter is NULL, cannot configure local UE parameters\n"); LOG_W(MAC, "drx_Configuration parameter is NULL, cannot configure local UE parameters for CDRX\n");
return; return;
} }
/* Check if drx config present */ /* Check if drx config present */
if (drx_Configuration->present != LTE_DRX_Config_PR_setup) { if (drx_Configuration->present != LTE_DRX_Config_PR_setup) {
LOG_I(MAC, "No drx_Configuration present, don't configure local UE parameters\n"); LOG_I(MAC, "No drx_Configuration present, don't configure local UE parameters for CDRX\n");
return; return;
} }
/* Modify scheduling control structure according to DRX configuration: doesn't support every configurations! */ /* Modify scheduling control structure according to DRX configuration: doesn't support every configurations! */
LOG_I(MAC, "Initial cdrx_waiting_ack state: %s\n", UE_scheduling_control->cdrx_waiting_ack ? "TRUE" : "FALSE"); UE_scheduling_control->cdrx_configured = FALSE; // will be set to true when receiving RRC Reconfiguration Complete
UE_scheduling_control->cdrx_configured = TRUE; // will be set to true UE_scheduling_control->cdrx_waiting_ack = TRUE; // waiting for RRC Reconfiguration Complete message
UE_scheduling_control->cdrx_waiting_ack = TRUE; // For debugging only
UE_scheduling_control->in_active_time = FALSE; UE_scheduling_control->in_active_time = FALSE;
UE_scheduling_control->dci0_ongoing_timer = 0; UE_scheduling_control->dci0_ongoing_timer = 0;
......
...@@ -3235,13 +3235,13 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t ...@@ -3235,13 +3235,13 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
LOG_E(RRC, "Invalid CC_id for DRX configuration\n"); LOG_E(RRC, "Invalid CC_id for DRX configuration\n");
} }
} else { // CDRX not implemented for TDD and LTE-M (09/04/19) } else { // CDRX not implemented for TDD and LTE-M (09/04/19)
LOG_I(RRC, "CDRX not implemented for TDD and LTE-M\n"); LOG_E(RRC, "CDRX not implemented for TDD and LTE-M\n");
} }
} else { // UE_id invalid } else { // UE_id invalid
LOG_E(RRC, "Invalid UE_id found!\n"); LOG_E(RRC, "Invalid UE_id found!\n");
} }
/* End of CDRX configuration */
} }
/* End of CDRX configuration */
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
sr_ProhibitTimer_r9 = CALLOC(1, sizeof(long)); sr_ProhibitTimer_r9 = CALLOC(1, sizeof(long));
...@@ -3935,44 +3935,44 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt ...@@ -3935,44 +3935,44 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
mac_MainConfig->phr_Config->choice.setup.prohibitPHR_Timer = LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf200; // sf20 = 20 subframes // LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf1000 mac_MainConfig->phr_Config->choice.setup.prohibitPHR_Timer = LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf200; // sf20 = 20 subframes // LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf1000
mac_MainConfig->phr_Config->choice.setup.dl_PathlossChange = LTE_MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB3; // Value dB1 =1 dB, dB3 = 3 dB mac_MainConfig->phr_Config->choice.setup.dl_PathlossChange = LTE_MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB3; // Value dB1 =1 dB, dB3 = 3 dB
if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) { if (NODE_IS_MONOLITHIC(RC.rrc[ctxt_pP->module_id]->node_type)) {
/* CDRX Configuration */ /* CDRX Configuration */
// Need to check if UE is a BR UE // Need to check if UE is a BR UE
rnti_t rnti = ue_context_pP->ue_id_rnti; rnti_t rnti = ue_context_pP->ue_id_rnti;
module_id_t module_id = ctxt_pP->module_id; module_id_t module_id = ctxt_pP->module_id;
int UE_id = find_UE_id(module_id, rnti); int UE_id = find_UE_id(module_id, rnti);
eNB_MAC_INST *mac = RC.mac[module_id];
UE_list_t *UE_list = &(mac->UE_list);
if (UE_id != -1) { if (UE_id != -1) {
if ((rrc_inst->carrier[cc_id].sib1->tdd_Config == NULL) && eNB_MAC_INST *mac = RC.mac[module_id];
(UE_list->UE_template[ue_context_pP->ue_context.primaryCC_id][UE_id].rach_resource_type == 0)) { UE_list_t *UE_list = &(mac->UE_list);
// CDRX can be only configured in case of FDD and non BR UE (09/04/19)
LOG_D(RRC, "Processing the DRX configuration in RRC Connection Reconfiguration\n");
/* Process the IE drx_Config */
if (cc_id < MAX_NUM_CCs) {
mac_MainConfig->drx_Config = do_DrxConfig(cc_id, &rrc_inst->configuration, UEcap); // drx_Config IE
} else {
LOG_E(RRC, "Invalid CC_id for DRX configuration\n");
}
/* Set timers and thresholds values in local MAC context of UE */ if ((rrc_inst->carrier[cc_id].sib1->tdd_Config == NULL) &&
eNB_Config_Local_DRX(module_id, ue_context_pP->ue_id_rnti, mac_MainConfig->drx_Config); (UE_list->UE_template[ue_context_pP->ue_context.primaryCC_id][UE_id].rach_resource_type == 0)) {
// CDRX can be only configured in case of FDD and non BR UE (09/04/19)
LOG_D(RRC, "Processing the DRX configuration in RRC Connection Reconfiguration\n");
LOG_D(RRC, "DRX configured in mac main config for RRC Connection Reconfiguration\n"); /* Process the IE drx_Config */
if (cc_id < MAX_NUM_CCs) {
mac_MainConfig->drx_Config = do_DrxConfig(cc_id, &rrc_inst->configuration, UEcap); // drx_Config IE
if (mac_MainConfig->drx_Config == NULL) {
LOG_E(RRC, "drx_Configuration parameter is NULL, cannot configure local UE parameters\n");
} else {
/* Set timers and thresholds values in local MAC context of UE */
eNB_Config_Local_DRX(module_id, rnti, mac_MainConfig->drx_Config);
LOG_D(RRC, "DRX configured in mac main config for RRC Connection Reconfiguration\n");
}
} else {
LOG_E(RRC, "Invalid CC_id for DRX configuration\n");
}
} else { // CDRX not implemented for TDD and LTE-M (09/04/19) } else { // CDRX not implemented for TDD and LTE-M (09/04/19)
mac_MainConfig->drx_Config = NULL; LOG_E(RRC, "CDRX not implemented for TDD and LTE-M\n");
} }
} else { // UE_id invalid } else { // UE_id invalid
LOG_E(RRC, "Invalid UE_id found!\n"); LOG_E(RRC, "Invalid UE_id found!\n");
mac_MainConfig->drx_Config = NULL;
} }
} else { // No CDRX with the CU/DU split in this version /* End of CDRX configuration */
LOG_E(RRC, "CU/DU split activated\n");
mac_MainConfig->drx_Config = NULL;
} }
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
...@@ -6495,8 +6495,9 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( ...@@ -6495,8 +6495,9 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // reset rrc inactivity timer ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // reset rrc inactivity timer
if (NODE_IS_MONOLITHIC(RC.rrc[ctxt_pP->module_id]->node_type)) { if (NODE_IS_MONOLITHIC(RC.rrc[ctxt_pP->module_id]->node_type)) {
/* CDRX: (under test) activated when RRC Connection Reconfiguration was sent */ /* CDRX: activated when RRC Connection Reconfiguration Complete is received */
int UE_id_mac = find_UE_id(ctxt_pP->module_id, ue_context_pP->ue_context.rnti); int UE_id_mac = find_UE_id(ctxt_pP->module_id, ue_context_pP->ue_context.rnti);
if (UE_id_mac == -1) { if (UE_id_mac == -1) {
LOG_E(RRC, "Can't find UE_id(MAC) of UE rnti %x\n", ue_context_pP->ue_context.rnti); LOG_E(RRC, "Can't find UE_id(MAC) of UE rnti %x\n", ue_context_pP->ue_context.rnti);
return; return;
...@@ -6506,7 +6507,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( ...@@ -6506,7 +6507,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
if (UE_scheduling_control->cdrx_waiting_ack == TRUE) { if (UE_scheduling_control->cdrx_waiting_ack == TRUE) {
UE_scheduling_control->cdrx_waiting_ack = FALSE; UE_scheduling_control->cdrx_waiting_ack = FALSE;
// UE_scheduling_control->cdrx_configured = TRUE; // Set to TRUE when RRC Connection Reconfiguration is sent (under test) UE_scheduling_control->cdrx_configured = TRUE; // Set to TRUE when RRC Connection Reconfiguration is received
LOG_I(RRC, "CDRX configuration activated after RRC Connection Reconfiguration Complete reception\n"); LOG_I(RRC, "CDRX configuration activated after RRC Connection Reconfiguration Complete reception\n");
} }
/* End of CDRX processing */ /* End of CDRX processing */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment