Commit 67c7f973 authored by Raphael Defosseux's avatar Raphael Defosseux

Merge remote-tracking branch 'origin/452-cdrx-better-support-cu-du-split' into...

Merge remote-tracking branch 'origin/452-cdrx-better-support-cu-du-split' into develop_integration_2019_w51
parents 7d86b936 cc15b223
......@@ -6,3 +6,6 @@ log/
lte_build_oai/
targets/bin/
cmake_targets/nas_sim_tools/build/
# vscode
.vscode
\ No newline at end of file
......@@ -45,3 +45,6 @@ MESSAGE_DEF(RRC_MAC_MCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacMcchDat
MESSAGE_DEF(RRC_MAC_MCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacMcchDataInd, rrc_mac_mcch_data_ind)
MESSAGE_DEF(RRC_MAC_PCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacPcchDataReq, rrc_mac_pcch_data_req)
/* RRC configures DRX context (MAC timers) of a UE */
MESSAGE_DEF(RRC_MAC_DRX_CONFIG_REQ, MESSAGE_PRIORITY_MED, rrc_mac_drx_config_req_t, rrc_mac_drx_config_req)
\ No newline at end of file
......@@ -29,6 +29,8 @@
#ifndef MAC_MESSAGES_TYPES_H_
#define MAC_MESSAGES_TYPES_H_
#include <LTE_DRX-Config.h>
//-------------------------------------------------------------------------------------------//
// Defines to access message fields.
#define RRC_MAC_IN_SYNC_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_in_sync_ind
......@@ -48,6 +50,8 @@
#define RRC_MAC_MCCH_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_mcch_data_ind
#define RRC_MAC_PCCH_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_pcch_data_req
#define RRC_MAC_DRX_CONFIG_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_drx_config_req
// Some constants from "LAYER2/MAC/defs.h"
#define BCCH_SDU_SIZE (512)
#define BCCH_SDU_MBMS_SIZE (512)
......@@ -145,4 +149,14 @@ typedef struct RrcMacPcchDataReq_s {
uint8_t sdu[PCCH_SDU_SIZE];
uint8_t enb_index;
} RrcMacPcchDataReq;
/* RRC configures DRX context (MAC timers) of a UE */
typedef struct rrc_mac_drx_config_req_s {
/* UE RNTI to configure */
rnti_t rnti;
/* DRX configuration from MacMainConfig to configure UE's local timers */
LTE_DRX_Config_t * drx_Configuration;
} rrc_mac_drx_config_req_t;
#endif /* MAC_MESSAGES_TYPES_H_ */
......@@ -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)
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
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;
......
......@@ -47,6 +47,8 @@
#include "common/ran_context.h"
#include "rrc_eNB_UE_context.h"
#include "asn1_msg.h"
#include "intertask_interface.h"
// undefine C_RNTI from
// openair1/PHY/LTE_TRANSPORT/transport_common.h which
......@@ -398,11 +400,32 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
LTE_SRB_ToAddModList_t *SRB_configList = rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->srb_ToAddModList;
LTE_DRB_ToReleaseList_t *DRB_ReleaseList = rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->drb_ToReleaseList;
LTE_MAC_MainConfig_t *mac_MainConfig = NULL;
for (i = 0; i< 8; i++){
DRB2LCHAN[i] = 0;
}
if (rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->mac_MainConfig)
if (rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->mac_MainConfig) {
LOG_D(F1AP, "MAC Main Configuration is present\n");
mac_MainConfig = &rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue;
/* CDRX Configuration */
if (mac_MainConfig->drx_Config == NULL) {
LOG_W(F1AP, "drx_Configuration parameter is NULL, cannot configure local UE parameters or CDRX is deactivated\n");
} else {
MessageDef *message_p = NULL;
/* Send DRX configuration to MAC task to configure timers of local UE context */
message_p = itti_alloc_new_message(TASK_DU_F1, RRC_MAC_DRX_CONFIG_REQ);
RRC_MAC_DRX_CONFIG_REQ(message_p).rnti = ctxt.rnti;
RRC_MAC_DRX_CONFIG_REQ(message_p).drx_Configuration = mac_MainConfig->drx_Config;
itti_send_msg_to_task(TASK_MAC_ENB, ctxt.module_id, message_p);
LOG_D(F1AP, "DRX configured in MAC Main Configuration for RRC Connection Reconfiguration\n");
}
/* End of CDRX configuration */
}
LTE_MeasGapConfig_t *measGapConfig = NULL;
struct LTE_PhysicalConfigDedicated* physicalConfigDedicated = rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->physicalConfigDedicated;
rrc_rlc_config_asn1_req(
......@@ -602,7 +625,8 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
}
int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance, const f1ap_ul_rrc_message_t *msg) {
int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
const f1ap_ul_rrc_message_t *msg) {
const rnti_t rnti = msg->rnti;
F1AP_F1AP_PDU_t pdu;
......@@ -703,6 +727,25 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance, const f1ap_ul_rrc_messa
break;
case LTE_UL_DCCH_MessageType__c1_PR_rrcConnectionReconfigurationComplete:
LOG_I(F1AP, "[MSG] RRC UL rrcConnectionReconfigurationComplete\n");
/* CDRX: activated when RRC Connection Reconfiguration Complete is received */
int UE_id_mac = find_UE_id(instance, rnti);
if (UE_id_mac == -1) {
LOG_E(F1AP, "Can't find UE_id(MAC) of UE rnti %x\n", rnti);
break;
}
UE_sched_ctrl_t *UE_scheduling_control = &(RC.mac[instance]->UE_list.UE_sched_ctrl[UE_id_mac]);
if (UE_scheduling_control->cdrx_waiting_ack == TRUE) {
UE_scheduling_control->cdrx_waiting_ack = FALSE;
UE_scheduling_control->cdrx_configured = TRUE; // Set to TRUE when RRC Connection Reconfiguration Complete is received
LOG_I(F1AP, "CDRX configuration activated after RRC Connection Reconfiguration Complete reception\n");
}
/* End of CDRX processing */
break;
case LTE_UL_DCCH_MessageType__c1_PR_rrcConnectionReestablishmentComplete:
......@@ -710,14 +753,16 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance, const f1ap_ul_rrc_messa
case LTE_UL_DCCH_MessageType__c1_PR_rrcConnectionSetupComplete:
LOG_I(F1AP, "[MSG] RRC UL rrcConnectionSetupComplete \n");
if(!ue_context_p){
LOG_E(F1AP, "Did not find the UE context associated with UE RNTOI %x, ue_context_p is NULL\n", rnti);
}else {
} else {
LOG_I(F1AP, "Processing RRCConnectionSetupComplete UE %x\n", rnti);
ue_context_p->ue_context.Status = RRC_CONNECTED;
}
break;
case LTE_UL_DCCH_MessageType__c1_PR_securityModeComplete:
LOG_I(F1AP, "[MSG] RRC securityModeComplete \n");
break;
......
......@@ -175,7 +175,7 @@ void *F1AP_DU_task(void *arg) {
&received_msg->ittiMsg.sctp_data_ind);
break;
case F1AP_UL_RRC_MESSAGE: // from rrc
case F1AP_UL_RRC_MESSAGE: // to rrc
LOG_I(F1AP, "DU Task Received F1AP_UL_RRC_MESSAGE\n");
DU_send_UL_RRC_MESSAGE_TRANSFER(ITTI_MESSAGE_GET_INSTANCE(received_msg),
&F1AP_UL_RRC_MESSAGE(received_msg));
......
This diff is collapsed.
......@@ -31,6 +31,7 @@
#include "LAYER2/MAC/mac.h"
#include "PHY/defs_common.h" // for PRACH_RESOURCES_t and lte_subframe_t
#include "openair2/COMMON/mac_messages_types.h"
/** \addtogroup _mac
* @{
......@@ -1338,9 +1339,13 @@ int ue_ul_slice_membership(module_id_t mod_id, int UE_id, int slice_idx);
/* DRX Configuration */
/* Configure local DRX timers and thresholds in UE context, following the drx_configuration input */
void eNB_Config_Local_DRX(module_id_t Mod_id, rnti_t rnti, LTE_DRX_Config_t *drx_Configuration);
void eNB_Config_Local_DRX(instance_t Mod_id, rrc_mac_drx_config_req_t *rrc_mac_drx_config_req);
/* from here: prototypes to get rid of compilation warnings: doc to be written by function author */
uint8_t ul_subframe2_k_phich(COMMON_channels_t * cc, sub_frame_t ul_subframe);
#endif
/** @}*/
/* MAC ITTI messaging related functions */
/* Main loop of MAC itti message handling */
void *mac_enb_task(void *arg);
\ No newline at end of file
......@@ -34,15 +34,12 @@
#include "mac_proto.h"
#include "mac_extern.h"
#include "assertions.h"
//#include "PHY_INTERFACE/phy_extern.h"
//#include "PHY/defs_eNB.h"
//#include "SCHED/sched_eNB.h"
#include "LAYER2/PDCP_v10.1.0/pdcp.h"
#include "RRC/LTE/rrc_defs.h"
#include "common/utils/LOG/log.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "common/ran_context.h"
#include "intertask_interface.h"
extern RAN_CONTEXT_t RC;
......@@ -223,3 +220,47 @@ int l2_init_eNB(void)
return (1);
}
//-----------------------------------------------------------------------------
/*
* Main loop of MAC itti message handling
*/
void *mac_enb_task(void *arg)
//-----------------------------------------------------------------------------
{
MessageDef *received_msg = NULL;
int result;
itti_mark_task_ready(TASK_MAC_ENB); // void function 10/2019
LOG_I(MAC,"Starting main loop of MAC message task\n");
while (1) {
itti_receive_msg(TASK_MAC_ENB, &received_msg);
switch (ITTI_MSG_ID(received_msg)) {
case RRC_MAC_DRX_CONFIG_REQ:
LOG_I(MAC, "MAC Task Received RRC_MAC_DRX_CONFIG_REQ\n");
/* Set timers and thresholds values in local MAC context of UE */
eNB_Config_Local_DRX(ITTI_MESSAGE_GET_INSTANCE(received_msg), &received_msg->ittiMsg.rrc_mac_drx_config_req);
break;
case TERMINATE_MESSAGE:
LOG_W(MAC, " *** Exiting MAC thread\n");
itti_exit_task();
break;
default:
LOG_E(MAC, "MAC instance received unhandled message: %d:%s\n",
ITTI_MSG_ID(received_msg),
ITTI_MSG_NAME(received_msg));
break;
} // end switch
result = itti_free(ITTI_MSG_ORIGIN_ID(received_msg), received_msg);
AssertFatal(result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
received_msg = NULL;
} // end while
return NULL;
}
\ No newline at end of file
......@@ -312,10 +312,8 @@ mac_rrc_data_ind(
if (ue_context_p->ue_context.Status != RRC_RECONFIGURED) {
LOG_E(RRC,"[eNB %d] Received C-RNTI ,but UE %x status(%d) not RRC_RECONFIGURED\n",module_idP,rntiP,ue_context_p->ue_context.Status);
return (-1);
} else {
rrc_eNB_generate_defaultRRCConnectionReconfiguration(&ctxt,ue_context_p,0);
ue_context_p->ue_context.Status = RRC_RECONFIGURED;
}
rrc_eNB_generate_defaultRRCConnectionReconfiguration(&ctxt,ue_context_p,0);
}
}
......
This diff is collapsed.
......@@ -81,12 +81,11 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich
uint8_t do_MIB_FeMBMS(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t additionalNonMBSFNSubframes, uint32_t frame);
/**
\brief Generate configuration structure for DRX_Config
@param Mod_id Instance of eNB
@param CC_id Id of component to configure
@param configuration Pointer Configuration Request structure
@param UEcap Pointer Configuration UE capablities
@return DRX_Config structure pointer or NULL => error */
LTE_DRX_Config_t *do_DrxConfig(uint8_t Mod_id, int CC_id, RrcConfigurationReq *configuration, LTE_UE_EUTRA_Capability_t *UEcap);
LTE_DRX_Config_t *do_DrxConfig(int CC_id, RrcConfigurationReq *configuration, LTE_UE_EUTRA_Capability_t *UEcap);
/**
\brief Generate configuration for SIB1 (eNB).
......
......@@ -2968,6 +2968,7 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
uint8_t buffer[RRC_BUF_SIZE];
uint16_t size;
int i;
MessageDef *message_p = NULL;
/* Configure SRB1/SRB2, PhysicalConfigDedicated, LTE_MAC_MainConfig for UE */
eNB_RRC_INST *rrc_inst = RC.rrc[ctxt_pP->module_id];
......@@ -3202,45 +3203,28 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
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
if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
/* CDRX Configuration */
// Need to check if UE is a BR UE
mac_MainConfig->drx_Config = NULL;
rnti_t rnti = ue_context_pP->ue_id_rnti;
module_id_t module_id = ctxt_pP->module_id;
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 ((rrc_inst->carrier[cc_id].sib1->tdd_Config == NULL) &&
(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");
/* Process the IE drx_Config */
if (cc_id < MAX_NUM_CCs) {
mac_MainConfig->drx_Config = do_DrxConfig(module_id, 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 */
eNB_Config_Local_DRX(module_id, ue_context_pP->ue_id_rnti, mac_MainConfig->drx_Config);
if (NODE_IS_MONOLITHIC(rrc_inst->node_type)) {
mac_MainConfig->drx_Config = do_DrxConfig(cc_id, &rrc_inst->configuration, UEcap); // drx_Config IE
LOG_D(RRC, "DRX configured in mac main config for RRC Connection Reconfiguration\n");
} else { // CDRX not implemented for TDD and LTE-M (09/04/19)
mac_MainConfig->drx_Config = NULL;
if (mac_MainConfig->drx_Config == NULL) {
LOG_W(RRC, "drx_Configuration parameter is NULL, cannot configure local UE parameters or CDRX is deactivated\n");
} else {
/* Send DRX configuration to MAC task to configure timers of local UE context */
message_p = itti_alloc_new_message(TASK_RRC_ENB, RRC_MAC_DRX_CONFIG_REQ);
RRC_MAC_DRX_CONFIG_REQ(message_p).rnti = rnti;
RRC_MAC_DRX_CONFIG_REQ(message_p).drx_Configuration = mac_MainConfig->drx_Config;
itti_send_msg_to_task(TASK_MAC_ENB, module_id, message_p);
LOG_D(RRC, "DRX configured in MAC Main Configuration for RRC Connection Reconfiguration\n");
}
} else { // UE_id invalid
LOG_E(RRC, "Invalid UE_id found!\n");
mac_MainConfig->drx_Config = NULL;
}
} else { // No CDRX with the CU/DU split in this version
LOG_E(RRC, "CU/DU split activated\n");
mac_MainConfig->drx_Config = NULL;
}
/* End of CDRX configuration */
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
sr_ProhibitTimer_r9 = CALLOC(1, sizeof(long));
......@@ -3701,6 +3685,7 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
uint8_t buffer[RRC_BUF_SIZE];
uint16_t size;
int i;
MessageDef *message_p = NULL;
/* Configure SRB1/SRB2, PhysicalConfigDedicated, LTE_MAC_MainConfig for UE */
eNB_RRC_INST *rrc_inst = RC.rrc[ctxt_pP->module_id];
......@@ -3752,8 +3737,6 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
LTE_C_RNTI_t *cba_RNTI = NULL;
int measurements_enabled;
uint8_t xid = rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id); //Transaction_id,
uint8_t cc_id = ue_context_pP->ue_context.primaryCC_id;
LTE_UE_EUTRA_Capability_t *UEcap = ue_context_pP->ue_context.UE_Capability;
#ifdef CBA // Contention Based Access
uint8_t *cba_RNTI_buf;
......@@ -3934,45 +3917,30 @@ 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.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)) {
/* CDRX Configuration */
// Need to check if UE is a BR UE
mac_MainConfig->drx_Config = NULL;
rnti_t rnti = ue_context_pP->ue_id_rnti;
module_id_t module_id = ctxt_pP->module_id;
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 ((rrc_inst->carrier[cc_id].sib1->tdd_Config == NULL) &&
(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)
uint8_t cc_id = ue_context_pP->ue_context.primaryCC_id;
LTE_UE_EUTRA_Capability_t *UEcap = ue_context_pP->ue_context.UE_Capability;
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(module_id, cc_id, &rrc_inst->configuration, UEcap); // drx_Config IE
} else {
LOG_E(RRC, "Invalid CC_id for DRX configuration\n");
}
if (NODE_IS_MONOLITHIC(rrc_inst->node_type)) {
mac_MainConfig->drx_Config = do_DrxConfig(cc_id, &rrc_inst->configuration, UEcap); // drx_Config IE
/* Set timers and thresholds values in local MAC context of UE */
eNB_Config_Local_DRX(module_id, ue_context_pP->ue_id_rnti, mac_MainConfig->drx_Config);
LOG_D(RRC, "DRX configured in mac main config for RRC Connection Reconfiguration\n");
} else { // CDRX not implemented for TDD and LTE-M (09/04/19)
mac_MainConfig->drx_Config = NULL;
}
} else { // UE_id invalid
LOG_E(RRC, "Invalid UE_id found!\n");
mac_MainConfig->drx_Config = NULL;
if (mac_MainConfig->drx_Config == NULL) {
LOG_W(RRC, "drx_Configuration parameter is NULL, cannot configure local UE parameters or CDRX is deactivated\n");
} else {
/* Send DRX configuration to MAC task to configure timers of local UE context */
message_p = itti_alloc_new_message(TASK_RRC_ENB, RRC_MAC_DRX_CONFIG_REQ);
RRC_MAC_DRX_CONFIG_REQ(message_p).rnti = rnti;
RRC_MAC_DRX_CONFIG_REQ(message_p).drx_Configuration = mac_MainConfig->drx_Config;
itti_send_msg_to_task(TASK_MAC_ENB, module_id, message_p);
LOG_D(RRC, "DRX configured in MAC Main Configuration for RRC Connection Reconfiguration\n");
}
} else { // No CDRX with the CU/DU split in this version
LOG_E(RRC, "CU/DU split activated\n");
mac_MainConfig->drx_Config = NULL;
}
/* End of CDRX configuration */
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
sr_ProhibitTimer_r9 = CALLOC(1, sizeof(long));
......@@ -6493,21 +6461,27 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
ue_context_pP->ue_context.ue_reestablishment_timer = 0;
ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // reset rrc inactivity timer
if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
/* CDRX: activated if ack was expected */
int UE_id_mac = find_UE_id(ctxt_pP->module_id, ue_context_pP->ue_context.rnti);
if (UE_id_mac == -1){
LOG_E(RRC,PROTOCOL_RRC_CTXT_UE_FMT" rrc_eNB_process_RRCConnectionReconfigurationComplete without UE_id(MAC) rnti %x, let's return\n",PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ue_context_pP->ue_context.rnti);
/* CDRX: activated when RRC Connection Reconfiguration Complete is received */
rnti_t rnti = ue_context_pP->ue_id_rnti;
module_id_t module_id = ctxt_pP->module_id;
if (NODE_IS_MONOLITHIC(RC.rrc[module_id]->node_type)) {
int UE_id_mac = find_UE_id(module_id, rnti);
if (UE_id_mac == -1) {
LOG_E(RRC, "Can't find UE_id(MAC) of UE rnti %x\n", rnti);
return;
}
UE_sched_ctrl_t *UE_scheduling_control = &(RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id_mac]);
UE_sched_ctrl_t *UE_scheduling_control = &(RC.mac[module_id]->UE_list.UE_sched_ctrl[UE_id_mac]);
if (UE_scheduling_control->cdrx_waiting_ack == TRUE) {
UE_scheduling_control->cdrx_waiting_ack = FALSE;
UE_scheduling_control->cdrx_configured = TRUE;
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");
}
} // No CDRX with the CU/DU split in this version of the code
}
/* End of CDRX processing */
T(T_ENB_RRC_CONNECTION_RECONFIGURATION_COMPLETE,
T_INT(ctxt_pP->module_id),
......
......@@ -40,6 +40,7 @@
# include "f1ap_cu_task.h"
# include "f1ap_du_task.h"
# include "enb_app.h"
# include "openair2/LAYER2/MAC/mac_proto.h"
extern RAN_CONTEXT_t RC;
......@@ -63,7 +64,6 @@ int create_tasks(uint32_t enb_nb) {
AssertFatal(rc >= 0, "Create task for SCTP failed\n");
}
if (EPC_MODE_ENABLED && !NODE_IS_DU(type)) {
rc = itti_create_task(TASK_S1AP, s1ap_eNB_task, NULL);
AssertFatal(rc >= 0, "Create task for S1AP failed\n");
......@@ -91,5 +91,11 @@ int create_tasks(uint32_t enb_nb) {
AssertFatal(rc >= 0, "Create task for DU F1AP failed\n");
}
if (!NODE_IS_CU(type)) {
LOG_I(MAC,"Creating MAC eNB Task\n");
rc = itti_create_task(TASK_MAC_ENB, mac_enb_task, NULL);
AssertFatal(rc >= 0, "Create task for MAC eNB failed\n");
}
return 0;
}
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