From 1a07a1e06744c072ccb89ac8978eb17359ac2760 Mon Sep 17 00:00:00 2001 From: Robert Schmidt <robert.schmidt@eurecom.fr> Date: Fri, 22 Feb 2019 10:26:41 +0100 Subject: [PATCH] Replace redundant CU_F1AP/DU_F1AP with F1AP --- common/utils/LOG/log.c | 2 - common/utils/LOG/log.h | 2 - common/utils/T/T_messages.txt | 42 ------ openair2/F1AP/f1ap_cu_interface_management.c | 60 ++++---- openair2/F1AP/f1ap_cu_rrc_message_transfer.c | 37 ++--- openair2/F1AP/f1ap_cu_task.c | 27 ++-- openair2/F1AP/f1ap_cu_task.h | 6 +- openair2/F1AP/f1ap_cu_ue_context_management.c | 10 +- openair2/F1AP/f1ap_du_interface_management.c | 89 ++++++------ openair2/F1AP/f1ap_du_rrc_message_transfer.c | 134 +++++++++--------- openair2/F1AP/f1ap_du_task.c | 20 +-- openair2/F1AP/f1ap_du_task.h | 6 +- openair2/F1AP/f1ap_du_ue_context_management.c | 20 +-- openair2/F1AP/f1ap_encoder.c | 2 - 14 files changed, 210 insertions(+), 247 deletions(-) diff --git a/common/utils/LOG/log.c b/common/utils/LOG/log.c index 296a011ead..d97cf808d5 100644 --- a/common/utils/LOG/log.c +++ b/common/utils/LOG/log.c @@ -406,8 +406,6 @@ int logInit (void) { register_log_component("GTPV1U","",GTPU); register_log_component("S1AP","",S1AP); register_log_component("F1AP","",F1AP); - register_log_component("CU_F1AP","",CU_F1AP); - register_log_component("DU_F1AP","",DU_F1AP); register_log_component("X2AP","",X2AP); register_log_component("SCTP","",SCTP); register_log_component("X2AP","",X2AP); diff --git a/common/utils/LOG/log.h b/common/utils/LOG/log.h index f570520257..350d1e9624 100644 --- a/common/utils/LOG/log.h +++ b/common/utils/LOG/log.h @@ -206,8 +206,6 @@ typedef enum { SPGW, S1AP, F1AP, - DU_F1AP, - CU_F1AP, SCTP, HW, OSA, diff --git a/common/utils/T/T_messages.txt b/common/utils/T/T_messages.txt index 9d8aa0e17e..5281647b5e 100644 --- a/common/utils/T/T_messages.txt +++ b/common/utils/T/T_messages.txt @@ -923,48 +923,6 @@ ID = LEGACY_F1AP_ERROR GROUP = ALL:LEGACY_F1AP:LEGACY_GROUP_ERROR:LEGACY FORMAT = string,log -ID = LEGACY_CU_F1AP_TRACE - DESC = CU_F1AP TRACE LEVEL - GROUP = ALL:LEGACY_CU_F1AP:LEGACY_GROUP_TRACE:LEGACY - FORMAT = string,log -ID = LEGACY_CU_F1AP_DEBUG - DESC = CU_F1AP DEBUG LEVEL - GROUP = ALL:LEGACY_CU_F1AP:LEGACY_GROUP_DEBUG:LEGACY - FORMAT = string,log -ID = LEGACY_CU_F1AP_INFO - DESC = CU_F1AP INFO LEVEL - GROUP = ALL:LEGACY_CU_F1AP:LEGACY_GROUP_INFO:LEGACY - FORMAT = string,log -ID = LEGACY_CU_F1AP_WARNING - DESC = CU_F1AP WARNING LEVEL - GROUP = ALL:LEGACY_CU_F1AP:LEGACY_GROUP_WARNING:LEGACY - FORMAT = string,log -ID = LEGACY_CU_F1AP_ERROR - DESC = CU_F1AP ERROR LEVEL - GROUP = ALL:LEGACY_CU_F1AP:LEGACY_GROUP_ERROR:LEGACY - FORMAT = string,log - -ID = LEGACY_DU_F1AP_TRACE - DESC = DU_F1AP TRACE LEVEL - GROUP = ALL:LEGACY_DU_F1AP:LEGACY_GROUP_TRACE:LEGACY - FORMAT = string,log -ID = LEGACY_DU_F1AP_DEBUG - DESC = DU_F1AP DEBUG LEVEL - GROUP = ALL:LEGACY_DU_F1AP:LEGACY_GROUP_DEBUG:LEGACY - FORMAT = string,log -ID = LEGACY_DU_F1AP_INFO - DESC = DU_F1AP INFO LEVEL - GROUP = ALL:LEGACY_DU_F1AP:LEGACY_GROUP_INFO:LEGACY - FORMAT = string,log -ID = LEGACY_DU_F1AP_WARNING - DESC = DU_F1AP WARNING LEVEL - GROUP = ALL:LEGACY_DU_F1AP:LEGACY_GROUP_WARNING:LEGACY - FORMAT = string,log -ID = LEGACY_DU_F1AP_ERROR - DESC = DU_F1AP ERROR LEVEL - GROUP = ALL:LEGACY_DU_F1AP:LEGACY_GROUP_ERROR:LEGACY - FORMAT = string,log - ################# #### UE LOGS #### ################# diff --git a/openair2/F1AP/f1ap_cu_interface_management.c b/openair2/F1AP/f1ap_cu_interface_management.c index 9039b967c4..a414c27383 100644 --- a/openair2/F1AP/f1ap_cu_interface_management.c +++ b/openair2/F1AP/f1ap_cu_interface_management.c @@ -84,7 +84,7 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { - LOG_D(CU_F1AP, "CU_handle_F1_SETUP_REQUEST\n"); + LOG_D(F1AP, "CU_handle_F1_SETUP_REQUEST\n"); MessageDef *message_p; F1AP_F1SetupRequest_t *container; @@ -112,7 +112,7 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_F1SetupRequestIEs_t, ie, container, F1AP_ProtocolIE_ID_id_gNB_DU_ID, true); asn_INTEGER2ulong(&ie->value.choice.GNB_DU_ID, &F1AP_SETUP_REQ(message_p).gNB_DU_id); - LOG_D(CU_F1AP, "F1AP_SETUP_REQ(message_p).gNB_DU_id %lu \n", F1AP_SETUP_REQ(message_p).gNB_DU_id); + LOG_D(F1AP, "F1AP_SETUP_REQ(message_p).gNB_DU_id %lu \n", F1AP_SETUP_REQ(message_p).gNB_DU_id); /* gNB_DU_name */ F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_F1SetupRequestIEs_t, ie, container, @@ -122,13 +122,14 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, ie->value.choice.GNB_DU_Name.size); /* Convert the mme name to a printable string */ F1AP_SETUP_REQ(message_p).gNB_DU_name[ie->value.choice.GNB_DU_Name.size] = '\0'; - LOG_D(CU_F1AP, "F1AP_SETUP_REQ(message_p).gNB_DU_name %s \n", F1AP_SETUP_REQ(message_p).gNB_DU_name); + LOG_D(F1AP, "F1AP_SETUP_REQ(message_p).gNB_DU_name %s \n", F1AP_SETUP_REQ(message_p).gNB_DU_name); /* GNB_DU_Served_Cells_List */ F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_F1SetupRequestIEs_t, ie, container, F1AP_ProtocolIE_ID_id_gNB_DU_Served_Cells_List, true); F1AP_SETUP_REQ(message_p).num_cells_available = ie->value.choice.GNB_DU_Served_Cells_List.list.count; - LOG_D(CU_F1AP, "F1AP_SETUP_REQ(message_p).num_cells_available %d \n", F1AP_SETUP_REQ(message_p).num_cells_available); + LOG_D(F1AP, "F1AP_SETUP_REQ(message_p).num_cells_available %d \n", + F1AP_SETUP_REQ(message_p).num_cells_available); int num_cells_available = F1AP_SETUP_REQ(message_p).num_cells_available; @@ -139,7 +140,8 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, /* tac */ OCTET_STRING_TO_INT16(&(served_celles_item_p->served_Cell_Information.fiveGS_TAC), F1AP_SETUP_REQ(message_p).tac[i]); - LOG_D(CU_F1AP, "F1AP_SETUP_REQ(message_p).tac[%d] %d \n", i, F1AP_SETUP_REQ(message_p).tac[i]); + LOG_D(F1AP, "F1AP_SETUP_REQ(message_p).tac[%d] %d \n", + i, F1AP_SETUP_REQ(message_p).tac[i]); /* - nRCGI */ TBCD_TO_MCC_MNC(&(served_celles_item_p->served_Cell_Information.nRCGI.pLMN_Identity), F1AP_SETUP_REQ(message_p).mcc[i], @@ -150,19 +152,20 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, // NR cellID BIT_STRING_TO_NR_CELL_IDENTITY(&served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity, F1AP_SETUP_REQ(message_p).nr_cellid[i]); - LOG_D(CU_F1AP, "[SCTP %d] Received nRCGI: MCC %d, MNC %d, CELL_ID %llu\n", assoc_id, - F1AP_SETUP_REQ(message_p).mcc[i], - F1AP_SETUP_REQ(message_p).mnc[i], - (long long unsigned int)F1AP_SETUP_REQ(message_p).nr_cellid[i]); - LOG_D(CU_F1AP, "nr_cellId : %x %x %x %x %x\n", - served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[0], - served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[1], - served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[2], - served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[3], - served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[4]); + LOG_D(F1AP, "[SCTP %d] Received nRCGI: MCC %d, MNC %d, CELL_ID %llu\n", assoc_id, + F1AP_SETUP_REQ(message_p).mcc[i], + F1AP_SETUP_REQ(message_p).mnc[i], + (long long unsigned int)F1AP_SETUP_REQ(message_p).nr_cellid[i]); + LOG_D(F1AP, "nr_cellId : %x %x %x %x %x\n", + served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[0], + served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[1], + served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[2], + served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[3], + served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[4]); /* - nRPCI */ F1AP_SETUP_REQ(message_p).nr_pci[i] = served_celles_item_p->served_Cell_Information.nRPCI; - LOG_D(CU_F1AP, "F1AP_SETUP_REQ(message_p).nr_pci[%d] %d \n", i, F1AP_SETUP_REQ(message_p).nr_pci[i]); + LOG_D(F1AP, "F1AP_SETUP_REQ(message_p).nr_pci[%d] %d \n", + i, F1AP_SETUP_REQ(message_p).nr_pci[i]); // System Information /* mib */ @@ -172,7 +175,8 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, /* Convert the mme name to a printable string */ F1AP_SETUP_REQ(message_p).mib[i][served_celles_item_p->gNB_DU_System_Information->mIB_message.size] = '\0'; F1AP_SETUP_REQ(message_p).mib_length[i] = served_celles_item_p->gNB_DU_System_Information->mIB_message.size; - LOG_D(CU_F1AP, "F1AP_SETUP_REQ(message_p).mib[%d] %s , len = %d \n", i, F1AP_SETUP_REQ(message_p).mib[i], F1AP_SETUP_REQ(message_p).mib_length[i]); + LOG_D(F1AP, "F1AP_SETUP_REQ(message_p).mib[%d] %s , len = %d \n", + i, F1AP_SETUP_REQ(message_p).mib[i], F1AP_SETUP_REQ(message_p).mib_length[i]); /* sib1 */ F1AP_SETUP_REQ(message_p).sib1[i] = calloc(served_celles_item_p->gNB_DU_System_Information->sIB1_message.size + 1, sizeof(char)); @@ -181,7 +185,8 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, /* Convert the mme name to a printable string */ F1AP_SETUP_REQ(message_p).sib1[i][served_celles_item_p->gNB_DU_System_Information->sIB1_message.size] = '\0'; F1AP_SETUP_REQ(message_p).sib1_length[i] = served_celles_item_p->gNB_DU_System_Information->sIB1_message.size; - LOG_D(CU_F1AP, "F1AP_SETUP_REQ(message_p).sib1[%d] %s , len = %d \n", i, F1AP_SETUP_REQ(message_p).sib1[i], F1AP_SETUP_REQ(message_p).sib1_length[i]); + LOG_D(F1AP, "F1AP_SETUP_REQ(message_p).sib1[%d] %s , len = %d \n", + i, F1AP_SETUP_REQ(message_p).sib1[i], F1AP_SETUP_REQ(message_p).sib1_length[i]); } @@ -305,7 +310,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, ie->value.present = F1AP_F1SetupResponseIEs__value_PR_Cells_to_be_Activated_List; int num_cells_to_activate = f1ap_setup_resp->num_cells_to_activate; - LOG_D(CU_F1AP, "num_cells_to_activate = %d \n", num_cells_to_activate); + LOG_D(F1AP, "num_cells_to_activate = %d \n", num_cells_to_activate); for (i=0; i<num_cells_to_activate; i++) { @@ -346,15 +351,16 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, F1AP_GNB_CUSystemInformation_t *gNB_CUSystemInformation = (F1AP_GNB_CUSystemInformation_t *)calloc(1, sizeof(F1AP_GNB_CUSystemInformation_t)); #ifdef F1AP_DEBUG - LOG_D(CU_F1AP, "SI %d: ",i); - for (int n=0;n<f1ap_setup_resp->SI_container_length[i][0];n++) printf("%2x ",f1ap_setup_resp->SI_container[i][0][n]); - LOG_D(CU_F1AP, "\n"); + LOG_I(F1AP, "SI %d: ", i); + for (int n = 0; n < f1ap_setup_resp->SI_container_length[i][0]; n++) + printf("%2x ", f1ap_setup_resp->SI_container[i][0][n]); + printf("\n"); #endif OCTET_STRING_fromBuf(&gNB_CUSystemInformation->sImessage, (const char*)f1ap_setup_resp->SI_container[i][0], f1ap_setup_resp->SI_container_length[i][0]); - LOG_D(CU_F1AP, "f1ap_setup_resp->SI_container_length = %d \n" , f1ap_setup_resp->SI_container_length[0][0]); + LOG_D(F1AP, "f1ap_setup_resp->SI_container_length = %d \n", f1ap_setup_resp->SI_container_length[0][0]); cells_to_be_activated_list_itemExtIEs->extensionValue.choice.GNB_CUSystemInformation = *gNB_CUSystemInformation; @@ -375,7 +381,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, /* encode */ if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { - LOG_E(CU_F1AP, "Failed to encode F1 setup request\n"); + LOG_E(F1AP, "Failed to encode F1 setup request\n"); return -1; } @@ -385,7 +391,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, } int CU_send_F1_SETUP_FAILURE(instance_t instance) { - LOG_D(CU_F1AP, "CU_send_F1_SETUP_FAILURE\n"); + LOG_D(F1AP, "CU_send_F1_SETUP_FAILURE\n"); module_id_t enb_mod_idP; module_id_t cu_mod_idP; @@ -461,7 +467,7 @@ int CU_send_F1_SETUP_FAILURE(instance_t instance) { /* encode */ if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { - LOG_E(CU_F1AP, "Failed to encode F1 setup request\n"); + LOG_E(F1AP, "Failed to encode F1 setup request\n"); return -1; } @@ -865,7 +871,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, module_id_t du_mod_ /* encode */ if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { - LOG_E(CU_F1AP, "Failed to encode F1 setup request\n"); + LOG_E(F1AP, "Failed to encode F1 setup request\n"); return -1; } diff --git a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c index a8e7a020cb..fc104b266a 100644 --- a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c @@ -64,7 +64,7 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { - LOG_D(CU_F1AP, "CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER\n"); + LOG_D(F1AP, "CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER\n"); // decode the F1 message // get the rrc message from the contauiner // call func rrc_eNB_decode_ccch: <-- needs some update here @@ -80,8 +80,8 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance, DevAssert(pdu != NULL); if (stream != 0) { - LOG_E(CU_F1AP, "[SCTP %d] Received F1 on stream != 0 (%d)\n", - assoc_id, stream); + LOG_E(F1AP, "[SCTP %d] Received F1 on stream != 0 (%d)\n", + assoc_id, stream); return -1; } // TODO: use context @@ -94,7 +94,7 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance, F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_InitialULRRCMessageTransferIEs_t, ie, container, F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true); du_ue_f1ap_id = ie->value.choice.GNB_DU_UE_F1AP_ID; - LOG_D(CU_F1AP, "du_ue_f1ap_id %lu \n", du_ue_f1ap_id); + LOG_D(F1AP, "du_ue_f1ap_id %lu \n", du_ue_f1ap_id); /* NRCGI * TODO: process NRCGI @@ -122,9 +122,10 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance, memcpy(RRC_MAC_CCCH_DATA_IND (message_p).sdu, ie->value.choice.RRCContainer.buf, ccch_sdu_len); #ifdef F1AP_DEBUG - LOG_I(CU_F1AP, "RRCContainer(CCCH) :"); - for (int i=0;i<ie->value.choice.RRCContainer.size;i++) printf("%2x ",RRC_MAC_CCCH_DATA_IND (message_p).sdu[i]); - LOG_I(CU_F1AP, "\n"); + LOG_I(F1AP, "RRCContainer (CCCH):"); + for (int i = 0; i < ie->value.choice.RRCContainer.size; i++) + printf("%2x ", RRC_MAC_CCCH_DATA_IND (message_p).sdu[i]); + printf("\n"); #endif // Find instance from nr_cellid int rrc_inst = -1; @@ -140,7 +141,7 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance, int f1ap_uid = f1ap_add_ue(&f1ap_cu_inst[rrc_inst], rrc_inst, CC_id, 0, rnti); if (f1ap_uid < 0 ) { - LOG_E(CU_F1AP, "Failed to add UE \n"); + LOG_E(F1AP, "Failed to add UE \n"); return -1; } f1ap_cu_inst[rrc_inst].f1ap_ue[f1ap_uid].du_ue_f1ap_id = du_ue_f1ap_id; @@ -194,8 +195,8 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ie->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_GNB_CU_UE_F1AP_ID; ie->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(&f1ap_cu_inst[instance], f1ap_dl_rrc->rnti); ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); - LOG_I(CU_F1AP, "Setting GNB_CU_UE_F1AP_ID %llu associated with UE RNTI %x (instance %d)\n", - (unsigned long long int)ie->value.choice.GNB_CU_UE_F1AP_ID, f1ap_dl_rrc->rnti, instance); + LOG_I(F1AP, "Setting GNB_CU_UE_F1AP_ID %llu associated with UE RNTI %x (instance %d)\n", + (unsigned long long int)ie->value.choice.GNB_CU_UE_F1AP_ID, f1ap_dl_rrc->rnti, instance); /* mandatory */ @@ -206,7 +207,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ie->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_GNB_DU_UE_F1AP_ID; ie->value.choice.GNB_DU_UE_F1AP_ID = f1ap_get_du_ue_f1ap_id(&f1ap_cu_inst[instance], f1ap_dl_rrc->rnti); ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); - LOG_I(CU_F1AP, "GNB_DU_UE_F1AP_ID %llu associated with UE RNTI %x \n", (unsigned long long int)ie->value.choice.GNB_DU_UE_F1AP_ID, f1ap_dl_rrc->rnti); + LOG_I(F1AP, "GNB_DU_UE_F1AP_ID %llu associated with UE RNTI %x \n", (unsigned long long int)ie->value.choice.GNB_DU_UE_F1AP_ID, f1ap_dl_rrc->rnti); /* optional */ /* c3. oldgNB_DU_UE_F1AP_ID */ @@ -268,7 +269,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance, /* encode */ if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { - LOG_E(CU_F1AP, "Failed to encode F1 setup request\n"); + LOG_E(F1AP, "Failed to encode F1 setup request\n"); return -1; } @@ -286,7 +287,7 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { - LOG_D(CU_F1AP, "CU_handle_UL_RRC_MESSAGE_TRANSFER \n"); + LOG_D(F1AP, "CU_handle_UL_RRC_MESSAGE_TRANSFER \n"); F1AP_ULRRCMessageTransfer_t *container; F1AP_ULRRCMessageTransferIEs_t *ie; @@ -311,14 +312,14 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance, F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_ULRRCMessageTransferIEs_t, ie, container, F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID, true); cu_ue_f1ap_id = ie->value.choice.GNB_CU_UE_F1AP_ID; - LOG_D(CU_F1AP, "cu_ue_f1ap_id %lu associated with RNTI %x\n", cu_ue_f1ap_id, f1ap_get_rnti_by_cu_id(&f1ap_cu_inst[instance], cu_ue_f1ap_id)); + LOG_D(F1AP, "cu_ue_f1ap_id %lu associated with RNTI %x\n", cu_ue_f1ap_id, f1ap_get_rnti_by_cu_id(&f1ap_cu_inst[instance], cu_ue_f1ap_id)); /* GNB_DU_UE_F1AP_ID */ F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_ULRRCMessageTransferIEs_t, ie, container, F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true); du_ue_f1ap_id = ie->value.choice.GNB_DU_UE_F1AP_ID; - LOG_D(CU_F1AP, "du_ue_f1ap_id %lu associated with RNTI %x\n", du_ue_f1ap_id, f1ap_get_rnti_by_cu_id(&f1ap_cu_inst[instance], du_ue_f1ap_id)); + LOG_D(F1AP, "du_ue_f1ap_id %lu associated with RNTI %x\n", du_ue_f1ap_id, f1ap_get_rnti_by_cu_id(&f1ap_cu_inst[instance], du_ue_f1ap_id)); /* mandatory */ @@ -327,9 +328,9 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance, F1AP_ProtocolIE_ID_id_SRBID, true); srb_id = ie->value.choice.SRBID; if (srb_id < 1 ) - LOG_E(CU_F1AP, "Unexpected UL RRC MESSAGE for srb_id %lu \n", srb_id); + LOG_E(F1AP, "Unexpected UL RRC MESSAGE for srb_id %lu \n", srb_id); else - LOG_D(CU_F1AP, "UL RRC MESSAGE for srb_id %lu in DCCH \n", srb_id); + LOG_D(F1AP, "UL RRC MESSAGE for srb_id %lu in DCCH \n", srb_id); // issue in here @@ -364,7 +365,7 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance, ctxt.enb_flag = 1; mem_block_t *mb = get_free_mem_block(ie->value.choice.RRCContainer.size,__func__); memcpy((void*)mb->data,(void*)ie->value.choice.RRCContainer.buf,ie->value.choice.RRCContainer.size); - LOG_I(CU_F1AP, "Calling pdcp_data_ind for UE RNTI %x srb_id %lu with size %ld (DCCH) \n", ctxt.rnti, srb_id, ie->value.choice.RRCContainer.size); + LOG_I(F1AP, "Calling pdcp_data_ind for UE RNTI %x srb_id %lu with size %ld (DCCH) \n", ctxt.rnti, srb_id, ie->value.choice.RRCContainer.size); pdcp_data_ind (&ctxt, 1, // srb_flag 0, // embms_flag diff --git a/openair2/F1AP/f1ap_cu_task.c b/openair2/F1AP/f1ap_cu_task.c index c12193d1b3..9ab84e6bc9 100644 --- a/openair2/F1AP/f1ap_cu_task.c +++ b/openair2/F1AP/f1ap_cu_task.c @@ -19,7 +19,7 @@ * contact@openairinterface.org */ -/*! \file openair2/F1AP/CU_F1AP.c +/*! \file openair2/F1AP/f1ap_cu_task.c * \brief data structures for F1 interface modules * \author EURECOM/NTUST * \date 2018 @@ -98,7 +98,7 @@ void cu_task_send_sctp_init_req(instance_t enb_id) { // 2. use RC.rrc[enb_id] to fill the sctp_init_t with the ip, port // 3. creat an itti message to init - LOG_I(CU_F1AP, "F1AP_CU_SCTP_REQ(create socket)\n"); + LOG_I(F1AP, "F1AP_CU_SCTP_REQ(create socket)\n"); MessageDef *message_p = NULL; message_p = itti_alloc_new_message (TASK_CU_F1, SCTP_INIT_MSG); @@ -124,7 +124,7 @@ void *F1AP_CU_task(void *arg) { MessageDef *received_msg = NULL; int result; - LOG_I(CU_F1AP,"Starting F1AP at CU\n"); + LOG_I(F1AP, "Starting F1AP at CU\n"); // no RLC in CU, initialize mem pool for PDCP pool_buffer_init(); @@ -138,25 +138,28 @@ void *F1AP_CU_task(void *arg) { switch (ITTI_MSG_ID(received_msg)) { case SCTP_NEW_ASSOCIATION_IND: - LOG_I(CU_F1AP, "CU Task Received SCTP_NEW_ASSOCIATION_IND for instance %d\n",ITTI_MESSAGE_GET_INSTANCE(received_msg)); + LOG_I(F1AP, "CU Task Received SCTP_NEW_ASSOCIATION_IND for instance %d\n", + ITTI_MESSAGE_GET_INSTANCE(received_msg)); cu_task_handle_sctp_association_ind(ITTI_MESSAGE_GET_INSTANCE(received_msg), &received_msg->ittiMsg.sctp_new_association_ind); break; case SCTP_NEW_ASSOCIATION_RESP: - LOG_I(CU_F1AP, "CU Task Received SCTP_NEW_ASSOCIATION_RESP for instance %d\n",ITTI_MESSAGE_GET_INSTANCE(received_msg)); + LOG_I(F1AP, "CU Task Received SCTP_NEW_ASSOCIATION_RESP for instance %d\n", + ITTI_MESSAGE_GET_INSTANCE(received_msg)); cu_task_handle_sctp_association_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg), &received_msg->ittiMsg.sctp_new_association_resp); break; case SCTP_DATA_IND: - LOG_I(CU_F1AP, "CU Task Received SCTP_DATA_IND for Instance %d\n",ITTI_MESSAGE_GET_INSTANCE(received_msg)); + LOG_I(F1AP, "CU Task Received SCTP_DATA_IND for Instance %d\n", + ITTI_MESSAGE_GET_INSTANCE(received_msg)); cu_task_handle_sctp_data_ind(ITTI_MESSAGE_GET_INSTANCE(received_msg), &received_msg->ittiMsg.sctp_data_ind); break; case F1AP_SETUP_RESP: // from rrc - LOG_I(CU_F1AP, "CU Task Received F1AP_SETUP_RESP\n"); + LOG_I(F1AP, "CU Task Received F1AP_SETUP_RESP\n"); // CU_send_f1setup_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg), // &F1AP_SETUP_RESP(received_msg)); CU_send_F1_SETUP_RESPONSE(ITTI_MESSAGE_GET_INSTANCE(received_msg), @@ -164,13 +167,13 @@ void *F1AP_CU_task(void *arg) { break; case F1AP_DL_RRC_MESSAGE: // from rrc - LOG_I(CU_F1AP, "CU Task Received F1AP_DL_RRC_MESSAGE\n"); + LOG_I(F1AP, "CU Task Received F1AP_DL_RRC_MESSAGE\n"); CU_send_DL_RRC_MESSAGE_TRANSFER(ITTI_MESSAGE_GET_INSTANCE(received_msg), &F1AP_DL_RRC_MESSAGE(received_msg)); break; case F1AP_UE_CONTEXT_RELEASE_CMD: // from rrc - LOG_I(CU_F1AP, "CU Task Received F1AP_UE_CONTEXT_RELEASE_CMD\n"); + LOG_I(F1AP, "CU Task Received F1AP_UE_CONTEXT_RELEASE_CMD\n"); CU_send_UE_CONTEXT_RELEASE_COMMAND(ITTI_MESSAGE_GET_INSTANCE(received_msg), &F1AP_UE_CONTEXT_RELEASE_CMD(received_msg)); break; @@ -184,13 +187,13 @@ void *F1AP_CU_task(void *arg) { // break; case TERMINATE_MESSAGE: - LOG_W(CU_F1AP, " *** Exiting CU_F1AP thread\n"); + LOG_W(F1AP, " *** Exiting F1AP thread\n"); itti_exit_task(); break; default: - LOG_E(CU_F1AP, "CU Received unhandled message: %d:%s\n", - ITTI_MSG_ID(received_msg), ITTI_MSG_NAME(received_msg)); + LOG_E(F1AP, "CU Received unhandled message: %d:%s\n", + ITTI_MSG_ID(received_msg), ITTI_MSG_NAME(received_msg)); break; } // switch result = itti_free (ITTI_MSG_ORIGIN_ID(received_msg), received_msg); diff --git a/openair2/F1AP/f1ap_cu_task.h b/openair2/F1AP/f1ap_cu_task.h index 60747efbcb..dec844accf 100644 --- a/openair2/F1AP/f1ap_cu_task.h +++ b/openair2/F1AP/f1ap_cu_task.h @@ -19,8 +19,8 @@ * contact@openairinterface.org */ -#ifndef CU_F1AP_TASK_H_ -#define CU_F1AP_TASK_H_ +#ifndef F1AP_CU_TASK_H_ +#define F1AP_CU_TASK_H_ void cu_task_handle_sctp_association_ind(instance_t instance, sctp_new_association_ind_t *sctp_new_association_ind); void cu_task_handle_sctp_association_resp(instance_t instance, sctp_new_association_resp_t *sctp_new_association_resp); @@ -29,4 +29,4 @@ void cu_task_send_sctp_init_req(instance_t enb_id); void *F1AP_CU_task(void *arg); -#endif /* CU_F1AP_TASK_H_ */ +#endif /* F1AP_CU_TASK_H_ */ diff --git a/openair2/F1AP/f1ap_cu_ue_context_management.c b/openair2/F1AP/f1ap_cu_ue_context_management.c index 56db18c451..f0b7194bce 100644 --- a/openair2/F1AP/f1ap_cu_ue_context_management.c +++ b/openair2/F1AP/f1ap_cu_ue_context_management.c @@ -752,7 +752,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, /* encode */ if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { - LOG_E(CU_F1AP, "Failed to encode F1 setup request\n"); + LOG_E(F1AP, "Failed to encode F1 setup request\n"); return -1; } @@ -823,7 +823,7 @@ int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance, } */ - LOG_I(CU_F1AP, "Received UE CONTEXT RELEASE REQUEST: Trigger RRC for RNTI %x\n", rnti); + LOG_I(F1AP, "Received UE CONTEXT RELEASE REQUEST: Trigger RRC for RNTI %x\n", rnti); struct rrc_eNB_ue_context_s *ue_context_pP; ue_context_pP = rrc_eNB_get_ue_context(RC.rrc[instance], rnti); rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ( @@ -917,7 +917,7 @@ int CU_send_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, /* encode */ if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { - LOG_E(DU_F1AP, "Failed to encode F1 context release command\n"); + LOG_E(F1AP, "Failed to encode F1 context release command\n"); return -1; } @@ -1000,7 +1000,7 @@ int CU_handle_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, flexran_agent_get_rrc_xface(instance)->flexran_agent_notify_ue_state_change( instance, rnti, PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_DEACTIVATED); - LOG_I(CU_F1AP, "Received UE CONTEXT RELEASE COMPLETE: Removing CU UE entry for RNTI %x\n", rnti); + LOG_I(F1AP, "Received UE CONTEXT RELEASE COMPLETE: Removing CU UE entry for RNTI %x\n", rnti); f1ap_remove_ue(&f1ap_cu_inst[instance], rnti); return 0; } @@ -1469,7 +1469,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { /* encode */ if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { - LOG_E(CU_F1AP, "Failed to encode F1 setup request\n"); + LOG_E(F1AP, "Failed to encode F1 setup request\n"); return -1; } diff --git a/openair2/F1AP/f1ap_du_interface_management.c b/openair2/F1AP/f1ap_du_interface_management.c index ba5ca584f0..8f738cf066 100644 --- a/openair2/F1AP/f1ap_du_interface_management.c +++ b/openair2/F1AP/f1ap_du_interface_management.c @@ -145,7 +145,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { ie->value.present = F1AP_F1SetupRequestIEs__value_PR_GNB_DU_Served_Cells_List; int num_cells_available = f1ap_du_data->num_cells_available; - LOG_D(DU_F1AP, "num_cells_available = %d \n", num_cells_available); + LOG_D(F1AP, "num_cells_available = %d \n", num_cells_available); for (i=0; i<num_cells_available; i++) { @@ -170,16 +170,17 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { /* - nRCGI */ F1AP_NRCGI_t nRCGI; MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &nRCGI.pLMN_Identity); - LOG_D(DU_F1AP, "plmn: (%d,%d)\n",f1ap_du_data->mcc[i],f1ap_du_data->mnc[i]); + LOG_D(F1AP, "plmn: (%d,%d)\n",f1ap_du_data->mcc[i],f1ap_du_data->mnc[i]); //MCC_MNC_TO_PLMNID(208, 95, 2, &nRCGI.pLMN_Identity); NR_CELL_ID_TO_BIT_STRING(f1ap_du_data->nr_cellid[i], &nRCGI.nRCellIdentity); - LOG_D(DU_F1AP, "nRCellIdentity (%llx): %x.%x.%x.%x.%x\n",(long long unsigned int)f1ap_du_data->nr_cellid[i], - nRCGI.nRCellIdentity.buf[0], - nRCGI.nRCellIdentity.buf[1], - nRCGI.nRCellIdentity.buf[2], - nRCGI.nRCellIdentity.buf[3], - nRCGI.nRCellIdentity.buf[4]); + LOG_D(F1AP, "nRCellIdentity (%llx): %x.%x.%x.%x.%x\n", + (long long unsigned int)f1ap_du_data->nr_cellid[i], + nRCGI.nRCellIdentity.buf[0], + nRCGI.nRCellIdentity.buf[1], + nRCGI.nRCellIdentity.buf[2], + nRCGI.nRCellIdentity.buf[3], + nRCGI.nRCellIdentity.buf[4]); served_cell_information.nRCGI = nRCGI; @@ -202,7 +203,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { /* - broadcast PLMNs */ // RK: add the num_available_broadcast_PLMNs to the message int num_available_broadcast_PLMNs = 1; //f1ap_du_data->num_available_broadcast_PLMNs; - LOG_D(DU_F1AP, "num_available_broadcast_PLMNs = %d \n", num_available_broadcast_PLMNs); + LOG_D(F1AP, "num_available_broadcast_PLMNs = %d \n", num_available_broadcast_PLMNs); for (j=0; j<num_available_broadcast_PLMNs; // num_available_broadcast_PLMNs j++) { @@ -235,7 +236,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { /* FDD.1.3 freqBandListNr */ int fdd_ul_num_available_freq_Bands = f1ap_du_data->nr_mode_info[i].fdd.ul_num_frequency_bands; - LOG_D(DU_F1AP, "fdd_ul_num_available_freq_Bands = %d \n", fdd_ul_num_available_freq_Bands); + LOG_D(F1AP, "fdd_ul_num_available_freq_Bands = %d \n", fdd_ul_num_available_freq_Bands); int fdd_ul_j; for (fdd_ul_j=0; fdd_ul_j<fdd_ul_num_available_freq_Bands; @@ -248,7 +249,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { /* FDD.1.3.2 supportedSULBandList*/ int num_available_supported_SULBands = f1ap_du_data->nr_mode_info[i].fdd.ul_num_sul_frequency_bands; - LOG_D(DU_F1AP, "num_available_supported_SULBands = %d \n", num_available_supported_SULBands); + LOG_D(F1AP, "num_available_supported_SULBands = %d \n", num_available_supported_SULBands); int fdd_ul_k; for (fdd_ul_k=0; fdd_ul_k<num_available_supported_SULBands; @@ -277,7 +278,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { /* FDD.2.3 freqBandListNr */ int fdd_dl_num_available_freq_Bands = f1ap_du_data->nr_mode_info[i].fdd.dl_num_frequency_bands; - LOG_D(DU_F1AP, "fdd_dl_num_available_freq_Bands = %d \n", fdd_dl_num_available_freq_Bands); + LOG_D(F1AP, "fdd_dl_num_available_freq_Bands = %d \n", fdd_dl_num_available_freq_Bands); int fdd_dl_j; for (fdd_dl_j=0; fdd_dl_j<fdd_dl_num_available_freq_Bands; @@ -290,7 +291,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { /* FDD.2.3.2 supportedSULBandList*/ int num_available_supported_SULBands = f1ap_du_data->nr_mode_info[i].fdd.dl_num_sul_frequency_bands; - LOG_D(DU_F1AP, "num_available_supported_SULBands = %d \n", num_available_supported_SULBands); + LOG_D(F1AP, "num_available_supported_SULBands = %d \n", num_available_supported_SULBands); int fdd_dl_k; for (fdd_dl_k=0; fdd_dl_k<num_available_supported_SULBands; @@ -331,7 +332,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { /* TDD.1.3 freqBandListNr */ int tdd_num_available_freq_Bands = f1ap_du_data->nr_mode_info[i].tdd.num_frequency_bands; - LOG_D(DU_F1AP, "tdd_num_available_freq_Bands = %d \n", tdd_num_available_freq_Bands); + LOG_D(F1AP, "tdd_num_available_freq_Bands = %d \n", tdd_num_available_freq_Bands); int j; for (j=0; j<tdd_num_available_freq_Bands; @@ -344,7 +345,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { /* TDD.1.3.2 supportedSULBandList*/ int num_available_supported_SULBands = f1ap_du_data->nr_mode_info[i].tdd.num_sul_frequency_bands; - LOG_D(DU_F1AP, "num_available_supported_SULBands = %d \n", num_available_supported_SULBands); + LOG_D(F1AP, "num_available_supported_SULBands = %d \n", num_available_supported_SULBands); int k; for (k=0; k<num_available_supported_SULBands; @@ -399,7 +400,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { /* encode */ if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { - LOG_E(DU_F1AP, "Failed to encode F1 setup request\n"); + LOG_E(F1AP, "Failed to encode F1 setup request\n"); return -1; } @@ -423,7 +424,7 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance, F1AP_F1AP_PDU_t *pdu) { - LOG_D(DU_F1AP, "DU_handle_F1_SETUP_RESPONSE\n"); + LOG_D(F1AP, "DU_handle_F1_SETUP_RESPONSE\n"); AssertFatal(pdu->present == F1AP_F1AP_PDU_PR_successfulOutcome, "pdu->present != F1AP_F1AP_PDU_PR_successfulOutcome\n"); @@ -444,8 +445,8 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance, MessageDef *msg_p = itti_alloc_new_message (TASK_DU_F1, F1AP_SETUP_RESP); - LOG_D(DU_F1AP, "F1AP: F1Setup-Resp: protocolIEs.list.count %d\n", - in->protocolIEs.list.count); + LOG_D(F1AP, "F1AP: F1Setup-Resp: protocolIEs.list.count %d\n", + in->protocolIEs.list.count); for (int i=0;i < in->protocolIEs.list.count; i++) { ie = in->protocolIEs.list.array[i]; switch (ie->id) { @@ -455,8 +456,8 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance, AssertFatal(ie->value.present == F1AP_F1SetupResponseIEs__value_PR_TransactionID, "ie->value.present != F1AP_F1SetupResponseIEs__value_PR_TransactionID\n"); TransactionId=ie->value.choice.TransactionID; - LOG_D(DU_F1AP, "F1AP: F1Setup-Resp: TransactionId %d\n", - TransactionId); + LOG_D(F1AP, "F1AP: F1Setup-Resp: TransactionId %d\n", + TransactionId); break; case F1AP_ProtocolIE_ID_id_gNB_CU_Name: AssertFatal(ie->criticality == F1AP_Criticality_ignore, @@ -466,8 +467,8 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance, F1AP_SETUP_RESP (msg_p).gNB_CU_name = malloc(ie->value.choice.GNB_CU_Name.size+1); memcpy(F1AP_SETUP_RESP (msg_p).gNB_CU_name,ie->value.choice.GNB_CU_Name.buf,ie->value.choice.GNB_CU_Name.size); F1AP_SETUP_RESP (msg_p).gNB_CU_name[ie->value.choice.GNB_CU_Name.size]='\0'; - LOG_D(DU_F1AP, "F1AP: F1Setup-Resp: gNB_CU_name %s\n", - F1AP_SETUP_RESP (msg_p).gNB_CU_name); + LOG_D(F1AP, "F1AP: F1Setup-Resp: gNB_CU_name %s\n", + F1AP_SETUP_RESP (msg_p).gNB_CU_name); break; case F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List: AssertFatal(ie->criticality == F1AP_Criticality_reject, @@ -475,7 +476,7 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance, AssertFatal(ie->value.present == F1AP_F1SetupResponseIEs__value_PR_Cells_to_be_Activated_List, "ie->value.present != F1AP_F1SetupResponseIEs__value_PR_Cells_to_be_Activated_List\n"); num_cells_to_activate = ie->value.choice.Cells_to_be_Activated_List.list.count; - LOG_D(DU_F1AP, "F1AP: Activating %d cells\n",num_cells_to_activate); + LOG_D(F1AP, "F1AP: Activating %d cells\n",num_cells_to_activate); for (int i=0;i<num_cells_to_activate;i++) { F1AP_Cells_to_be_Activated_List_ItemIEs_t *cells_to_be_activated_list_item_ies = ie->value.choice.Cells_to_be_Activated_List.list.array[i]; @@ -491,12 +492,12 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance, TBCD_TO_MCC_MNC(&cell->nRCGI.pLMN_Identity, F1AP_SETUP_RESP (msg_p).mcc[i], F1AP_SETUP_RESP (msg_p).mnc[i], F1AP_SETUP_RESP (msg_p).mnc_digit_length[i]); AssertFatal(cell->nRPCI != NULL, "nRPCI is null\n"); - LOG_D(DU_F1AP, "nr_cellId : %x %x %x %x %x\n", - cell->nRCGI.nRCellIdentity.buf[0], - cell->nRCGI.nRCellIdentity.buf[1], - cell->nRCGI.nRCellIdentity.buf[2], - cell->nRCGI.nRCellIdentity.buf[3], - cell->nRCGI.nRCellIdentity.buf[4]); + LOG_D(F1AP, "nr_cellId : %x %x %x %x %x\n", + cell->nRCGI.nRCellIdentity.buf[0], + cell->nRCGI.nRCellIdentity.buf[1], + cell->nRCGI.nRCellIdentity.buf[2], + cell->nRCGI.nRCellIdentity.buf[3], + cell->nRCGI.nRCellIdentity.buf[4]); BIT_STRING_TO_NR_CELL_IDENTITY(&cell->nRCGI.nRCellIdentity, F1AP_SETUP_RESP (msg_p).nr_cellid[i]); F1AP_SETUP_RESP (msg_p).nrpci[i] = *cell->nRPCI; @@ -505,13 +506,13 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance, AssertFatal(ext!=NULL,"Extension for SI is null\n"); F1AP_SETUP_RESP (msg_p).num_SI[i] = ext->list.count; AssertFatal(ext->list.count==1,"At least one SI message should be there, and only 1 for now!\n"); - LOG_D(DU_F1AP, "F1AP: F1Setup-Resp Cell %d MCC %d MNC %d NRCellid %lx num_si %d\n", - i, F1AP_SETUP_RESP (msg_p).mcc[i], F1AP_SETUP_RESP (msg_p).mnc[i], - F1AP_SETUP_RESP (msg_p).nr_cellid[i], F1AP_SETUP_RESP (msg_p).num_SI[i]); + LOG_D(F1AP, "F1AP: F1Setup-Resp Cell %d MCC %d MNC %d NRCellid %lx num_si %d\n", + i, F1AP_SETUP_RESP (msg_p).mcc[i], F1AP_SETUP_RESP (msg_p).mnc[i], + F1AP_SETUP_RESP (msg_p).nr_cellid[i], F1AP_SETUP_RESP (msg_p).num_SI[i]); for (int si =0;si < ext->list.count;si++) { size_t size = ext->list.array[si]->extensionValue.choice.GNB_CUSystemInformation.sImessage.size; F1AP_SETUP_RESP (msg_p).SI_container_length[i][si] = size; - LOG_D(DU_F1AP, "F1AP: F1Setup-Resp SI_container_length[%d][%d] %ld bytes\n", i, si, size); + LOG_D(F1AP, "F1AP: F1Setup-Resp SI_container_length[%d][%d] %ld bytes\n", i, si, size); F1AP_SETUP_RESP (msg_p).SI_container[i][si] = malloc(F1AP_SETUP_RESP (msg_p).SI_container_length[i][si]); memcpy((void*)F1AP_SETUP_RESP (msg_p).SI_container[i][si], @@ -538,8 +539,8 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance, 0,0,//MSC_AS_TIME_ARGS(ctxt_pP), assoc_id); - LOG_D(DU_F1AP, "Sending F1AP_SETUP_RESP ITTI message to ENB_APP with assoc_id (%d->%d)\n", - assoc_id,ENB_MODULE_ID_TO_INSTANCE(assoc_id)); + LOG_D(F1AP, "Sending F1AP_SETUP_RESP ITTI message to ENB_APP with assoc_id (%d->%d)\n", + assoc_id,ENB_MODULE_ID_TO_INSTANCE(assoc_id)); itti_send_msg_to_task(TASK_ENB_APP, ENB_MODULE_ID_TO_INSTANCE(assoc_id), msg_p); return 0; @@ -550,7 +551,7 @@ int DU_handle_F1_SETUP_FAILURE(instance_t instance, uint32_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { - LOG_E(DU_F1AP, "DU_handle_F1_SETUP_FAILURE\n"); + LOG_E(F1AP, "DU_handle_F1_SETUP_FAILURE\n"); return 0; } @@ -619,12 +620,12 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, /* - nRCGI */ F1AP_NRCGI_t nRCGI; MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &nRCGI.pLMN_Identity); - LOG_D(DU_F1AP, "nr_cellId : %x %x %x %x %x\n", - nRCGI.nRCellIdentity.buf[0], - nRCGI.nRCellIdentity.buf[1], - nRCGI.nRCellIdentity.buf[2], - nRCGI.nRCellIdentity.buf[3], - nRCGI.nRCellIdentity.buf[4]); + LOG_D(F1AP, "nr_cellId : %x %x %x %x %x\n", + nRCGI.nRCellIdentity.buf[0], + nRCGI.nRCellIdentity.buf[1], + nRCGI.nRCellIdentity.buf[2], + nRCGI.nRCellIdentity.buf[3], + nRCGI.nRCellIdentity.buf[4]); NR_CELL_ID_TO_BIT_STRING(f1ap_du_data->nr_cellid[i], &nRCGI.nRCellIdentity); served_cell_information.nRCGI = nRCGI; @@ -994,7 +995,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { - LOG_E(DU_F1AP, "Failed to encode F1 setup request\n"); + LOG_E(F1AP, "Failed to encode F1 setup request\n"); return -1; } diff --git a/openair2/F1AP/f1ap_du_rrc_message_transfer.c b/openair2/F1AP/f1ap_du_rrc_message_transfer.c index 05cc602451..27add35f5f 100644 --- a/openair2/F1AP/f1ap_du_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_du_rrc_message_transfer.c @@ -67,7 +67,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { #ifndef UETARGET - LOG_D(DU_F1AP, "DU_handle_DL_RRC_MESSAGE_TRANSFER \n"); + LOG_D(F1AP, "DU_handle_DL_RRC_MESSAGE_TRANSFER \n"); F1AP_DLRRCMessageTransfer_t *container; F1AP_DLRRCMessageTransferIEs_t *ie; @@ -95,19 +95,19 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container, F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID, true); cu_ue_f1ap_id = ie->value.choice.GNB_CU_UE_F1AP_ID; - LOG_D(DU_F1AP, "cu_ue_f1ap_id %lu \n", cu_ue_f1ap_id); + LOG_D(F1AP, "cu_ue_f1ap_id %lu \n", cu_ue_f1ap_id); /* GNB_DU_UE_F1AP_ID */ F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container, F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true); du_ue_f1ap_id = ie->value.choice.GNB_DU_UE_F1AP_ID; - LOG_D(DU_F1AP, "du_ue_f1ap_id %lu associated with UE RNTI %x \n", - du_ue_f1ap_id, - f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance], du_ue_f1ap_id)); // this should be the one transmitted via initial ul rrc message transfer + LOG_D(F1AP, "du_ue_f1ap_id %lu associated with UE RNTI %x \n", + du_ue_f1ap_id, + f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance], du_ue_f1ap_id)); // this should be the one transmitted via initial ul rrc message transfer if (f1ap_du_add_cu_ue_id(&f1ap_du_inst[instance],du_ue_f1ap_id, cu_ue_f1ap_id) < 0 ) { - LOG_E(DU_F1AP, "Failed to find the F1AP UID \n"); + LOG_E(F1AP, "Failed to find the F1AP UID \n"); //return -1; } @@ -123,7 +123,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container, F1AP_ProtocolIE_ID_id_SRBID, true); srb_id = ie->value.choice.SRBID; - LOG_D(DU_F1AP, "srb_id %lu \n", srb_id); + LOG_D(F1AP, "srb_id %lu \n", srb_id); /* optional */ /* ExecuteDuplication */ @@ -131,7 +131,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container, F1AP_ProtocolIE_ID_id_ExecuteDuplication, true); executeDuplication = ie->value.choice.ExecuteDuplication; - LOG_D(DU_F1AP, "ExecuteDuplication %d \n", executeDuplication); + LOG_D(F1AP, "ExecuteDuplication %d \n", executeDuplication); } // issue in here @@ -165,7 +165,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, //rAT_FrequencySelectionPriority = ie->value.choice.RAT_FrequencyPriorityInformation.choice.rAT_FrequencySelectionPriority; break; default: - LOG_W(DU_F1AP, "unhandled IE RAT_FrequencyPriorityInformation.present\n"); + LOG_W(F1AP, "unhandled IE RAT_FrequencyPriorityInformation.present\n"); break; } } @@ -195,30 +195,30 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, switch (dl_ccch_msg->message.choice.c1.present) { case LTE_DL_CCCH_MessageType__c1_PR_NOTHING: - LOG_I(DU_F1AP, "Received PR_NOTHING on DL-CCCH-Message\n"); + LOG_I(F1AP, "Received PR_NOTHING on DL-CCCH-Message\n"); break; case LTE_DL_CCCH_MessageType__c1_PR_rrcConnectionReestablishment: - LOG_I(DU_F1AP, - "Logical Channel DL-CCCH (SRB0), Received RRCConnectionReestablishment\n"); + LOG_I(F1AP, + "Logical Channel DL-CCCH (SRB0), Received RRCConnectionReestablishment\n"); break; case LTE_DL_CCCH_MessageType__c1_PR_rrcConnectionReestablishmentReject: - LOG_I(DU_F1AP, - "Logical Channel DL-CCCH (SRB0), Received RRCConnectionReestablishmentReject\n"); + LOG_I(F1AP, + "Logical Channel DL-CCCH (SRB0), Received RRCConnectionReestablishmentReject\n"); break; case LTE_DL_CCCH_MessageType__c1_PR_rrcConnectionReject: - LOG_I(DU_F1AP, - "Logical Channel DL-CCCH (SRB0), Received RRCConnectionReject \n"); + LOG_I(F1AP, + "Logical Channel DL-CCCH (SRB0), Received RRCConnectionReject \n"); break; case LTE_DL_CCCH_MessageType__c1_PR_rrcConnectionSetup: { - LOG_I(DU_F1AP, - "Logical Channel DL-CCCH (SRB0), Received RRCConnectionSetup DU_ID %lx/RNTI %x\n", - du_ue_f1ap_id, - f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance], du_ue_f1ap_id)); + LOG_I(F1AP, + "Logical Channel DL-CCCH (SRB0), Received RRCConnectionSetup DU_ID %lx/RNTI %x\n", + du_ue_f1ap_id, + f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance], du_ue_f1ap_id)); // Get configuration LTE_RRCConnectionSetup_t* rrcConnectionSetup = &dl_ccch_msg->message.choice.c1.choice.rrcConnectionSetup; @@ -328,36 +328,36 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, rrc_dl_sdu_len,0,0); if ((dec_rval.code != RC_OK) && (dec_rval.consumed == 0)) - LOG_E(DU_F1AP," Failed to decode DL-DCCH (%zu bytes)\n",dec_rval.consumed); + LOG_E(F1AP," Failed to decode DL-DCCH (%zu bytes)\n",dec_rval.consumed); else - LOG_D(DU_F1AP, "Received message: present %d and c1 present %d\n", - dl_dcch_msg->message.present, dl_dcch_msg->message.choice.c1.present); + LOG_D(F1AP, "Received message: present %d and c1 present %d\n", + dl_dcch_msg->message.present, dl_dcch_msg->message.choice.c1.present); if (dl_dcch_msg->message.present == LTE_DL_DCCH_MessageType_PR_c1) { switch (dl_dcch_msg->message.choice.c1.present) { case LTE_DL_DCCH_MessageType__c1_PR_NOTHING: - LOG_I(DU_F1AP, "Received PR_NOTHING on DL-DCCH-Message\n"); + LOG_I(F1AP, "Received PR_NOTHING on DL-DCCH-Message\n"); return 0; case LTE_DL_DCCH_MessageType__c1_PR_dlInformationTransfer: - LOG_I(DU_F1AP,"Received NAS DL Information Transfer\n"); + LOG_I(F1AP,"Received NAS DL Information Transfer\n"); break; case LTE_DL_DCCH_MessageType__c1_PR_csfbParametersResponseCDMA2000: - LOG_I(DU_F1AP,"Received NAS sfbParametersResponseCDMA2000\n"); + LOG_I(F1AP,"Received NAS sfbParametersResponseCDMA2000\n"); break; case LTE_DL_DCCH_MessageType__c1_PR_handoverFromEUTRAPreparationRequest: - LOG_I(DU_F1AP,"Received NAS andoverFromEUTRAPreparationRequest\n"); + LOG_I(F1AP,"Received NAS andoverFromEUTRAPreparationRequest\n"); break; case LTE_DL_DCCH_MessageType__c1_PR_mobilityFromEUTRACommand: - LOG_I(DU_F1AP,"Received NAS mobilityFromEUTRACommand\n"); + LOG_I(F1AP,"Received NAS mobilityFromEUTRACommand\n"); break; case LTE_DL_DCCH_MessageType__c1_PR_rrcConnectionReconfiguration: // handle RRCConnectionReconfiguration - LOG_I(DU_F1AP, - "Logical Channel DL-DCCH (SRB1), Received RRCConnectionReconfiguration DU_ID %lx/RNTI %x\n", - du_ue_f1ap_id, - f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance], du_ue_f1ap_id)); + LOG_I(F1AP, + "Logical Channel DL-DCCH (SRB1), Received RRCConnectionReconfiguration DU_ID %lx/RNTI %x\n", + du_ue_f1ap_id, + f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance], du_ue_f1ap_id)); LTE_RRCConnectionReconfiguration_t* rrcConnectionReconfiguration = &dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration; @@ -368,15 +368,15 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, &rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8; if (rrcConnectionReconfiguration_r8->mobilityControlInfo) { - LOG_I(DU_F1AP,"Mobility Control Information is present\n"); + LOG_I(F1AP, "Mobility Control Information is present\n"); AssertFatal(1==0,"Can't handle this yet in DU\n"); } if (rrcConnectionReconfiguration_r8->measConfig != NULL) { - LOG_I(DU_F1AP,"Measurement Configuration is present\n"); + LOG_I(F1AP, "Measurement Configuration is present\n"); } if (rrcConnectionReconfiguration_r8->radioResourceConfigDedicated) { - LOG_I(DU_F1AP,"Radio Resource Configuration is present\n"); + LOG_I(F1AP, "Radio Resource Configuration is present\n"); uint8_t DRB2LCHAN[8]; long drb_id; int i; @@ -405,9 +405,9 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, else if (SRB_configList->list.array[i]->srb_Identity == 2 ) { ue_context_p->ue_context.Srb2.Active=1; ue_context_p->ue_context.Srb2.Srb_info.Srb_id=2; - LOG_I(DU_F1AP,"[DU %d] SRB2 is now active\n",ctxt.module_id); + LOG_I(F1AP, "[DU %d] SRB2 is now active\n",ctxt.module_id); } else { - LOG_W(DU_F1AP,"[DU %d] invalide SRB identity %ld\n",ctxt.module_id, + LOG_W(F1AP, "[DU %d] invalide SRB identity %ld\n",ctxt.module_id, SRB_configList->list.array[i]->srb_Identity); } } @@ -417,12 +417,12 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, for (i = 0; i < DRB_configList->list.count; i++) { // num max DRB (11-3-8) if (DRB_configList->list.array[i]) { drb_id = (int)DRB_configList->list.array[i]->drb_Identity; - LOG_I(DU_F1AP, - "[DU %d] Logical Channel UL-DCCH, Received RRCConnectionReconfiguration for UE rnti %x, reconfiguring DRB %d/LCID %d\n", - ctxt.module_id, - ctxt.rnti, - (int)DRB_configList->list.array[i]->drb_Identity, - (int)*DRB_configList->list.array[i]->logicalChannelIdentity); + LOG_I(F1AP, + "[DU %d] Logical Channel UL-DCCH, Received RRCConnectionReconfiguration for UE rnti %x, reconfiguring DRB %d/LCID %d\n", + ctxt.module_id, + ctxt.rnti, + (int)DRB_configList->list.array[i]->drb_Identity, + (int)*DRB_configList->list.array[i]->logicalChannelIdentity); if (ue_context_p->ue_context.DRB_active[drb_id] == 0) { ue_context_p->ue_context.DRB_active[drb_id] = 1; @@ -478,13 +478,13 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, break; case LTE_DL_DCCH_MessageType__c1_PR_rrcConnectionRelease: // handle RRCConnectionRelease - LOG_I(DU_F1AP,"Received RRCConnectionRelease\n"); + LOG_I(F1AP, "Received RRCConnectionRelease\n"); break; case LTE_DL_DCCH_MessageType__c1_PR_securityModeCommand: - LOG_I(DU_F1AP,"Received securityModeCommand\n"); + LOG_I(F1AP, "Received securityModeCommand\n"); break; case LTE_DL_DCCH_MessageType__c1_PR_ueCapabilityEnquiry: - LOG_I(DU_F1AP,"Received ueCapabilityEnquiry\n"); + LOG_I(F1AP, "Received ueCapabilityEnquiry\n"); break; case LTE_DL_DCCH_MessageType__c1_PR_counterCheck: #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0)) @@ -499,10 +499,10 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, #endif break; case LTE_DL_DCCH_MessageType__c1_PR_ueInformationRequest_r9: - LOG_I(DU_F1AP, "Received ueInformationRequest_r9\n"); + LOG_I(F1AP, "Received ueInformationRequest_r9\n"); break; case LTE_DL_DCCH_MessageType__c1_PR_rrcConnectionResume_r13: - LOG_I(DU_F1AP, "Received rrcConnectionResume_r13\n"); + LOG_I(F1AP, "Received rrcConnectionResume_r13\n"); } } } @@ -510,7 +510,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, } - LOG_I(DU_F1AP, "Received DL RRC Transfer on srb_id %ld\n", srb_id); + LOG_I(F1AP, "Received DL RRC Transfer on srb_id %ld\n", srb_id); rlc_op_status_t rlc_status; boolean_t ret = TRUE; mem_block_t *pdcp_pdu_p = NULL; @@ -543,27 +543,27 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ); switch (rlc_status) { case RLC_OP_STATUS_OK: - //LOG_I(DU_F1AP, "Data sending request over RLC succeeded!\n"); + //LOG_I(F1AP, "Data sending request over RLC succeeded!\n"); ret=TRUE; break; case RLC_OP_STATUS_BAD_PARAMETER: - LOG_W(DU_F1AP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n"); + LOG_W(F1AP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n"); ret= FALSE; break; case RLC_OP_STATUS_INTERNAL_ERROR: - LOG_W(DU_F1AP, "Data sending request over RLC failed with 'Internal Error' reason!\n"); + LOG_W(F1AP, "Data sending request over RLC failed with 'Internal Error' reason!\n"); ret= FALSE; break; case RLC_OP_STATUS_OUT_OF_RESSOURCES: - LOG_W(DU_F1AP, "Data sending request over RLC failed with 'Out of Resources' reason!\n"); + LOG_W(F1AP, "Data sending request over RLC failed with 'Out of Resources' reason!\n"); ret= FALSE; break; default: - LOG_W(DU_F1AP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status); + LOG_W(F1AP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status); ret= FALSE; break; } // switch case @@ -592,7 +592,7 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(const protocol_ctxt_t* const ctxt_pP, uint32_t len; - LOG_I(DU_F1AP,"[DU %d] %s: size %d UE RNTI %x in SRB %d\n", + LOG_I(F1AP, "[DU %d] %s: size %d UE RNTI %x in SRB %d\n", ctxt_pP->module_id, __func__, sdu_sizeP, rnti, rb_idP); /* Create */ @@ -661,10 +661,10 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(const protocol_ctxt_t* const ctxt_pP, sdu_sizeP,0,0); if ((dec_rval.code != RC_OK) && (dec_rval.consumed == 0)) - LOG_E(DU_F1AP," Failed to decode UL-DCCH (%zu bytes)\n",dec_rval.consumed); + LOG_E(F1AP, " Failed to decode UL-DCCH (%zu bytes)\n",dec_rval.consumed); else - LOG_I(DU_F1AP, "Received message: present %d and c1 present %d\n", - ul_dcch_msg->message.present, ul_dcch_msg->message.choice.c1.present); + LOG_I(F1AP, "Received message: present %d and c1 present %d\n", + ul_dcch_msg->message.present, ul_dcch_msg->message.choice.c1.present); if (ul_dcch_msg->message.present == LTE_UL_DCCH_MessageType_PR_c1) { @@ -685,31 +685,31 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(const protocol_ctxt_t* const ctxt_pP, break; case LTE_UL_DCCH_MessageType__c1_PR_rrcConnectionSetupComplete: - LOG_I(DU_F1AP,"[MSG] RRC UL rrcConnectionSetupComplete \n"); + LOG_I(F1AP, "[MSG] RRC UL rrcConnectionSetupComplete \n"); if(!ue_context_p){ - LOG_E(DU_F1AP, "Did not find the UE context associated with UE RNTOI %x, ue_context_p is NULL\n", ctxt_pP->rnti); + LOG_E(F1AP, "Did not find the UE context associated with UE RNTOI %x, ue_context_p is NULL\n", ctxt_pP->rnti); }else { - LOG_I(DU_F1AP, "Processing RRCConnectionSetupComplete UE %x\n", rnti); + 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(DU_F1AP,"[MSG] RRC securityModeComplete \n"); + LOG_I(F1AP, "[MSG] RRC securityModeComplete \n"); break; case LTE_UL_DCCH_MessageType__c1_PR_securityModeFailure: break; case LTE_UL_DCCH_MessageType__c1_PR_ueCapabilityInformation: - LOG_I(DU_F1AP,"[MSG] RRC ueCapabilityInformation \n"); + LOG_I(F1AP, "[MSG] RRC ueCapabilityInformation \n"); break; case LTE_UL_DCCH_MessageType__c1_PR_ulHandoverPreparationTransfer: break; case LTE_UL_DCCH_MessageType__c1_PR_ulInformationTransfer: - LOG_I(DU_F1AP,"[MSG] RRC UL Information Transfer \n"); + LOG_I(F1AP,"[MSG] RRC UL Information Transfer \n"); break; case LTE_UL_DCCH_MessageType__c1_PR_counterCheckResponse: @@ -739,7 +739,7 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(const protocol_ctxt_t* const ctxt_pP, } /* encode */ if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { - LOG_E(DU_F1AP, "Failed to encode F1 setup request\n"); + LOG_E(F1AP, "Failed to encode F1 setup request\n"); return -1; } @@ -765,7 +765,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP, int f1ap_uid = f1ap_add_ue (&f1ap_du_inst[module_idP], module_idP, CC_idP,UE_id, rntiP); if (f1ap_uid < 0 ) { - LOG_E(DU_F1AP, "Failed to add UE \n"); + LOG_E(F1AP, "Failed to add UE \n"); return -1; } @@ -836,7 +836,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP, /* encode */ if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { - LOG_E(DU_F1AP, "Failed to encode F1 setup request\n"); + LOG_E(F1AP, "Failed to encode F1 setup request\n"); return -1; } diff --git a/openair2/F1AP/f1ap_du_task.c b/openair2/F1AP/f1ap_du_task.c index 95982c2ecc..5cd784abf2 100644 --- a/openair2/F1AP/f1ap_du_task.c +++ b/openair2/F1AP/f1ap_du_task.c @@ -19,7 +19,7 @@ * contact@openairinterface.org */ -/*! \file openair2/F1AP/DU_F1AP.c +/*! \file openair2/F1AP/f1ap_du_task.c * \brief data structures for F1 interface modules * \author EURECOM/NTUST * \date 2018 @@ -132,7 +132,7 @@ void *F1AP_DU_task(void *arg) { MessageDef *received_msg = NULL; int result; - LOG_I(DU_F1AP, "Starting F1AP at DU\n"); + LOG_I(F1AP, "Starting F1AP at DU\n"); //f1ap_eNB_prepare_internal_data(); @@ -153,7 +153,7 @@ void *F1AP_DU_task(void *arg) { // 1. save the itti msg so that you can use it to sen f1ap_setup_req, fill the f1ap_setup_req message, // 2. store the message in f1ap context, that is also stored in RC // 2. send a sctp_association req - LOG_I(DU_F1AP, "DU Task Received F1AP_SETUP_REQ\n"); + LOG_I(F1AP, "DU Task Received F1AP_SETUP_REQ\n"); du_task_send_sctp_association_req(ITTI_MESSAGE_GET_INSTANCE(received_msg), &F1AP_SETUP_REQ(received_msg)); break; @@ -161,39 +161,39 @@ void *F1AP_DU_task(void *arg) { case SCTP_NEW_ASSOCIATION_RESP: // 1. store the respon // 2. send the f1setup_req - LOG_I(DU_F1AP, "DU Task Received SCTP_NEW_ASSOCIATION_RESP\n"); + LOG_I(F1AP, "DU Task Received SCTP_NEW_ASSOCIATION_RESP\n"); du_task_handle_sctp_association_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg), &received_msg->ittiMsg.sctp_new_association_resp); break; case SCTP_DATA_IND: // ex: any F1 incoming message for DU ends here - LOG_I(DU_F1AP, "DU Task Received SCTP_DATA_IND\n"); + LOG_I(F1AP, "DU Task Received SCTP_DATA_IND\n"); du_task_handle_sctp_data_ind(ITTI_MESSAGE_GET_INSTANCE(received_msg), &received_msg->ittiMsg.sctp_data_ind); break; case F1AP_UL_RRC_MESSAGE: // from rrc - LOG_I(DU_F1AP, "DU Task Received F1AP_UL_RRC_MESSAGE\n"); + LOG_I(F1AP, "DU Task Received F1AP_UL_RRC_MESSAGE\n"); AssertFatal (1 == 0, "Should not be here!\n" ); //DU_send_UL_RRC_MESSAGE_TRANSFER(ITTI_MESSAGE_GET_INSTANCE(received_msg), // &F1AP_UL_RRC_MESSAGE(received_msg)); break; case F1AP_UE_CONTEXT_RELEASE_REQ: // from MAC - LOG_I(DU_F1AP, "DU Task Received F1AP_UE_CONTEXT_RELEASE_REQ\n"); + LOG_I(F1AP, "DU Task Received F1AP_UE_CONTEXT_RELEASE_REQ\n"); DU_send_UE_CONTEXT_RELEASE_REQUEST(ITTI_MESSAGE_GET_INSTANCE(received_msg), &F1AP_UE_CONTEXT_RELEASE_REQ(received_msg)); break; case TERMINATE_MESSAGE: - LOG_W(DU_F1AP, " *** Exiting DU_F1AP thread\n"); + LOG_W(F1AP, " *** Exiting F1AP thread\n"); itti_exit_task(); break; default: - LOG_E(DU_F1AP, "DU Received unhandled message: %d:%s\n", - ITTI_MSG_ID(received_msg), ITTI_MSG_NAME(received_msg)); + LOG_E(F1AP, "DU Received unhandled message: %d:%s\n", + ITTI_MSG_ID(received_msg), ITTI_MSG_NAME(received_msg)); break; } // switch result = itti_free (ITTI_MSG_ORIGIN_ID(received_msg), received_msg); diff --git a/openair2/F1AP/f1ap_du_task.h b/openair2/F1AP/f1ap_du_task.h index 47d0827809..2d5195baed 100644 --- a/openair2/F1AP/f1ap_du_task.h +++ b/openair2/F1AP/f1ap_du_task.h @@ -19,12 +19,12 @@ * contact@openairinterface.org */ -#ifndef DU_F1AP_TASK_H_ -#define DU_F1AP_TASK_H_ +#ifndef F1AP_DU_TASK_H_ +#define F1AP_DU_TASK_H_ void du_task_send_sctp_association_req(instance_t instance, f1ap_setup_req_t *f1ap_setup_req); void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_association_resp_t *sctp_new_association_resp); void du_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_data_ind); void *F1AP_DU_task(void *arg); -#endif /* DU_F1AP_TASK_H_ */ +#endif /* F1AP_DU_TASK_H_ */ diff --git a/openair2/F1AP/f1ap_du_ue_context_management.c b/openair2/F1AP/f1ap_du_ue_context_management.c index 3f12bf9505..4af453e4e4 100644 --- a/openair2/F1AP/f1ap_du_ue_context_management.c +++ b/openair2/F1AP/f1ap_du_ue_context_management.c @@ -547,7 +547,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) { /* encode */ if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { - LOG_E(DU_F1AP, "Failed to encode F1 setup request\n"); + LOG_E(F1AP, "Failed to encode F1 setup request\n"); return -1; } @@ -631,7 +631,7 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance, /* encode */ if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { - LOG_E(DU_F1AP, "Failed to encode F1 context release request\n"); + LOG_E(F1AP, "Failed to encode F1 context release request\n"); return -1; } @@ -712,16 +712,16 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, case RLC_OP_STATUS_OK: break; case RLC_OP_STATUS_BAD_PARAMETER: - LOG_W(DU_F1AP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n"); + LOG_W(F1AP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n"); break; case RLC_OP_STATUS_INTERNAL_ERROR: - LOG_W(DU_F1AP, "Data sending request over RLC failed with 'Internal Error' reason!\n"); + LOG_W(F1AP, "Data sending request over RLC failed with 'Internal Error' reason!\n"); break; case RLC_OP_STATUS_OUT_OF_RESSOURCES: - LOG_W(DU_F1AP, "Data sending request over RLC failed with 'Out of Resources' reason!\n"); + LOG_W(F1AP, "Data sending request over RLC failed with 'Out of Resources' reason!\n"); break; default: - LOG_W(DU_F1AP, "RLC returned an unknown status code after DU_F1AP placed " + LOG_W(F1AP, "RLC returned an unknown status code after F1AP placed " "the order to send some data (Status Code:%d)\n", rlc_status); break; } @@ -740,7 +740,7 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, else rrc_release_info.RRC_release_ctrl[release_num].flag = 2; rrc_release_info.RRC_release_ctrl[release_num].rnti = ctxt.rnti; - LOG_W(DU_F1AP, "add rrc_release_info RNTI %x\n", ctxt.rnti); + LOG_D(F1AP, "add rrc_release_info RNTI %x\n", ctxt.rnti); // TODO: how to provide the correct MUI? rrc_release_info.RRC_release_ctrl[release_num].rrc_eNB_mui = 0; rrc_release_info.num_UEs++; @@ -755,7 +755,7 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, /* UE exists and is out of sync, drop the connection */ mac_eNB_rrc_ul_failure(instance, 0, 0, 0, rnti); } else { - LOG_E(DU_F1AP, "no ue_context for RNTI %x, acknowledging release\n", rnti); + LOG_E(F1AP, "no ue_context for RNTI %x, acknowledging release\n", rnti); } /* TODO send this once the connection has really been released */ @@ -861,7 +861,7 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, uint8_t *buffer; uint32_t len; if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { - LOG_E(DU_F1AP, "Failed to encode F1 context release complete\n"); + LOG_E(F1AP, "Failed to encode F1 context release complete\n"); return -1; } @@ -1267,7 +1267,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) { /* encode */ if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { - LOG_E(DU_F1AP, "Failed to encode F1 setup request\n"); + LOG_E(F1AP, "Failed to encode F1 setup request\n"); return -1; } diff --git a/openair2/F1AP/f1ap_encoder.c b/openair2/F1AP/f1ap_encoder.c index f0624ef4d8..e448690139 100644 --- a/openair2/F1AP/f1ap_encoder.c +++ b/openair2/F1AP/f1ap_encoder.c @@ -93,8 +93,6 @@ int f1ap_encode_pdu(F1AP_F1AP_PDU_t *pdu, uint8_t **buffer, uint32_t *length) *length = encoded; - /* Is the following needed? I moved the code here from CU_F1AP.c/DU_F1AP.c */ - // ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_F1AP_F1AP_PDU, pdu); return encoded; } -- GitLab