From cee89cb389245b2fd13a0ddf31b9741b78180f82 Mon Sep 17 00:00:00 2001 From: Navid Nikaein <navid.nikaein@eurecom.fr> Date: Wed, 19 Sep 2018 21:22:24 +0200 Subject: [PATCH] Send the UL_RRC_MESSAGE over DCCH from CU to RRC --- openair2/F1AP/f1ap_cu_rrc_message_transfer.c | 28 ++++++++++++++------ openair2/LAYER2/RLC/rlc.c | 2 +- openair2/RRC/LTE/rrc_eNB.c | 3 +-- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c index 4948e2ebe1..638717b54f 100644 --- a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c @@ -332,7 +332,10 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance, F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_ULRRCMessageTransferIEs_t, ie, container, F1AP_ProtocolIE_ID_id_SRBID, true); srb_id = ie->value.choice.SRBID; - LOG_D(CU_F1AP, "srb_id %lu \n", srb_id); + if (srb_id < 1 ) + LOG_E(CU_F1AP, "Unexpected UL RRC MESSAGE for srb_id %lu (CCCH)\n", srb_id); + else + LOG_D(CU_F1AP, "UL RRC MESSAGE for srb_id %lu in DCCH \n", srb_id); // issue in here @@ -340,16 +343,25 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance, /* RRC Container */ F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_ULRRCMessageTransferIEs_t, ie, container, F1AP_ProtocolIE_ID_id_RRCContainer, true); - // BK: need check - // create an ITTI message and copy SDU - message_p = itti_alloc_new_message (TASK_CU_F1, RRC_MAC_CCCH_DATA_IND); - memset (RRC_MAC_CCCH_DATA_IND (message_p).sdu, 0, CCCH_SDU_SIZE); - ccch_sdu_len = ie->value.choice.RRCContainer.size; - memcpy(RRC_MAC_CCCH_DATA_IND (message_p).sdu, ie->value.choice.RRCContainer.buf, - ccch_sdu_len); + // print message in debug mode LOG_D(CU_F1AP, "RRCContainer(CCCH) :"); for (int i=0;i<ie->value.choice.RRCContainer.size;i++) LOG_D(CU_F1AP, "%2x ",RRC_MAC_CCCH_DATA_IND (message_p).sdu[i]); LOG_D(CU_F1AP, "\n"); + // create an ITTI message and copy SDU + message_p = itti_alloc_new_message (TASK_CU_F1, RRC_DCCH_DATA_IND); + memset (RRC_DCCH_DATA_IND (message_p).sdu_p, 0, CCCH_SDU_SIZE); + + RRC_DCCH_DATA_IND (message_p).sdu_size = ie->value.choice.RRCContainer.size; + memcpy(RRC_DCCH_DATA_IND (message_p).sdu_p, ie->value.choice.RRCContainer.buf, + ie->value.choice.RRCContainer.size); + + RRC_DCCH_DATA_IND (message_p).dcch_index = srb_id; + RRC_DCCH_DATA_IND (message_p).rnti = f1ap_get_rnti_by_cu_id(&f1ap_cu_ue[instance],cu_ue_f1ap_id); + RRC_DCCH_DATA_IND (message_p).module_id = instance; + RRC_DCCH_DATA_IND (message_p).eNB_index = instance; // not needed for CU + + itti_send_msg_to_task(TASK_RRC_ENB, instance, message_p); + return 0; } diff --git a/openair2/LAYER2/RLC/rlc.c b/openair2/LAYER2/RLC/rlc.c index 793e140641..17918cd5ae 100644 --- a/openair2/LAYER2/RLC/rlc.c +++ b/openair2/LAYER2/RLC/rlc.c @@ -63,7 +63,7 @@ async_server_thread_init (void) //create log_list //log_list_init(&log_list); - AssertFatal(0, "this should not be reached!\n"); + //AssertFatal(0, "this should not be reached!\n"); async_server_shutdown = 0; if ((pthread_mutex_init (&async_server_lock, NULL) != 0) diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index 1f58e85668..4c54f75d29 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -6981,8 +6981,7 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) { F1AP_UL_RRC_MESSAGE (message_p).srb_id = DCCH; itti_send_msg_to_task (TASK_DU_F1, ctxt_pP->module_id, message_p); LOG_D(RRC, "Send F1AP_UL_RRC_MESSAGE with ITTI\n"); - } else { //if ((RC.rrc[ctxt_pP->module_id]->node_type == ngran_eNB) || - // (RC.rrc[ctxt_pP->module_id]->node_type == ngran_ng_eNB) ) { + } else { // eNB or CU node type rrc_eNB_process_RRCConnectionSetupComplete( ctxt_pP, ue_context_p, -- GitLab