Commit 1a07a1e0 authored by Robert Schmidt's avatar Robert Schmidt

Replace redundant CU_F1AP/DU_F1AP with F1AP

parent 030e11ba
......@@ -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);
......
......@@ -206,8 +206,6 @@ typedef enum {
SPGW,
S1AP,
F1AP,
DU_F1AP,
CU_F1AP,
SCTP,
HW,
OSA,
......
......@@ -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 ####
#################
......
......@@ -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;
}
......
......@@ -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
......
......@@ -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);
......
......@@ -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_ */
......@@ -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;
}
......
......@@ -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);
......
......@@ -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_ */
......@@ -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;
}
......
......@@ -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;
}
......
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