Commit afcbf7b6 authored by Laurent THOMAS's avatar Laurent THOMAS

remove most of globale variables, remain data model inconsistency and race conditions

parent 6ce958f7
......@@ -85,7 +85,6 @@ char * split73_config;
int split73;
AGENT_RRC_xface *agent_rrc_xface[NUM_MAX_ENB]= {0};
AGENT_MAC_xface *agent_mac_xface[NUM_MAX_ENB]= {0};
uint8_t proto_agent_flag = 0;
void flexran_agent_slice_update(mid_t module_idP) {
}
int proto_agent_start(mod_id_t mod_id, const cudu_params_t *p){
......
......@@ -303,7 +303,7 @@ typedef struct f1ap_initial_ul_rrc_message_s {
uint16_t crnti;
uint8_t *rrc_container;
int rrc_container_length;
int8_t *du2cu_rrc_container;
char *du2cu_rrc_container;
int du2cu_rrc_container_length;
} f1ap_initial_ul_rrc_message_t;
......
......@@ -1910,6 +1910,7 @@ int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i) {
AssertFatal(ENBParamList.paramarray[i][ENB_ENB_ID_IDX].uptr != NULL,
"eNB id %u is not defined in configuration file\n",i);
F1AP_SETUP_REQ (msg_p).num_cells_available = 0;
F1AP_SETUP_REQ (msg_p).cell_type = CELL_MACRO_ENB;
for (k=0; k <num_enbs ; k++) {
if (strcmp(ENBSParams[ENB_ACTIVE_ENBS_IDX].strlistptr[k], *(ENBParamList.paramarray[i][ENB_ENB_NAME_IDX].strptr) )== 0) {
......
......@@ -32,6 +32,9 @@
#include "f1ap_common.h"
static f1ap_cudu_inst_t *f1_du_inst[NUMBER_OF_eNB_MAX]= {0};
static f1ap_cudu_inst_t *f1_cu_inst[NUMBER_OF_eNB_MAX]= {0};
#if defined(EMIT_ASN_DEBUG_EXTERN)
int asn_debug = 0;
int asn1_xer_print = 0;
......@@ -61,11 +64,30 @@ uint8_t F1AP_get_next_transaction_identifier(module_id_t enb_mod_idP, module_id_
return transaction_identifier[enb_mod_idP+cu_mod_idP];
}
int f1ap_add_ue(f1ap_cudu_inst_t *f1_inst,
f1ap_cudu_inst_t *getCxt(bool isCU, module_id_t module_idP) {
AssertFatal( module_idP < sizeofArray(f1_cu_inst), "");
return isCU? f1_cu_inst[ module_idP]: f1_du_inst[ module_idP];
}
void createF1inst(bool isCU, module_id_t module_idP, f1ap_setup_req_t *req) {
if (isCU) {
AssertFatal(f1_cu_inst[module_idP] == NULL, "Double call to F1 CU init\n");
f1_cu_inst[module_idP]=( f1ap_cudu_inst_t *) calloc(1, sizeof( f1ap_cudu_inst_t));
//memcpy(f1_cu_inst[module_idP]->setupReq, req, sizeof(f1ap_setup_req_t) );
} else {
AssertFatal(f1_du_inst[module_idP] == NULL, "Double call to F1 DU init\n");
f1_du_inst[module_idP]=( f1ap_cudu_inst_t *) calloc(1, sizeof(f1ap_cudu_inst_t));
memcpy(&f1_du_inst[module_idP]->setupReq, req, sizeof(f1ap_setup_req_t) );
}
}
int f1ap_add_ue(bool isCu,
module_id_t module_idP,
int CC_idP,
int UE_id,
rnti_t rntiP) {
f1ap_cudu_inst_t *f1_inst=getCxt(isCu, module_idP);
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
if (f1_inst->f1ap_ue[i].rnti == rntiP) {
f1_inst->f1ap_ue[i].f1ap_uid = i;
......@@ -92,8 +114,10 @@ int f1ap_add_ue(f1ap_cudu_inst_t *f1_inst,
}
int f1ap_remove_ue(f1ap_cudu_inst_t *f1_inst,
int f1ap_remove_ue(bool isCu, module_id_t module_idP,
rnti_t rntiP) {
f1ap_cudu_inst_t *f1_inst=getCxt(isCu, module_idP);
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
if (f1_inst->f1ap_ue[i].rnti == rntiP) {
f1_inst->f1ap_ue[i].rnti = 0;
......@@ -105,8 +129,10 @@ int f1ap_remove_ue(f1ap_cudu_inst_t *f1_inst,
return 0;
}
int f1ap_get_du_ue_f1ap_id(f1ap_cudu_inst_t *f1_inst,
int f1ap_get_du_ue_f1ap_id(bool isCu, module_id_t module_idP,
rnti_t rntiP) {
f1ap_cudu_inst_t *f1_inst=getCxt(isCu, module_idP);
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
if (f1_inst->f1ap_ue[i].rnti == rntiP) {
return f1_inst->f1ap_ue[i].du_ue_f1ap_id;
......@@ -116,8 +142,10 @@ int f1ap_get_du_ue_f1ap_id(f1ap_cudu_inst_t *f1_inst,
return -1;
}
int f1ap_get_cu_ue_f1ap_id(f1ap_cudu_inst_t *f1_inst,
int f1ap_get_cu_ue_f1ap_id(bool isCu, module_id_t module_idP,
rnti_t rntiP) {
f1ap_cudu_inst_t *f1_inst=getCxt(isCu, module_idP);
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
if (f1_inst->f1ap_ue[i].rnti == rntiP) {
return f1_inst->f1ap_ue[i].cu_ue_f1ap_id;
......@@ -127,8 +155,10 @@ int f1ap_get_cu_ue_f1ap_id(f1ap_cudu_inst_t *f1_inst,
return -1;
}
int f1ap_get_rnti_by_du_id(f1ap_cudu_inst_t *f1_inst,
int f1ap_get_rnti_by_du_id(bool isCu, module_id_t module_idP,
module_id_t du_ue_f1ap_id ) {
f1ap_cudu_inst_t *f1_inst=getCxt(isCu, module_idP);
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
if (f1_inst->f1ap_ue[i].du_ue_f1ap_id == du_ue_f1ap_id) {
return f1_inst->f1ap_ue[i].rnti;
......@@ -138,8 +168,10 @@ int f1ap_get_rnti_by_du_id(f1ap_cudu_inst_t *f1_inst,
return -1;
}
int f1ap_get_rnti_by_cu_id(f1ap_cudu_inst_t *f1_inst,
int f1ap_get_rnti_by_cu_id(bool isCu, module_id_t module_idP,
module_id_t cu_ue_f1ap_id ) {
f1ap_cudu_inst_t *f1_inst=getCxt(isCu, module_idP);
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
if (f1_inst->f1ap_ue[i].cu_ue_f1ap_id == cu_ue_f1ap_id) {
return f1_inst->f1ap_ue[i].rnti;
......@@ -149,8 +181,10 @@ int f1ap_get_rnti_by_cu_id(f1ap_cudu_inst_t *f1_inst,
return -1;
}
int f1ap_get_du_uid(f1ap_cudu_inst_t *f1_inst,
int f1ap_get_du_uid(bool isCu, module_id_t module_idP,
module_id_t du_ue_f1ap_id ) {
f1ap_cudu_inst_t *f1_inst=getCxt(isCu, module_idP);
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
if (f1_inst->f1ap_ue[i].du_ue_f1ap_id == du_ue_f1ap_id) {
return i;
......@@ -160,8 +194,10 @@ int f1ap_get_du_uid(f1ap_cudu_inst_t *f1_inst,
return -1;
}
int f1ap_get_cu_uid(f1ap_cudu_inst_t *f1_inst,
int f1ap_get_cu_uid(bool isCu, module_id_t module_idP,
module_id_t cu_ue_f1ap_id ) {
f1ap_cudu_inst_t *f1_inst=getCxt(isCu, module_idP);
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
if (f1_inst->f1ap_ue[i].cu_ue_f1ap_id == cu_ue_f1ap_id) {
return i;
......@@ -171,8 +207,10 @@ int f1ap_get_cu_uid(f1ap_cudu_inst_t *f1_inst,
return -1;
}
int f1ap_get_uid_by_rnti(f1ap_cudu_inst_t *f1_inst,
int f1ap_get_uid_by_rnti(bool isCu, module_id_t module_idP,
rnti_t rntiP ) {
f1ap_cudu_inst_t *f1_inst=getCxt(isCu, module_idP);
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
if (f1_inst->f1ap_ue[i].rnti == rntiP) {
return i;
......@@ -182,10 +220,11 @@ int f1ap_get_uid_by_rnti(f1ap_cudu_inst_t *f1_inst,
return -1;
}
int f1ap_du_add_cu_ue_id(f1ap_cudu_inst_t *f1_inst,
int f1ap_du_add_cu_ue_id(bool isCu, module_id_t module_idP,
module_id_t du_ue_f1ap_id,
module_id_t cu_ue_f1ap_id) {
module_id_t f1ap_uid = f1ap_get_du_uid(f1_inst,du_ue_f1ap_id);
f1ap_cudu_inst_t *f1_inst=getCxt(isCu, module_idP);
module_id_t f1ap_uid = f1ap_get_du_uid(isCu, module_idP,du_ue_f1ap_id);
if (f1ap_uid < 0 || f1ap_uid >= MAX_MOBILES_PER_ENB)
return -1;
......@@ -195,10 +234,11 @@ int f1ap_du_add_cu_ue_id(f1ap_cudu_inst_t *f1_inst,
return 0;
}
int f1ap_cu_add_du_ue_id(f1ap_cudu_inst_t *f1_inst,
int f1ap_cu_add_du_ue_id(bool isCu, module_id_t module_idP,
module_id_t cu_ue_f1ap_id,
module_id_t du_ue_f1ap_id) {
module_id_t f1ap_uid = f1ap_get_cu_uid(f1_inst,cu_ue_f1ap_id);
f1ap_cudu_inst_t *f1_inst=getCxt(isCu, module_idP);
module_id_t f1ap_uid = f1ap_get_cu_uid(isCu,module_idP,cu_ue_f1ap_id);
if (f1ap_uid < 0 || f1ap_uid >= MAX_MOBILES_PER_ENB)
return -1;
......@@ -207,3 +247,8 @@ int f1ap_cu_add_du_ue_id(f1ap_cudu_inst_t *f1_inst,
LOG_I(F1AP, "Adding du_ue_f1ap_id %d for UE with RNTI %x\n", du_ue_f1ap_id, f1_inst->f1ap_ue[f1ap_uid].rnti);
return 0;
}
int f1ap_assoc_id(bool isCu, module_id_t module_idP) {
f1ap_setup_req_t *f1_inst=f1ap_req(isCu, module_idP);
return f1_inst->assoc_id;
}
......@@ -426,6 +426,12 @@ typedef struct f1ap_cudu_ue_inst_s {
} f1ap_cudu_ue_t;
typedef struct f1ap_cudu_inst_s {
f1ap_setup_req_t setupReq;
instance_t du_ue_f1ap_id;
uint16_t sctp_in_streams;
uint16_t sctp_out_streams;
uint16_t default_sctp_stream_id;
uint64_t gNB_DU_id;
uint16_t num_ues;
f1ap_cudu_ue_t f1ap_ue[MAX_MOBILES_PER_ENB];
} f1ap_cudu_inst_t;
......@@ -434,59 +440,67 @@ typedef struct f1ap_cudu_inst_s {
uint8_t F1AP_get_next_transaction_identifier(module_id_t enb_mod_idP, module_id_t cu_mod_idP);
f1ap_cudu_inst_t *getCxt(bool isCU, module_id_t module_idP);
int f1ap_add_ue(f1ap_cudu_inst_t *f1_inst,
void createF1inst(bool isCU, module_id_t module_idP, f1ap_setup_req_t *req);
int f1ap_add_ue(bool isCu,
module_id_t module_idP,
int CC_idP,
int UE_id,
rnti_t rntiP);
int f1ap_remove_ue(f1ap_cudu_inst_t *f1_inst,
int f1ap_remove_ue(bool isCu, module_id_t module_idP,
rnti_t rntiP);
int f1ap_get_du_ue_f1ap_id (f1ap_cudu_inst_t *f1_inst,
int f1ap_get_du_ue_f1ap_id (bool isCu, module_id_t module_idP,
rnti_t rntiP);
int f1ap_get_cu_ue_f1ap_id (f1ap_cudu_inst_t *f1_inst,
int f1ap_get_cu_ue_f1ap_id (bool isCu, module_id_t module_idP,
rnti_t rntiP);
int f1ap_get_rnti_by_du_id(f1ap_cudu_inst_t *f1_inst,
int f1ap_get_rnti_by_du_id(bool isCu, module_id_t module_idP,
module_id_t du_ue_f1ap_id );
int f1ap_get_rnti_by_cu_id(f1ap_cudu_inst_t *f1_inst,
int f1ap_get_rnti_by_cu_id(bool isCu, module_id_t module_idP,
module_id_t cu_ue_f1ap_id );
int f1ap_get_du_uid(f1ap_cudu_inst_t *f1_inst,
int f1ap_get_du_uid(bool isCu, module_id_t module_idP,
module_id_t du_ue_f1ap_id );
int f1ap_get_cu_uid(f1ap_cudu_inst_t *f1_inst,
int f1ap_get_cu_uid(bool isCu, module_id_t module_idP,
module_id_t cu_ue_f1ap_id );
int f1ap_get_uid_by_rnti(f1ap_cudu_inst_t *f1_inst,
int f1ap_get_uid_by_rnti(bool isCu, module_id_t module_idP,
rnti_t rntiP );
int f1ap_du_add_cu_ue_id(f1ap_cudu_inst_t *f1_inst,
int f1ap_du_add_cu_ue_id(bool isCu, module_id_t module_idP,
module_id_t du_ue_f1ap_id,
module_id_t cu_ue_f1ap_id);
int f1ap_cu_add_du_ue_id(f1ap_cudu_inst_t *f1_inst,
int f1ap_cu_add_du_ue_id(bool isCu, module_id_t module_idP,
module_id_t cu_ue_f1ap_id,
module_id_t du_ue_f1ap_id);
int f1ap_assoc_id(bool isCu, module_id_t module_idP);
static inline f1ap_setup_req_t *f1ap_req(bool isCu, module_id_t module_idP) {
return &getCxt(isCu, module_idP)->setupReq;
}
#define asn1cCalloc(VaR, TyPe, lOcPtr) TyPe *lOcPtr=VaR=(TyPe*) calloc(1,sizeof(TyPe));
#define asn1cCallocOne(VaR, TyPe, VaLue) VaR=(TyPe*) calloc(1,sizeof(TyPe)); *VaR=VaLue;
#define asn1cSequenceAdd(VaR, TyPe, lOcPtr) TyPe *lOcPtr=(TyPe*) calloc(1,sizeof(TyPe)); ASN_SEQUENCE_ADD(&VaR,lOcPtr);
#define TASK_F1APP f1ap_req(false, instance)->cell_type==CELL_MACRO_GNB?TASK_GNB_APP:TASK_ENB_APP
//lts: C struct type is not homogeneous, so we need macros instead of functions
#define addnRCGI(nRCGi, servedCelL) \
MCC_MNC_TO_PLMNID((servedCelL)->mcc,(servedCelL)-> mnc,(servedCelL)->mnc_digit_length, \
&((nRCGi).pLMN_Identity)); \
&((nRCGi).pLMN_Identity)); \
NR_CELL_ID_TO_BIT_STRING((servedCelL)->nr_cellid, &((nRCGi).nRCellIdentity));
extern f1ap_setup_req_t *f1ap_du_data_from_du;
extern RAN_CONTEXT_t RC;
#endif /* F1AP_COMMON_H_ */
......@@ -133,8 +133,11 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
}
/* - nRCGI */
addnRCGI(served_cells_item_p->served_Cell_Information.nRCGI, req->cell+i);
TBCD_TO_MCC_MNC(&(served_cells_item_p->served_Cell_Information.nRCGI.pLMN_Identity), req->cell[i].mcc,
req->cell[i].mnc,req->cell[i].mnc_digit_length);
// NR cellID
BIT_STRING_TO_NR_CELL_IDENTITY(&served_cells_item_p->served_Cell_Information.nRCGI.nRCellIdentity,
req->cell[i].nr_cellid);
LOG_D(F1AP, "[SCTP %d] Received nRCGI: MCC %d, MNC %d, CELL_ID %llu\n", assoc_id,
req->cell[i].mcc,
req->cell[i].mnc,
......@@ -147,6 +150,12 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
served_cells_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[4]);
/* - nRPCI */
req->cell[i].nr_pci = served_cells_item_p->served_Cell_Information.nRPCI;
// LTS: FIXME data model failure: we don't KNOW if we receive a 4G or a 5G cell
// Furthermore, cell_type is not a attribute of a cell in the data structure !!!!!!!!!!
if (RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CU)
f1ap_req(true, instance)->cell_type=CELL_MACRO_GNB;
LOG_D(F1AP, "req->nr_pci[%d] %d \n",
i, req->cell[i].nr_pci);
// System Information
......@@ -170,7 +179,6 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
i, req->sib1[i], req->sib1_length[i]);
}
*f1ap_du_data_from_du = F1AP_SETUP_REQ(message_p);
// char *measurement_timing_information[F1AP_MAX_NB_CELLS];
// uint8_t ranac[F1AP_MAX_NB_CELLS];
// int fdd_flag = f1ap_setup_req->fdd_flag;
......@@ -222,13 +230,7 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
}
} else {
CU_send_F1_SETUP_FAILURE(instance);
if (RC.nrrrc[0]->node_type == ngran_gNB_CU) {
itti_free(TASK_RRC_GNB,message_p);
} else {
itti_free(TASK_RRC_ENB,message_p);
}
itti_free(TASK_RRC_GNB,message_p);
return -1;
}
......@@ -287,7 +289,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
i<num_cells_to_activate;
i++) {
asn1cSequenceAdd(ie3->value.choice.Cells_to_be_Activated_List.list,
F1AP_Cells_to_be_Activated_List_ItemIEs_t, cells_to_be_activated_ies);
F1AP_Cells_to_be_Activated_List_ItemIEs_t, cells_to_be_activated_ies);
cells_to_be_activated_ies->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List_Item;
cells_to_be_activated_ies->criticality = F1AP_Criticality_reject;
cells_to_be_activated_ies->value.present = F1AP_Cells_to_be_Activated_List_ItemIEs__value_PR_Cells_to_be_Activated_List_Item;
......@@ -340,7 +342,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
}
ASN_STRUCT_RESET(asn_DEF_F1AP_F1AP_PDU, &pdu);
cu_f1ap_itti_send_sctp_data_req(instance, f1ap_du_data_from_du->assoc_id, buffer, len, 0);
f1ap_itti_send_sctp_data_req(true, instance, buffer, len, 0);
return 0;
}
......@@ -394,13 +396,13 @@ int CU_send_F1_SETUP_FAILURE(instance_t instance) {
ie4->criticality = F1AP_Criticality_ignore;
ie4->value.present = F1AP_F1SetupFailureIEs__value_PR_CriticalityDiagnostics;
asn1cCallocOne(ie4->value.choice.CriticalityDiagnostics.procedureCode,
F1AP_ProcedureCode_t, F1AP_ProcedureCode_id_UEContextSetup);
F1AP_ProcedureCode_t, F1AP_ProcedureCode_id_UEContextSetup);
asn1cCallocOne(ie4->value.choice.CriticalityDiagnostics.triggeringMessage,
F1AP_TriggeringMessage_t, F1AP_TriggeringMessage_initiating_message);
F1AP_TriggeringMessage_t, F1AP_TriggeringMessage_initiating_message);
asn1cCallocOne(ie4->value.choice.CriticalityDiagnostics.procedureCriticality,
F1AP_Criticality_t, F1AP_Criticality_reject);
F1AP_Criticality_t, F1AP_Criticality_reject);
asn1cCallocOne(ie4->value.choice.CriticalityDiagnostics.transactionID,
F1AP_TransactionID_t, 0);
F1AP_TransactionID_t, 0);
}
/* encode */
......@@ -410,7 +412,7 @@ int CU_send_F1_SETUP_FAILURE(instance_t instance) {
}
ASN_STRUCT_RESET(asn_DEF_F1AP_F1AP_PDU, &pdu);
cu_f1ap_itti_send_sctp_data_req(instance, f1ap_du_data_from_du->assoc_id, buffer, len, 0);
f1ap_itti_send_sctp_data_req(true,instance, buffer, len, 0);
return 0;
}
......@@ -480,7 +482,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
cells_to_be_activated_ies->value.present = F1AP_Cells_to_be_Activated_List_ItemIEs__value_PR_Cells_to_be_Activated_List_Item;
// 2.1 cells to be Activated list item
F1AP_Cells_to_be_Activated_List_Item_t *cells_to_be_activated_list_item=
&cells_to_be_activated_ies->value.choice.Cells_to_be_Activated_List_Item;
&cells_to_be_activated_ies->value.choice.Cells_to_be_Activated_List_Item;
// - nRCGI
addnRCGI(cells_to_be_activated_list_item->nRCGI, f1ap_gnb_cu_configuration_update->cells_to_activate+i);
// optional
......@@ -499,7 +501,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
if (f1ap_gnb_cu_configuration_update->cells_to_activate[i].num_SI > 0) {
F1AP_GNB_CUSystemInformation_t *gNB_CUSystemInformation =
&cells_to_be_activated_itemExtIEs->extensionValue.choice.GNB_CUSystemInformation;
&cells_to_be_activated_itemExtIEs->extensionValue.choice.GNB_CUSystemInformation;
//LOG_I(F1AP, "%s() SI %d size %d: ", __func__, i, f1ap_setup_resp->SI_container_length[i][0]);
//for (int n = 0; n < f1ap_setup_resp->SI_container_length[i][0]; n++)
// printf("%02x ", f1ap_setup_resp->SI_container[i][0][n]);
......@@ -811,7 +813,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
LOG_DUMPMSG(F1AP, LOG_DUMP_CHAR, buffer, len, "F1AP gNB-CU CONFIGURATION UPDATE : ");
ASN_STRUCT_RESET(asn_DEF_F1AP_F1AP_PDU, &pdu);
cu_f1ap_itti_send_sctp_data_req(instance, f1ap_du_data_from_du->assoc_id, buffer, len, 0);
f1ap_itti_send_sctp_data_req(true,instance, buffer, len, 0);
return 0;
}
......
......@@ -38,20 +38,10 @@
#include "common/ran_context.h"
#include "openair3/UTILS/conversions.h"
// Bing Kai: create CU and DU context, and put all the information there.
uint64_t du_ue_f1ap_id = 0;
uint32_t f1ap_assoc_id = 0;
uint32_t f1ap_stream = 0;
extern f1ap_cudu_inst_t f1ap_cu_inst[MAX_eNB];
/*
Initial UL RRC Message Transfer
*/
extern RAN_CONTEXT_t RC;
int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
uint32_t assoc_id,
uint32_t stream,
......@@ -74,15 +64,11 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
return -1;
}
// TODO: use context
f1ap_stream = stream;
f1ap_assoc_id = assoc_id;
container = &pdu->choice.initiatingMessage->value.choice.InitialULRRCMessageTransfer;
/* GNB_DU_UE_F1AP_ID */
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(F1AP, "du_ue_f1ap_id %lu \n", du_ue_f1ap_id);
getCxt(true, instance)->du_ue_f1ap_id = ie->value.choice.GNB_DU_UE_F1AP_ID;
/* NRCGI
* TODO: process NRCGI
*/
......@@ -100,7 +86,7 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
AssertFatal(ie!=NULL,"RRCContainer is missing\n");
// create an ITTI message and copy SDU
if (RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CU) {
if (f1ap_req(true, instance)->cell_type==CELL_MACRO_GNB) {
message_p = itti_alloc_new_message (TASK_CU_F1, 0, NR_RRC_MAC_CCCH_DATA_IND);
memset (NR_RRC_MAC_CCCH_DATA_IND (message_p).sdu, 0, CCCH_SDU_SIZE);
ccch_sdu_len = ie->value.choice.RRCContainer.size;
......@@ -137,7 +123,7 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
// Find instance from nr_cellid
int rrc_inst = -1;
if (RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CU) {
if (f1ap_req(true, instance)->cell_type==CELL_MACRO_GNB) {
for (int i=0; i<RC.nb_nr_inst; i++) {
// first get RRC instance (note, no the ITTI instance)
gNB_RRC_INST *rrc = RC.nrrrc[i];
......@@ -160,7 +146,7 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
}
AssertFatal(rrc_inst>=0,"couldn't find an RRC instance for nr_cell %llu\n",(unsigned long long int)nr_cellid);
int f1ap_uid = f1ap_add_ue(&f1ap_cu_inst[rrc_inst], rrc_inst, CC_id, 0, rnti);
int f1ap_uid = f1ap_add_ue(true, rrc_inst, CC_id, 0, rnti);
if (f1ap_uid < 0 ) {
LOG_E(F1AP, "Failed to add UE \n");
......@@ -168,26 +154,14 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
return -1;
}
f1ap_cu_inst[rrc_inst].f1ap_ue[f1ap_uid].du_ue_f1ap_id = du_ue_f1ap_id;
if (RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CU) {
NR_RRC_MAC_CCCH_DATA_IND (message_p).frame = 0;
NR_RRC_MAC_CCCH_DATA_IND (message_p).sub_frame = 0;
NR_RRC_MAC_CCCH_DATA_IND (message_p).sdu_size = ccch_sdu_len;
NR_RRC_MAC_CCCH_DATA_IND (message_p).gnb_index = rrc_inst; // CU instance
NR_RRC_MAC_CCCH_DATA_IND (message_p).rnti = rnti;
NR_RRC_MAC_CCCH_DATA_IND (message_p).CC_id = CC_id;
itti_send_msg_to_task (TASK_RRC_GNB, instance, message_p);
} else {
RRC_MAC_CCCH_DATA_IND (message_p).frame = 0;
RRC_MAC_CCCH_DATA_IND (message_p).sub_frame = 0;
RRC_MAC_CCCH_DATA_IND (message_p).sdu_size = ccch_sdu_len;
RRC_MAC_CCCH_DATA_IND (message_p).enb_index = rrc_inst; // CU instance
RRC_MAC_CCCH_DATA_IND (message_p).rnti = rnti;
RRC_MAC_CCCH_DATA_IND (message_p).CC_id = CC_id;
itti_send_msg_to_task (TASK_RRC_ENB, instance, message_p);
}
//getCxt(true,ITTI_MSG_DESTINATION_ID(message_p))->f1ap_ue[f1ap_uid].du_ue_f1ap_id = du_ue_f1ap_id;
NR_RRC_MAC_CCCH_DATA_IND (message_p).frame = 0;
NR_RRC_MAC_CCCH_DATA_IND (message_p).sub_frame = 0;
NR_RRC_MAC_CCCH_DATA_IND (message_p).sdu_size = ccch_sdu_len;
NR_RRC_MAC_CCCH_DATA_IND (message_p).gnb_index = rrc_inst; // CU instance
NR_RRC_MAC_CCCH_DATA_IND (message_p).rnti = rnti;
NR_RRC_MAC_CCCH_DATA_IND (message_p).CC_id = CC_id;
itti_send_msg_to_task (f1ap_req(true,ITTI_MSG_DESTINATION_ID(message_p))->cell_type==CELL_MACRO_GNB?TASK_RRC_GNB:TASK_RRC_ENB, instance, message_p);
return 0;
}
......@@ -218,7 +192,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
ie1->id = F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID;
ie1->criticality = F1AP_Criticality_reject;
ie1->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_GNB_CU_UE_F1AP_ID;
ie1->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(&f1ap_cu_inst[instance], f1ap_dl_rrc->rnti);
ie1->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(true, instance, f1ap_dl_rrc->rnti);
LOG_I(F1AP, "Setting GNB_CU_UE_F1AP_ID %llu associated with UE RNTI %x (instance %ld)\n",
(unsigned long long int)ie1->value.choice.GNB_CU_UE_F1AP_ID, f1ap_dl_rrc->rnti, instance);
/* mandatory */
......@@ -227,7 +201,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
ie2->id = F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID;
ie2->criticality = F1AP_Criticality_reject;
ie2->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_GNB_DU_UE_F1AP_ID;
ie2->value.choice.GNB_DU_UE_F1AP_ID = f1ap_get_du_ue_f1ap_id(&f1ap_cu_inst[instance], f1ap_dl_rrc->rnti);
ie2->value.choice.GNB_DU_UE_F1AP_ID = f1ap_get_du_ue_f1ap_id(true, instance, f1ap_dl_rrc->rnti);
LOG_I(F1AP, "GNB_DU_UE_F1AP_ID %llu associated with UE RNTI %x \n", (unsigned long long int)ie2->value.choice.GNB_DU_UE_F1AP_ID, f1ap_dl_rrc->rnti);
/* optional */
/* c3. oldgNB_DU_UE_F1AP_ID */
......@@ -264,7 +238,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
ie6->criticality = F1AP_Criticality_reject;
ie6->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_RRCContainer;
OCTET_STRING_fromBuf(&ie6->value.choice.RRCContainer,
(const char *)f1ap_dl_rrc->rrc_container, f1ap_dl_rrc->rrc_container_length);
(const char *)f1ap_dl_rrc->rrc_container, f1ap_dl_rrc->rrc_container_length);
/* optional */
/* c7. RAT_FrequencyPriorityInformation */
......@@ -294,7 +268,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
return -1;
}
cu_f1ap_itti_send_sctp_data_req(instance, f1ap_assoc_id /* BK: fix me*/, buffer, len, 0 /* BK: fix me*/);
f1ap_itti_send_sctp_data_req(true, instance, buffer, len, 0 /* BK: fix me*/);
return 0;
}
......@@ -326,13 +300,13 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID, true);
cu_ue_f1ap_id = ie->value.choice.GNB_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));
cu_ue_f1ap_id, f1ap_get_rnti_by_cu_id(true, 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(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));
du_ue_f1ap_id, f1ap_get_rnti_by_cu_id(true, instance, du_ue_f1ap_id));
/* mandatory */
/* SRBID */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_ULRRCMessageTransferIEs_t, ie, container,
......@@ -362,7 +336,7 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
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_inst[instance], cu_ue_f1ap_id);
RRC_DCCH_DATA_IND (message_p).rnti = f1ap_get_rnti_by_cu_id(true, 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
......@@ -371,7 +345,7 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
protocol_ctxt_t ctxt;
ctxt.module_id = instance;
ctxt.instance = instance;
ctxt.rnti = f1ap_get_rnti_by_cu_id(&f1ap_cu_inst[instance], cu_ue_f1ap_id);
ctxt.rnti = f1ap_get_rnti_by_cu_id(true, instance, cu_ue_f1ap_id);
ctxt.enb_flag = 1;
ctxt.eNB_index = 0;
ctxt.configured = 1;
......
......@@ -38,13 +38,14 @@
#include "f1ap_cu_task.h"
#include "proto_agent.h"
extern RAN_CONTEXT_t RC;
extern uint8_t proto_agent_flag;
f1ap_setup_req_t *f1ap_du_data_from_du;
f1ap_cudu_inst_t f1ap_cu_inst[MAX_eNB];
void cu_task_handle_sctp_association_ind(instance_t instance, sctp_new_association_ind_t *sctp_new_association_ind) {
createF1inst(true, instance, NULL);
// save the assoc id
f1ap_setup_req_t *f1ap_du_data=f1ap_req(true, instance);
f1ap_du_data->assoc_id = sctp_new_association_ind->assoc_id;
f1ap_du_data->sctp_in_streams = sctp_new_association_ind->in_streams;
f1ap_du_data->sctp_out_streams = sctp_new_association_ind->out_streams;
f1ap_du_data->default_sctp_stream_id = 0;
// Nothing
}
......@@ -56,20 +57,12 @@ void cu_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
sctp_new_association_resp->sctp_state,
instance,
sctp_new_association_resp->ulp_cnx_id);
if (sctp_new_association_resp->sctp_state == SCTP_STATE_SHUTDOWN)
proto_agent_stop(instance);
//if (sctp_new_association_resp->sctp_state == SCTP_STATE_SHUTDOWN)
//proto_agent_stop(instance);
//f1ap_handle_setup_message(instance, sctp_new_association_resp->sctp_state == SCTP_STATE_SHUTDOWN);
return; // exit -1 for debugging
}
// go to an init func
f1ap_du_data_from_du = (f1ap_setup_req_t *)calloc(1, sizeof(f1ap_setup_req_t));
// save the assoc id
f1ap_du_data_from_du->assoc_id = sctp_new_association_resp->assoc_id;
f1ap_du_data_from_du->sctp_in_streams = sctp_new_association_resp->in_streams;
f1ap_du_data_from_du->sctp_out_streams = sctp_new_association_resp->out_streams;
/* setup parameters for F1U and start the server */
const cudu_params_t params = {
.local_ipv4_address = RC.nrrrc[instance]->eth_params_s.my_addr,
......@@ -77,9 +70,8 @@ void cu_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
.remote_ipv4_address = RC.nrrrc[instance]->eth_params_s.remote_addr,
.remote_port = RC.nrrrc[instance]->eth_params_s.remote_portd
};
AssertFatal(proto_agent_start(instance, &params) == 0,
"could not start PROTO_AGENT for F1U on instance %ld!\n", instance);
proto_agent_flag = 1;
//AssertFatal(proto_agent_start(instance, &params) == 0,
// "could not start PROTO_AGENT for F1U on instance %ld!\n", instance);
}
void cu_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_data_ind) {
......@@ -120,7 +112,10 @@ void cu_task_send_sctp_init_req(instance_t enb_id) {
}
void *F1AP_CU_task(void *arg) {
void *
F1AP_CU_task(void *arg) {
MessageDef *received_msg = NULL;
int result;
LOG_I(F1AP, "Starting F1AP at CU\n");
......@@ -136,7 +131,7 @@ void *F1AP_CU_task(void *arg) {
case SCTP_NEW_ASSOCIATION_IND:
LOG_I(F1AP, "CU Task Received SCTP_NEW_ASSOCIATION_IND for instance %ld\n",
ITTI_MSG_DESTINATION_INSTANCE(received_msg));
cu_task_handle_sctp_association_ind(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
cu_task_handle_sctp_association_ind(ITTI_MSG_ORIGIN_INSTANCE(received_msg),
&received_msg->ittiMsg.sctp_new_association_ind);
break;
......
......@@ -44,31 +44,29 @@
#include "rrc_eNB_GTPV1U.h"
#include "openair2/RRC/NR/rrc_gNB_NGAP.h"
extern f1ap_setup_req_t *f1ap_du_data_from_du;
extern f1ap_cudu_inst_t f1ap_cu_inst[MAX_eNB];
extern RAN_CONTEXT_t RC;
extern uint32_t f1ap_assoc_id;
static void setQos(F1AP_NonDynamic5QIDescriptor_t *toFill) {
asn1cCalloc(toFill,F1AP_NonDynamic5QIDescriptor_t, tmp);
/* fiveQI */
tmp->fiveQI = 1L;
/* OPTIONAL */
/* qoSPriorityLevel */
if (0) {
asn1cCallocOne(toFill->qoSPriorityLevel, long, 1L);
}
/* OPTIONAL */
/* averagingWindow */
if (0) {
asn1cCallocOne(toFill->averagingWindow,
F1AP_AveragingWindow_t, 1L);
F1AP_AveragingWindow_t, 1L);
}
/* OPTIONAL */
/* maxDataBurstVolume */
if (0) {
asn1cCallocOne(toFill->maxDataBurstVolume,
F1AP_MaxDataBurstVolume_t, 1L);
F1AP_MaxDataBurstVolume_t, 1L);
}
}
......@@ -110,8 +108,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
ie3->criticality = F1AP_Criticality_reject;
ie3->value.present = F1AP_UEContextSetupRequestIEs__value_PR_NRCGI;
/* - nRCGI */
addnRCGI(ie3->value.choice.NRCGI, f1ap_du_data_from_du->cell);
addnRCGI(ie3->value.choice.NRCGI, f1ap_ue_context_setup_req);
/* mandatory */
/* c4. ServCellIndex */
asn1cSequenceAdd(out->protocolIEs.list, F1AP_UEContextSetupRequestIEs_t, ie4);
......@@ -157,7 +154,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
ie7->id = F1AP_ProtocolIE_ID_id_Candidate_SpCell_List; //90
ie7->criticality = F1AP_Criticality_ignore;
ie7->value.present = F1AP_UEContextSetupRequestIEs__value_PR_Candidate_SpCell_List;
for (int i=0; i<0; i++) {
asn1cSequenceAdd(ie7->value.choice.Candidate_SpCell_List.list,F1AP_Candidate_SpCell_ItemIEs_t, candidate_spCell_item_ies);
candidate_spCell_item_ies->id = F1AP_ProtocolIE_ID_id_Candidate_SpCell_Item; // 91
......@@ -165,14 +162,14 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
candidate_spCell_item_ies->value.present = F1AP_Candidate_SpCell_ItemIEs__value_PR_Candidate_SpCell_Item;
/* 7.1 Candidate_SpCell_Item */
F1AP_Candidate_SpCell_Item_t *candidate_spCell_item=
&candidate_spCell_item_ies->value.choice.Candidate_SpCell_Item;
&candidate_spCell_item_ies->value.choice.Candidate_SpCell_Item;
/* - candidate_SpCell_ID */
//FixMe: first cell ???
addnRCGI(candidate_spCell_item->candidate_SpCell_ID,f1ap_ue_context_setup_req);
/* TODO add correct mcc/mnc */
}
}
/* optional */
/* c8. DRXCycle */
if (0) {
......@@ -182,19 +179,19 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
ie8->value.present = F1AP_UEContextSetupRequestIEs__value_PR_DRXCycle;
/* 8.1 longDRXCycleLength */
ie8->value.choice.DRXCycle.longDRXCycleLength = F1AP_LongDRXCycleLength_ms10; // enum
/* optional */
/* 8.2 shortDRXCycleLength */
if (0) {
asn1cCallocOne(ie6->value.choice.DRXCycle.shortDRXCycleLength,
F1AP_ShortDRXCycleLength_t, F1AP_ShortDRXCycleLength_ms2); // enum
F1AP_ShortDRXCycleLength_t, F1AP_ShortDRXCycleLength_ms2); // enum
}
/* optional */
/* 8.3 shortDRXCycleTimer */
if (0) {
asn1cCallocOne(ie8->value.choice.DRXCycle.shortDRXCycleTimer,
F1AP_ShortDRXCycleTimer_t, 123L);
F1AP_ShortDRXCycleTimer_t, 123L);
}
}
......@@ -238,7 +235,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* 10.1.3 sCellULConfigured*/
if (0) {
asn1cCallocOne(scell_toBeSetup_item->sCellULConfigured,
F1AP_CellULConfigured_t, F1AP_CellULConfigured_ul_and_sul); // enum
F1AP_CellULConfigured_t, F1AP_CellULConfigured_ul_and_sul); // enum
}
}
}
......@@ -264,7 +261,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* 11.1.2 duplicationIndication */
//if (0) {
asn1cCallocOne(srbs_toBeSetup_item->duplicationIndication,
F1AP_DuplicationIndication_t, F1AP_DuplicationIndication_true); // enum
F1AP_DuplicationIndication_t, F1AP_DuplicationIndication_true); // enum
//}
}
......@@ -331,7 +328,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
if (some_decide_qoS_characteristics) {
DRB_Information->dRB_QoS.qoS_Characteristics.present = F1AP_QoS_Characteristics_PR_non_Dynamic_5QI;
setQos(DRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI);
setQos(DRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI);
} else {
DRB_Information->dRB_QoS.qoS_Characteristics.present = F1AP_QoS_Characteristics_PR_dynamic_5QI;
asn1cCalloc(DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI, F1AP_Dynamic5QIDescriptor_t, tmp);
......@@ -347,21 +344,21 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* delayCritical */
if (0) {
asn1cCallocOne(DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->delayCritical,
long, 1L);
long, 1L);
}
/* OPTIONAL */
/* averagingWindow */
if (0) {
asn1cCallocOne(DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->averagingWindow,
F1AP_AveragingWindow_t, 1L);
F1AP_AveragingWindow_t, 1L);
}
/* OPTIONAL */
/* maxDataBurstVolume */
if (0) {
asn1cCallocOne(DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->maxDataBurstVolume,
F1AP_MaxDataBurstVolume_t, 1L);
F1AP_MaxDataBurstVolume_t, 1L);
}
} // if some_decide_qoS_characteristics
} // qoS_Characteristics
......@@ -385,14 +382,14 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* maxPacketLossRateDownlink */
if (0) {
asn1cCallocOne(DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateDownlink,
F1AP_MaxPacketLossRate_t, 1L);
F1AP_MaxPacketLossRate_t, 1L);
}
/* OPTIONAL */
/* maxPacketLossRateUplink */
if (0) {
asn1cCallocOne(DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateUplink,
F1AP_MaxPacketLossRate_t, 1L);
F1AP_MaxPacketLossRate_t, 1L);
}
}
......@@ -400,7 +397,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* reflective_QoS_Attribute */
if (0) {
asn1cCallocOne(DRB_Information->dRB_QoS.reflective_QoS_Attribute,
long, 1L);
long, 1L);
}
} // dRB_QoS
/* 12.1.2.2 sNSSAI */
......@@ -422,7 +419,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* 12.1.2.3 notificationControl */
if (0) {
asn1cCallocOne(DRB_Information->notificationControl,
F1AP_NotificationControl_t, F1AP_NotificationControl_active); // enum
F1AP_NotificationControl_t, F1AP_NotificationControl_active); // enum
}
/* 12.1.2.4 flows_Mapped_To_DRB_List */ // BK: need verifiy
......@@ -441,8 +438,8 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
if (some_decide_qoS_characteristics) {
QosParams->present = F1AP_QoS_Characteristics_PR_non_Dynamic_5QI;
setQos(QosParams->choice.non_Dynamic_5QI);
} else {
setQos(QosParams->choice.non_Dynamic_5QI);
} else {
QosParams->present = F1AP_QoS_Characteristics_PR_dynamic_5QI;
asn1cCalloc(QosParams->choice.dynamic_5QI, F1AP_Dynamic5QIDescriptor_t, tmp);
/* qoSPriorityLevel */
......@@ -624,7 +621,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
// return -1;
// }
LOG_D(F1AP,"F1AP UEContextSetupRequest Encoded %u bits\n", len);
cu_f1ap_itti_send_sctp_data_req(instance, f1ap_assoc_id /* BK: fix me*/, buffer, len, 0 /* BK: fix me*/);
f1ap_itti_send_sctp_data_req(true, instance, buffer, len, 0 /* BK: fix me*/);
return 0;
}
......@@ -679,12 +676,12 @@ int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
/* GNB_CU_UE_F1AP_ID */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseRequestIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID, true);
const rnti_t rnti = f1ap_get_rnti_by_cu_id(&f1ap_cu_inst[instance],
const rnti_t rnti = f1ap_get_rnti_by_cu_id(true, instance,
ie->value.choice.GNB_CU_UE_F1AP_ID);
/* GNB_DU_UE_F1AP_ID */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseRequestIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true);
const rnti_t rnti2 = f1ap_get_rnti_by_du_id(&f1ap_cu_inst[instance],
const rnti_t rnti2 = f1ap_get_rnti_by_du_id(true, instance,
ie->value.choice.GNB_DU_UE_F1AP_ID);
AssertFatal(rnti == rnti2, "RNTI obtained through DU ID (%x) is different from CU ID (%x)\n",
rnti2, rnti);
......@@ -713,13 +710,19 @@ int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
}
*/
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(
instance,
ue_context_pP,
S1AP_CAUSE_RADIO_NETWORK,
21); // send cause 21: connection with ue lost
if (f1ap_req(true, instance)->cell_type==CELL_MACRO_GNB) {
AssertFatal(false,"must be devlopped\n");
} else {
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(
instance,
ue_context_pP,
S1AP_CAUSE_RADIO_NETWORK,
21); // send cause 21: connection with ue lost
}
return 0;
}
......@@ -744,14 +747,14 @@ int CU_send_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
ie1->id = F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID;
ie1->criticality = F1AP_Criticality_reject;
ie1->value.present = F1AP_UEContextReleaseCommandIEs__value_PR_GNB_CU_UE_F1AP_ID;
ie1->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(&f1ap_cu_inst[instance], cmd->rnti);
ie1->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(true, instance, cmd->rnti);
/* mandatory */
/* c2. GNB_DU_UE_F1AP_ID */
asn1cSequenceAdd(out->protocolIEs.list, F1AP_UEContextReleaseCommandIEs_t, ie2);
ie2->id = F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID;
ie2->criticality = F1AP_Criticality_reject;
ie2->value.present = F1AP_UEContextReleaseCommandIEs__value_PR_GNB_DU_UE_F1AP_ID;
ie2->value.choice.GNB_DU_UE_F1AP_ID = f1ap_get_du_ue_f1ap_id(&f1ap_cu_inst[instance], cmd->rnti);
ie2->value.choice.GNB_DU_UE_F1AP_ID = f1ap_get_du_ue_f1ap_id(true, instance, cmd->rnti);
/* mandatory */
/* c3. Cause */
asn1cSequenceAdd(out->protocolIEs.list, F1AP_UEContextReleaseCommandIEs_t, ie3);
......@@ -801,7 +804,7 @@ int CU_send_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
return -1;
}
cu_f1ap_itti_send_sctp_data_req(instance, f1ap_du_data_from_du->assoc_id, buffer, len, 0);
f1ap_itti_send_sctp_data_req(true, instance, buffer, len, 0);
return 0;
}
......@@ -816,12 +819,12 @@ int CU_handle_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
/* GNB_CU_UE_F1AP_ID */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCompleteIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID, true);
const rnti_t rnti = f1ap_get_rnti_by_cu_id(&f1ap_cu_inst[instance],
const rnti_t rnti = f1ap_get_rnti_by_cu_id(true, instance,
ie->value.choice.GNB_CU_UE_F1AP_ID);
/* GNB_DU_UE_F1AP_ID */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCompleteIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true);
const rnti_t rnti2 = f1ap_get_rnti_by_du_id(&f1ap_cu_inst[instance],
const rnti_t rnti2 = f1ap_get_rnti_by_du_id(true, instance,
ie->value.choice.GNB_DU_UE_F1AP_ID);
AssertFatal(rnti == rnti2, "RNTI obtained through DU ID (%x) is different from CU ID (%x)\n",
rnti2, rnti);
......@@ -841,7 +844,7 @@ int CU_handle_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
protocol_ctxt_t ctxt;
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, instance, ENB_FLAG_YES, rnti, 0, 0, instance);
if (RC.nrrrc[instance]->node_type == ngran_gNB_CU) {
if (f1ap_req(true, instance)->cell_type==CELL_MACRO_GNB) {
struct rrc_gNB_ue_context_s *ue_context_p =
rrc_gNB_get_ue_context(RC.nrrrc[instance], rnti);
......@@ -897,7 +900,7 @@ int CU_handle_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
instance, rnti, PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_DEACTIVATED);
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);
f1ap_remove_ue(true, instance, rnti);
return 0;
}
......@@ -909,7 +912,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) {
uint8_t *buffer=NULL;
uint32_t len=0;
// for test
cellIDs_t hardCoded={ .mcc=208, .mnc=93, .mnc_digit_length=2};
cellIDs_t hardCoded= { .mcc=208, .mnc=93, .mnc_digit_length=2};
/* Create */
/* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
......
......@@ -37,10 +37,8 @@
#include "f1ap_du_interface_management.h"
#include "assertions.h"
extern f1ap_setup_req_t *f1ap_du_data;
extern RAN_CONTEXT_t RC;
int nrb_lut[29] = {11, 18, 24, 25, 31, 32, 38, 51, 52, 65, 66, 78, 79, 93, 106, 107, 121, 132, 133, 135, 160, 162, 189, 216, 217, 245, 264, 270, 273};
static const int nrb_lut[29] = {11, 18, 24, 25, 31, 32, 38, 51, 52, 65, 66, 78, 79, 93, 106, 107, 121, 132, 133, 135, 160, 162, 189, 216, 217, 245, 264, 270, 273};
int to_NRNRB(int nrb) {
for (int i=0; i<sizeofArray(nrb_lut); i++)
......@@ -121,17 +119,17 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
ieC2->id = F1AP_ProtocolIE_ID_id_gNB_DU_ID;
ieC2->criticality = F1AP_Criticality_reject;
ieC2->value.present = F1AP_F1SetupRequestIEs__value_PR_GNB_DU_ID;
asn_int642INTEGER(&ieC2->value.choice.GNB_DU_ID, f1ap_du_data->gNB_DU_id);
asn_int642INTEGER(&ieC2->value.choice.GNB_DU_ID, f1ap_req(false, instance)->gNB_DU_id);
/* optional */
/* c3. GNB_DU_Name */
if (f1ap_du_data->gNB_DU_name != NULL) {
if (f1ap_req(false,instance)->gNB_DU_name != NULL) {
asn1cSequenceAdd(f1Setup->protocolIEs.list, F1AP_F1SetupRequestIEs_t, ieC3);
ieC3->id = F1AP_ProtocolIE_ID_id_gNB_DU_Name;
ieC3->criticality = F1AP_Criticality_ignore;
ieC3->value.present = F1AP_F1SetupRequestIEs__value_PR_GNB_DU_Name;
OCTET_STRING_fromBuf(&ieC3->value.choice.GNB_DU_Name, f1ap_du_data->gNB_DU_name,
strlen(f1ap_du_data->gNB_DU_name));
char *gNB_DU_name=f1ap_req(false, instance)->gNB_DU_name;
OCTET_STRING_fromBuf(&ieC3->value.choice.GNB_DU_Name, gNB_DU_name, strlen(gNB_DU_name));
}
/* mandatory */
......@@ -140,12 +138,13 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
ieCells->id = F1AP_ProtocolIE_ID_id_gNB_DU_Served_Cells_List;
ieCells->criticality = F1AP_Criticality_reject;
ieCells->value.present = F1AP_F1SetupRequestIEs__value_PR_GNB_DU_Served_Cells_List;
int num_cells_available = f1ap_du_data->num_cells_available;
int num_cells_available = f1ap_req(false, instance)->num_cells_available;
LOG_D(F1AP, "num_cells_available = %d \n", num_cells_available);
for (int i=0; i<num_cells_available; i++) {
/* mandatory */
/* 4.1 served cells item */
cellIDs_t *cell=&f1ap_req(false, instance)->cell[i];
asn1cSequenceAdd(ieCells->value.choice.GNB_DU_Served_Cells_List.list,
F1AP_GNB_DU_Served_Cells_ItemIEs_t, duServedCell);
duServedCell->id = F1AP_ProtocolIE_ID_id_GNB_DU_Served_Cells_Item;
......@@ -154,11 +153,11 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
F1AP_GNB_DU_Served_Cells_Item_t *gnb_du_served_cells_item=&duServedCell->value.choice.GNB_DU_Served_Cells_Item;
/* 4.1.1 served cell Information */
F1AP_Served_Cell_Information_t *served_cell_information= &gnb_du_served_cells_item->served_Cell_Information;
//addnRCGI(served_cell_information->nRCGI,f1ap_du_data->cell+i);
addnRCGI(served_cell_information->nRCGI,cell);
/* - nRPCI */
served_cell_information->nRPCI = f1ap_du_data->cell[i].nr_pci; // int 0..1007
served_cell_information->nRPCI = cell->nr_pci; // int 0..1007
/* - fiveGS_TAC */
uint32_t tac=htonl(f1ap_du_data->cell[i].tac);
uint32_t tac=htonl(cell->tac);
asn1cCalloc(served_cell_information->fiveGS_TAC, F1AP_FiveGS_TAC_t, netOrder);
OCTET_STRING_fromBuf(netOrder, ((char *)&tac)+1, 3);
......@@ -170,18 +169,16 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
/* servedPLMN information */
asn1cSequenceAdd(served_cell_information->servedPLMNs.list, F1AP_ServedPLMNs_Item_t,servedPLMN_item);
MCC_MNC_TO_PLMNID(f1ap_du_data->cell[i].mcc, f1ap_du_data->cell[i].mnc,
f1ap_du_data->cell[i].mnc_digit_length, &servedPLMN_item->pLMN_Identity);
MCC_MNC_TO_PLMNID(cell->mcc, cell->mnc, cell->mnc_digit_length, &servedPLMN_item->pLMN_Identity);
// // /* - CHOICE NR-MODE-Info */
F1AP_NR_Mode_Info_t *nR_Mode_Info= &served_cell_information->nR_Mode_Info;
//f1ap_du_data->fdd_flag = 1;
if (f1ap_du_data->fdd_flag) { // FDD
if (f1ap_req(false, instance)->fdd_flag) { // FDD
nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_fDD;
asn1cCalloc(nR_Mode_Info->choice.fDD, F1AP_FDD_Info_t, fDD_Info);
/* FDD.1 UL NRFreqInfo */
/* FDD.1.1 UL NRFreqInfo ARFCN */
fDD_Info->uL_NRFreqInfo.nRARFCN = f1ap_du_data->nr_mode_info[i].fdd.ul_nr_arfcn; // Integer
fDD_Info->uL_NRFreqInfo.nRARFCN = f1ap_req(false,instance)->nr_mode_info[i].fdd.ul_nr_arfcn; // Integer
/* FDD.1.2 F1AP_SUL_Information */
if(0) { // Optional
......@@ -192,27 +189,27 @@ 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;
int fdd_ul_num_available_freq_Bands = f1ap_req(false,instance)->nr_mode_info[i].fdd.ul_num_frequency_bands;
LOG_D(F1AP, "fdd_ul_num_available_freq_Bands = %d \n", fdd_ul_num_available_freq_Bands);
for (int fdd_ul_j=0; fdd_ul_j<fdd_ul_num_available_freq_Bands; fdd_ul_j++) {
asn1cSequenceAdd(fDD_Info->uL_NRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, nr_freqBandNrItem);
/* FDD.1.3.1 freqBandIndicatorNr*/
nr_freqBandNrItem->freqBandIndicatorNr = f1ap_du_data->nr_mode_info[i].fdd.ul_nr_band[fdd_ul_j]; //
nr_freqBandNrItem->freqBandIndicatorNr = f1ap_req(false,instance)->nr_mode_info[i].fdd.ul_nr_band[fdd_ul_j]; //
/* FDD.1.3.2 supportedSULBandList*/
int num_available_supported_SULBands = f1ap_du_data->nr_mode_info[i].fdd.ul_num_sul_frequency_bands;
int num_available_supported_SULBands = f1ap_req(false,instance)->nr_mode_info[i].fdd.ul_num_sul_frequency_bands;
LOG_D(F1AP, "num_available_supported_SULBands = %d \n", num_available_supported_SULBands);
for (int fdd_ul_k=0; fdd_ul_k<num_available_supported_SULBands; fdd_ul_k++) {
asn1cSequenceAdd(nr_freqBandNrItem->supportedSULBandList.list, F1AP_SupportedSULFreqBandItem_t, nr_supportedSULFreqBandItem);
/* FDD.1.3.2.1 freqBandIndicatorNr */
nr_supportedSULFreqBandItem->freqBandIndicatorNr = f1ap_du_data->nr_mode_info[i].fdd.ul_nr_sul_band[fdd_ul_k]; //
nr_supportedSULFreqBandItem->freqBandIndicatorNr = f1ap_req(false,instance)->nr_mode_info[i].fdd.ul_nr_sul_band[fdd_ul_k]; //
} // for FDD : UL supported_SULBands
} // for FDD : UL freq_Bands
/* FDD.2 DL NRFreqInfo */
/* FDD.2.1 DL NRFreqInfo ARFCN */
fDD_Info->dL_NRFreqInfo.nRARFCN = f1ap_du_data->nr_mode_info[i].fdd.dl_nr_arfcn; // Integer
fDD_Info->dL_NRFreqInfo.nRARFCN = f1ap_req(false,instance)->nr_mode_info[i].fdd.dl_nr_arfcn; // Integer
/* FDD.2.2 F1AP_SUL_Information */
if(0) { // Optional
......@@ -223,36 +220,36 @@ 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;
int fdd_dl_num_available_freq_Bands = f1ap_req(false,instance)->nr_mode_info[i].fdd.dl_num_frequency_bands;
LOG_D(F1AP, "fdd_dl_num_available_freq_Bands = %d \n", fdd_dl_num_available_freq_Bands);
for (int fdd_dl_j=0; fdd_dl_j<fdd_dl_num_available_freq_Bands; fdd_dl_j++) {
asn1cSequenceAdd(fDD_Info->dL_NRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, nr_freqBandNrItem);
/* FDD.2.3.1 freqBandIndicatorNr*/
nr_freqBandNrItem->freqBandIndicatorNr = f1ap_du_data->nr_mode_info[i].fdd.dl_nr_band[fdd_dl_j]; //
nr_freqBandNrItem->freqBandIndicatorNr = f1ap_req(false,instance)->nr_mode_info[i].fdd.dl_nr_band[fdd_dl_j]; //
/* FDD.2.3.2 supportedSULBandList*/
int num_available_supported_SULBands = f1ap_du_data->nr_mode_info[i].fdd.dl_num_sul_frequency_bands;
int num_available_supported_SULBands = f1ap_req(false,instance)->nr_mode_info[i].fdd.dl_num_sul_frequency_bands;
LOG_D(F1AP, "num_available_supported_SULBands = %d \n", num_available_supported_SULBands);
for (int fdd_dl_k=0; fdd_dl_k<num_available_supported_SULBands; fdd_dl_k++) {
asn1cSequenceAdd(nr_freqBandNrItem->supportedSULBandList.list, F1AP_SupportedSULFreqBandItem_t, nr_supportedSULFreqBandItem);
/* FDD.2.3.2.1 freqBandIndicatorNr */
nr_supportedSULFreqBandItem->freqBandIndicatorNr = f1ap_du_data->nr_mode_info[i].fdd.dl_nr_sul_band[fdd_dl_k]; //
nr_supportedSULFreqBandItem->freqBandIndicatorNr = f1ap_req(false,instance)->nr_mode_info[i].fdd.dl_nr_sul_band[fdd_dl_k]; //
} // for FDD : DL supported_SULBands
} // for FDD : DL freq_Bands
/* FDD.3 UL Transmission Bandwidth */
fDD_Info->uL_Transmission_Bandwidth.nRSCS = f1ap_du_data->nr_mode_info[i].fdd.ul_scs;
fDD_Info->uL_Transmission_Bandwidth.nRNRB = to_NRNRB(f1ap_du_data->nr_mode_info[i].fdd.ul_nrb);
fDD_Info->uL_Transmission_Bandwidth.nRSCS = f1ap_req(false,instance)->nr_mode_info[i].fdd.ul_scs;
fDD_Info->uL_Transmission_Bandwidth.nRNRB = to_NRNRB(f1ap_req(false,instance)->nr_mode_info[i].fdd.ul_nrb);
/* FDD.4 DL Transmission Bandwidth */
fDD_Info->dL_Transmission_Bandwidth.nRSCS = f1ap_du_data->nr_mode_info[i].fdd.dl_scs;
fDD_Info->dL_Transmission_Bandwidth.nRNRB = to_NRNRB(f1ap_du_data->nr_mode_info[i].fdd.dl_nrb);
fDD_Info->dL_Transmission_Bandwidth.nRSCS = f1ap_req(false,instance)->nr_mode_info[i].fdd.dl_scs;
fDD_Info->dL_Transmission_Bandwidth.nRNRB = to_NRNRB(f1ap_req(false,instance)->nr_mode_info[i].fdd.dl_nrb);
} else { // TDD
nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_tDD;
asn1cCalloc(nR_Mode_Info->choice.tDD, F1AP_TDD_Info_t, tDD_Info);
/* TDD.1 nRFreqInfo */
/* TDD.1.1 nRFreqInfo ARFCN */
tDD_Info->nRFreqInfo.nRARFCN = f1ap_du_data->nr_mode_info[i].tdd.nr_arfcn; // Integer
tDD_Info->nRFreqInfo.nRARFCN = f1ap_req(false,instance)->nr_mode_info[i].tdd.nr_arfcn; // Integer
/* TDD.1.2 F1AP_SUL_Information */
if(0) { // Optional
......@@ -263,42 +260,42 @@ 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;
int tdd_num_available_freq_Bands = f1ap_req(false,instance)->nr_mode_info[i].tdd.num_frequency_bands;
LOG_D(F1AP, "tdd_num_available_freq_Bands = %d \n", tdd_num_available_freq_Bands);
for (int j=0; j<tdd_num_available_freq_Bands; j++) {
asn1cSequenceAdd(tDD_Info->nRFreqInfo.freqBandListNr.list, F1AP_FreqBandNrItem_t, nr_freqBandNrItem);
/* TDD.1.3.1 freqBandIndicatorNr*/
nr_freqBandNrItem->freqBandIndicatorNr = *f1ap_du_data->nr_mode_info[i].tdd.nr_band; //
nr_freqBandNrItem->freqBandIndicatorNr = *f1ap_req(false,instance)->nr_mode_info[i].tdd.nr_band; //
/* TDD.1.3.2 supportedSULBandList*/
int num_available_supported_SULBands = f1ap_du_data->nr_mode_info[i].tdd.num_sul_frequency_bands;
int num_available_supported_SULBands = f1ap_req(false,instance)->nr_mode_info[i].tdd.num_sul_frequency_bands;
LOG_D(F1AP, "num_available_supported_SULBands = %d \n", num_available_supported_SULBands);
for (int k=0; k<num_available_supported_SULBands; k++) {
asn1cSequenceAdd(nr_freqBandNrItem->supportedSULBandList.list,F1AP_SupportedSULFreqBandItem_t, nr_supportedSULFreqBandItem);
/* TDD.1.3.2.1 freqBandIndicatorNr */
nr_supportedSULFreqBandItem->freqBandIndicatorNr = *f1ap_du_data->nr_mode_info[i].tdd.nr_sul_band; //
nr_supportedSULFreqBandItem->freqBandIndicatorNr = *f1ap_req(false,instance)->nr_mode_info[i].tdd.nr_sul_band; //
} // for TDD : supported_SULBands
} // for TDD : freq_Bands
/* TDD.2 transmission_Bandwidth */
tDD_Info->transmission_Bandwidth.nRSCS = f1ap_du_data->nr_mode_info[i].tdd.scs;
tDD_Info->transmission_Bandwidth.nRNRB = to_NRNRB(f1ap_du_data->nr_mode_info[i].tdd.nrb);
tDD_Info->transmission_Bandwidth.nRSCS = f1ap_req(false,instance)->nr_mode_info[i].tdd.scs;
tDD_Info->transmission_Bandwidth.nRNRB = to_NRNRB(f1ap_req(false,instance)->nr_mode_info[i].tdd.nrb);
} // if nR_Mode_Info
/* - measurementTimingConfiguration */
char *measurementTimingConfiguration = f1ap_du_data->measurement_timing_information[i]; // sept. 2018
char *measurementTimingConfiguration = f1ap_req(false,instance)->measurement_timing_information[i]; // sept. 2018
OCTET_STRING_fromBuf(&served_cell_information->measurementTimingConfiguration,
measurementTimingConfiguration,
strlen(measurementTimingConfiguration));
asn1cCalloc(gnb_du_served_cells_item->gNB_DU_System_Information, F1AP_GNB_DU_System_Information_t, gNB_DU_System_Information);
/* 4.1.2 gNB-DU System Information */
OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message, // sept. 2018
(const char *)f1ap_du_data->mib[i], //f1ap_du_data->mib,
f1ap_du_data->mib_length[i]);
(const char *)f1ap_req(false,instance)->mib[i], //f1ap_du_data->mib,
f1ap_req(false,instance)->mib_length[i]);
OCTET_STRING_fromBuf(&gNB_DU_System_Information->sIB1_message, // sept. 2018
(const char *)f1ap_du_data->sib1[i],
f1ap_du_data->sib1_length[i]);
(const char *)f1ap_req(false,instance)->sib1[i],
f1ap_req(false,instance)->sib1_length[i]);
}
/* mandatory */
......@@ -319,7 +316,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
}
ASN_STRUCT_RESET(asn_DEF_F1AP_F1AP_PDU, &pdu);
du_f1ap_itti_send_sctp_data_req(instance, f1ap_du_data->assoc_id, buffer, len, 0);
f1ap_itti_send_sctp_data_req(false, instance, buffer, len, 0);
return 0;
}
......@@ -491,17 +488,8 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
MSC_AS_TIME_FMT" DU_handle_F1_SETUP_RESPONSE successfulOutcome assoc_id %d",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
assoc_id);
if (RC.nrrrc[0]->node_type == ngran_gNB_DU) {
LOG_D(F1AP, "Sending F1AP_SETUP_RESP ITTI message to GNB_APP with assoc_id (%d->%d)\n",
assoc_id,ENB_MODULE_ID_TO_INSTANCE(assoc_id));
itti_send_msg_to_task(TASK_GNB_APP, GNB_MODULE_ID_TO_INSTANCE(assoc_id), msg_p);
} else {
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);
}
LOG_D(F1AP, "Sending F1AP_SETUP_RESP ITTI message\n");
itti_send_msg_to_task(TASK_F1APP, GNB_MODULE_ID_TO_INSTANCE(assoc_id), msg_p);
return 0;
}
......@@ -573,12 +561,13 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
F1AP_Served_Cells_To_Add_Item_t *served_cells_to_add_item= &served_cells_to_add_item_ies->value.choice.Served_Cells_To_Add_Item;
F1AP_Served_Cell_Information_t *served_cell_information=&served_cells_to_add_item->served_Cell_Information;
/* - nRCGI */
//addnRCGI(served_cell_information->nRCGI, f1ap_setup_req->cell[j]);
addnRCGI(served_cell_information->nRCGI, &f1ap_setup_req->cell[j]);
/* - nRPCI */
/* 2.1.1 serverd cell Information */
served_cell_information->nRPCI = f1ap_setup_req->cell[j].nr_pci; // int 0..1007
cellIDs_t *cell=&f1ap_req(false, instance)->cell[j];
served_cell_information->nRPCI = cell->nr_pci; // int 0..1007
/* - fiveGS_TAC */
uint32_t tac=htonl(f1ap_du_data->cell[j].tac);
uint32_t tac=htonl(cell->tac);
served_cell_information->fiveGS_TAC=(F1AP_FiveGS_TAC_t *) calloc(1,sizeof(F1AP_FiveGS_TAC_t *));
OCTET_STRING_fromBuf(served_cell_information->fiveGS_TAC, ((char *)&tac)+1, 3);
......@@ -589,7 +578,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
}
asn1cSequenceAdd(served_cell_information->servedPLMNs.list, F1AP_ServedPLMNs_Item_t, servedPLMN_item);
MCC_MNC_TO_PLMNID(f1ap_du_data->cell[j].mcc, f1ap_du_data->cell[j].mnc, f1ap_du_data->cell[j].mnc_digit_length, &servedPLMN_item->pLMN_Identity);
MCC_MNC_TO_PLMNID(cell->mcc, cell->mnc, cell->mnc_digit_length, &servedPLMN_item->pLMN_Identity);
// // /* - CHOICE NR-MODE-Info */
F1AP_NR_Mode_Info_t *nR_Mode_Info=&served_cell_information->nR_Mode_Info;
......@@ -653,6 +642,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
for (int i=0; i<1; i++) {
//
cellIDs_t *cell=&f1ap_req(false, instance)->cell[i];
asn1cSequenceAdd(ie3->value.choice.Served_Cells_To_Modify_List.list, F1AP_Served_Cells_To_Modify_ItemIEs_t, served_cells_to_modify_item_ies);
served_cells_to_modify_item_ies->id = F1AP_ProtocolIE_ID_id_Served_Cells_To_Modify_Item;
served_cells_to_modify_item_ies->criticality = F1AP_Criticality_reject;
......@@ -663,7 +653,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
/* 3.2.1 serverd cell Information */
F1AP_Served_Cell_Information_t *served_cell_information= &served_cells_to_modify_item->served_Cell_Information;
/* - nRCGI */
//addnRGCI(served_cell_information->nRCGI,f1ap_setup_req->cell[i]);
//addnRGCI(served_cell_information->nRCGI,f1ap_setup_req->cell[i]);
/* - nRPCI */
served_cell_information->nRPCI = f1ap_setup_req->cell[i].nr_pci; // int 0..1007
/* - fiveGS_TAC */
......@@ -681,7 +671,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
}
asn1cSequenceAdd(served_cell_information->servedPLMNs.list, F1AP_ServedPLMNs_Item_t, servedPLMN_item);
MCC_MNC_TO_PLMNID(f1ap_du_data->cell[i].mcc, f1ap_du_data->cell[i].mnc, f1ap_du_data->cell[i].mnc_digit_length, &servedPLMN_item->pLMN_Identity);
MCC_MNC_TO_PLMNID(cell->mcc, cell->mnc, cell->mnc_digit_length, &servedPLMN_item->pLMN_Identity);
// // /* - CHOICE NR-MODE-Info */
F1AP_NR_Mode_Info_t *nR_Mode_Info= &served_cell_information->nR_Mode_Info;
......@@ -752,7 +742,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
served_cells_to_delete_item_ies->value.present = F1AP_Served_Cells_To_Delete_ItemIEs__value_PR_Served_Cells_To_Delete_Item;
F1AP_Served_Cells_To_Delete_Item_t *served_cells_to_delete_item=&served_cells_to_delete_item_ies->value.choice.Served_Cells_To_Delete_Item;
/* 3.1 oldNRCGI */
//addnRGCI(served_cells_to_delete_item->oldNRCGI, f1ap_setup_req->cell[i]);
addnRCGI(served_cells_to_delete_item->oldNRCGI, &f1ap_setup_req->cell[i]);
}
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
......@@ -925,17 +915,8 @@ int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance,
MSC_AS_TIME_FMT" DU_handle_GNB_CU_CONFIGURATION_UPDATE initiatingMessage assoc_id %d",
0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
assoc_id);
if (RC.nrrrc[0]->node_type == ngran_gNB_DU) {
LOG_D(F1AP, "Sending F1AP_GNB_CU_CONFIGURATION_UPDATE ITTI message to GNB_APP with assoc_id (%d->%d)\n",
assoc_id,ENB_MODULE_ID_TO_INSTANCE(assoc_id));
itti_send_msg_to_task(TASK_GNB_APP, GNB_MODULE_ID_TO_INSTANCE(assoc_id), msg_p);
} else {
LOG_D(F1AP, "Sending F1AP_GNB_CU_CONFIGURATION_UPDATE 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);
}
LOG_D(F1AP, "Sending F1AP_GNB_CU_CONFIGURATION_UPDATE ITTI message \n");
itti_send_msg_to_task(TASK_F1APP, GNB_MODULE_ID_TO_INSTANCE(assoc_id), msg_p);
return 0;
}
......@@ -985,7 +966,7 @@ int DU_send_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
}
ASN_STRUCT_RESET(asn_DEF_F1AP_F1AP_PDU, &pdu);
du_f1ap_itti_send_sctp_data_req(instance, f1ap_du_data->assoc_id, buffer, len, 0);
f1ap_itti_send_sctp_data_req(false, instance, buffer, len, 0);
return 0;
}
......
......@@ -56,12 +56,6 @@
#include "intertask_interface.h"
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
extern f1ap_setup_req_t *f1ap_du_data;
extern RAN_CONTEXT_t RC;
extern f1ap_cudu_inst_t f1ap_du_inst[MAX_eNB];
uint8_t du_ccch_flag = 1;
int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t instance,
uint32_t assoc_id,
uint32_t stream,
......@@ -108,9 +102,9 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
du_ue_f1ap_id = ie->value.choice.GNB_DU_UE_F1AP_ID;
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
f1ap_get_rnti_by_du_id(false, 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 ) {
if (f1ap_du_add_cu_ue_id(false, instance,du_ue_f1ap_id, cu_ue_f1ap_id) < 0 ) {
LOG_E(F1AP, "Failed to find the F1AP UID \n");
//return -1;
}
......@@ -180,7 +174,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
// decode RRC Container and act on the message type
AssertFatal(srb_id<3,"illegal srb_id\n");
protocol_ctxt_t ctxt;
ctxt.rnti = f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance], du_ue_f1ap_id);
ctxt.rnti = f1ap_get_rnti_by_du_id(false, instance, du_ue_f1ap_id);
ctxt.module_id = instance;
ctxt.instance = instance;
ctxt.enb_flag = 1;
......@@ -222,7 +216,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
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));
f1ap_get_rnti_by_du_id(false, instance, du_ue_f1ap_id));
// Get configuration
LTE_RRCConnectionSetup_t *rrcConnectionSetup = &dl_ccch_msg->message.choice.c1.choice.rrcConnectionSetup;
AssertFatal(rrcConnectionSetup!=NULL,"rrcConnectionSetup is null\n");
......@@ -261,7 +255,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
// This should be somewhere in the f1ap_cudu_ue_inst_t
/*int macrlc_instance = 0;
rnti_t rnti = f1ap_get_rnti_by_du_id(&f1ap_du_inst[0], du_ue_f1ap_id);
rnti_t rnti = f1ap_get_rnti_by_du_id(false, instance, du_ue_f1ap_id);
struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[macrlc_instance],rnti);
*/
eNB_RRC_UE_t *ue_p = &ue_context_p->ue_context;
......@@ -358,7 +352,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
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));
f1ap_get_rnti_by_du_id(false, instance, du_ue_f1ap_id));
LTE_RRCConnectionReconfiguration_t *rrcConnectionReconfiguration = &dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration;
if (rrcConnectionReconfiguration->criticalExtensions.present == LTE_RRCConnectionReconfiguration__criticalExtensions_PR_c1) {
......@@ -617,7 +611,7 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
ie->id = F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID;
ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_ULRRCMessageTransferIEs__value_PR_GNB_CU_UE_F1AP_ID;
ie->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(&f1ap_du_inst[instance], rnti);
ie->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(false, instance, rnti);
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
/* mandatory */
/* c2. GNB_DU_UE_F1AP_ID */
......@@ -625,7 +619,7 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
ie->id = F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID;
ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_ULRRCMessageTransferIEs__value_PR_GNB_DU_UE_F1AP_ID;
ie->value.choice.GNB_DU_UE_F1AP_ID = f1ap_get_du_ue_f1ap_id(&f1ap_du_inst[instance], rnti);
ie->value.choice.GNB_DU_UE_F1AP_ID = f1ap_get_du_ue_f1ap_id(false, instance, rnti);
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
/* mandatory */
/* c3. SRBID */
......@@ -755,7 +749,8 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
return -1;
}
du_f1ap_itti_send_sctp_data_req(instance, f1ap_du_data->assoc_id, buffer, len, f1ap_du_data->default_sctp_stream_id);
ASN_STRUCT_RESET(asn_DEF_F1AP_F1AP_PDU, &pdu);
f1ap_itti_send_sctp_data_req(false, instance, buffer, len, getCxt(false, instance)->default_sctp_stream_id);
return 0;
}
......@@ -773,7 +768,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
F1AP_InitialULRRCMessageTransfer_t *out;
uint8_t *buffer=NULL;
uint32_t len=0;
int f1ap_uid = f1ap_add_ue (&f1ap_du_inst[module_idP], module_idP, CC_idP,UE_id, rntiP);
int f1ap_uid = f1ap_add_ue (false, module_idP, CC_idP,UE_id, rntiP);
if (f1ap_uid < 0 ) {
LOG_E(F1AP, "Failed to add UE \n");
......@@ -794,14 +789,15 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
ie1->id = F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID;
ie1->criticality = F1AP_Criticality_reject;
ie1->value.present = F1AP_InitialULRRCMessageTransferIEs__value_PR_GNB_DU_UE_F1AP_ID;
ie1->value.choice.GNB_DU_UE_F1AP_ID = f1ap_du_inst[module_idP].f1ap_ue[f1ap_uid].du_ue_f1ap_id;
ie1->value.choice.GNB_DU_UE_F1AP_ID = getCxt(false, module_idP)->f1ap_ue[f1ap_uid].du_ue_f1ap_id;
/* mandatory */
/* c2. NRCGI */
asn1cSequenceAdd(out->protocolIEs.list, F1AP_InitialULRRCMessageTransferIEs_t, ie2);
ie2->id = F1AP_ProtocolIE_ID_id_NRCGI;
ie2->criticality = F1AP_Criticality_reject;
ie2->value.present = F1AP_InitialULRRCMessageTransferIEs__value_PR_NRCGI;
//addnRCGI(ie2->value.choice.NRCGI, f1ap_du_data->cell[0]);
//Fixme: takes always the first cell
addnRCGI(ie2->value.choice.NRCGI, getCxt(false, module_idP)->setupReq.cell);
/* mandatory */
/* c3. C_RNTI */ // 16
asn1cSequenceAdd(out->protocolIEs.list, F1AP_InitialULRRCMessageTransferIEs_t, ie3);
......@@ -851,15 +847,11 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
RB_INSERT(rrc_ue_tree_s, &RC.rrc[module_idP]->rrc_ue_head, ue_context_p);
}
du_f1ap_itti_send_sctp_data_req(module_idP, f1ap_du_data->assoc_id, buffer, len, f1ap_du_data->default_sctp_stream_id);
f1ap_itti_send_sctp_data_req(false, module_idP, buffer, len, getCxt(false, module_idP)->default_sctp_stream_id);
return 0;
}
void init_f1ap_du_ue_inst (void) {
memset(f1ap_du_inst, 0, sizeof(f1ap_du_inst));
}
int DU_send_UL_NR_RRC_MESSAGE_TRANSFER(instance_t instance,
const f1ap_ul_rrc_message_t *msg) {
const rnti_t rnti = msg->rnti;
......@@ -887,14 +879,14 @@ int DU_send_UL_NR_RRC_MESSAGE_TRANSFER(instance_t instance,
ie1->id = F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID;
ie1->criticality = F1AP_Criticality_reject;
ie1->value.present = F1AP_ULRRCMessageTransferIEs__value_PR_GNB_CU_UE_F1AP_ID;
ie1->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(&f1ap_du_inst[instance], rnti);
ie1->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(false, instance, rnti);
/* mandatory */
/* c2. GNB_DU_UE_F1AP_ID */
asn1cSequenceAdd(out->protocolIEs.list, F1AP_ULRRCMessageTransferIEs_t, ie2);
ie2->id = F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID;
ie2->criticality = F1AP_Criticality_reject;
ie2->value.present = F1AP_ULRRCMessageTransferIEs__value_PR_GNB_DU_UE_F1AP_ID;
ie2->value.choice.GNB_DU_UE_F1AP_ID = f1ap_get_du_ue_f1ap_id(&f1ap_du_inst[instance], rnti);
ie2->value.choice.GNB_DU_UE_F1AP_ID = f1ap_get_du_ue_f1ap_id(false, instance, rnti);
/* mandatory */
/* c3. SRBID */
asn1cSequenceAdd(out->protocolIEs.list, F1AP_ULRRCMessageTransferIEs_t, ie3);
......@@ -919,7 +911,7 @@ int DU_send_UL_NR_RRC_MESSAGE_TRANSFER(instance_t instance,
return -1;
}
du_f1ap_itti_send_sctp_data_req(instance, f1ap_du_data->assoc_id, buffer, len, f1ap_du_data->default_sctp_stream_id);
f1ap_itti_send_sctp_data_req(false, instance, buffer, len, getCxt(false, instance)->default_sctp_stream_id);
return 0;
}
......@@ -958,9 +950,9 @@ int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t instance,
du_ue_f1ap_id = ie->value.choice.GNB_DU_UE_F1AP_ID;
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
f1ap_get_rnti_by_du_id(false, 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 ) {
if (f1ap_du_add_cu_ue_id(false, instance,du_ue_f1ap_id, cu_ue_f1ap_id) < 0 ) {
LOG_E(F1AP, "Failed to find the F1AP UID \n");
//return -1;
}
......@@ -1030,7 +1022,7 @@ int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t instance,
// decode RRC Container and act on the message type
AssertFatal(srb_id<3,"illegal srb_id\n");
protocol_ctxt_t ctxt;
ctxt.rnti = f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance], du_ue_f1ap_id);
ctxt.rnti = f1ap_get_rnti_by_du_id(false, instance, du_ue_f1ap_id);
ctxt.module_id = instance;
ctxt.instance = instance;
ctxt.enb_flag = 1;
......@@ -1063,7 +1055,7 @@ int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t instance,
LOG_I(F1AP,
"Logical Channel DL-CCCH (SRB0), Received RRCSetup DU_ID %lx/RNTI %x\n",
du_ue_f1ap_id,
f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance], du_ue_f1ap_id));
f1ap_get_rnti_by_du_id(false, instance, du_ue_f1ap_id));
// Get configuration
NR_RRCSetup_t *rrcSetup = dl_ccch_msg->message.choice.c1->choice.rrcSetup;
AssertFatal(rrcSetup!=NULL, "rrcSetup is null\n");
......@@ -1130,7 +1122,7 @@ int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t instance,
LOG_I(F1AP,
"Logical Channel DL-DCCH (SRB1), Received RRCReconfiguration DU_ID %lx/RNTI %x\n",
du_ue_f1ap_id,
f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance], du_ue_f1ap_id));
f1ap_get_rnti_by_du_id(false, instance, du_ue_f1ap_id));
NR_RRCReconfiguration_t *rrcReconfiguration = dl_dcch_msg->message.choice.c1->choice.rrcReconfiguration;
if (rrcReconfiguration->criticalExtensions.present == NR_RRCReconfiguration__criticalExtensions_PR_rrcReconfiguration) {
......
......@@ -38,11 +38,6 @@
#include "f1ap_du_task.h"
#include "proto_agent.h"
extern RAN_CONTEXT_t RC;
f1ap_setup_req_t *f1ap_du_data;
f1ap_cudu_inst_t f1ap_du_inst[MAX_eNB];
void du_task_send_sctp_association_req(instance_t instance, f1ap_setup_req_t *f1ap_setup_req) {
DevAssert(f1ap_setup_req != NULL);
MessageDef *message_p = NULL;
......@@ -62,9 +57,6 @@ void du_task_send_sctp_association_req(instance_t instance, f1ap_setup_req_t *f1
memcpy(&sctp_new_association_req_p->local_address,
&f1ap_setup_req->DU_f1_ip_address,
sizeof(f1ap_setup_req->DU_f1_ip_address));
// store data
f1ap_du_data = (f1ap_setup_req_t *)calloc(1, sizeof(f1ap_setup_req_t));
*f1ap_du_data = *f1ap_setup_req;
//printf("sib itti message %s\n", f1ap_setup_req_t->sib1[0]);
//printf("nr_cellid : %llx (%lld)",f1ap_setup_req->nr_cellid[0],f1ap_setup_req->nr_cellid[0]);
//du_f1ap_register_to_sctp
......@@ -84,6 +76,7 @@ void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
}
// save the assoc id
f1ap_setup_req_t *f1ap_du_data=f1ap_req(false, instance);
f1ap_du_data->assoc_id = sctp_new_association_resp->assoc_id;
f1ap_du_data->sctp_in_streams = sctp_new_association_resp->in_streams;
f1ap_du_data->sctp_out_streams = sctp_new_association_resp->out_streams;
......@@ -131,13 +124,14 @@ 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
createF1inst(false, ITTI_MSG_DESTINATION_INSTANCE(received_msg), &F1AP_SETUP_REQ(received_msg));
LOG_I(F1AP, "DU Task Received F1AP_SETUP_REQ\n");
du_task_send_sctp_association_req(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
&F1AP_SETUP_REQ(received_msg));
break;
case F1AP_GNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE:
DU_send_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
DU_send_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(ITTI_MSG_ORIGIN_INSTANCE(received_msg),
&F1AP_GNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(received_msg));
break;
......
......@@ -41,10 +41,6 @@
#include "openair2/RRC/NR/rrc_gNB_UE_context.h"
#include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
extern f1ap_setup_req_t *f1ap_du_data;
extern f1ap_cudu_inst_t f1ap_du_inst[MAX_eNB];
extern RAN_CONTEXT_t RC;
int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
uint32_t assoc_id,
uint32_t stream,
......@@ -183,7 +179,7 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
//void DU_send_UE_CONTEXT_SETUP_RESPONSE(F1AP_UEContextSetupResponse_t *UEContextSetupResponse) {
int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
F1AP_F1AP_PDU_t pdu={0};
F1AP_F1AP_PDU_t pdu= {0};
F1AP_UEContextSetupResponse_t *out;
uint8_t *buffer=NULL;
uint32_t len=0;
......@@ -225,7 +221,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
/* measGapConfig */
if (0) {
asn1cCalloc(ie3->value.choice.DUtoCURRCInformation.measGapConfig,
F1AP_MeasGapConfig_t, tmp);
F1AP_MeasGapConfig_t, tmp);
OCTET_STRING_fromBuf(tmp, "asdsa", strlen("asdsa"));
}
......@@ -233,8 +229,8 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
/* requestedP_MaxFR1 */
if (0) {
asn1cCalloc(ie3->value.choice.DUtoCURRCInformation.requestedP_MaxFR1,
OCTET_STRING_t, tmp);
OCTET_STRING_fromBuf(tmp , "asdsa", strlen("asdsa"));
OCTET_STRING_t, tmp);
OCTET_STRING_fromBuf(tmp, "asdsa", strlen("asdsa"));
}
}
......@@ -281,7 +277,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
for (int i=0; i<1; i++) {
//
asn1cSequenceAdd(ie7->value.choice.DRBs_Setup_List.list,
F1AP_DRBs_Setup_ItemIEs_t, drbs_setup_item_ies);
F1AP_DRBs_Setup_ItemIEs_t, drbs_setup_item_ies);
drbs_setup_item_ies->id = F1AP_ProtocolIE_ID_id_DRBs_Setup_Item;
drbs_setup_item_ies->criticality = F1AP_Criticality_ignore;
drbs_setup_item_ies->value.present = F1AP_SRBs_FailedToBeSetup_ItemIEs__value_PR_SRBs_FailedToBeSetup_Item;
......@@ -297,20 +293,19 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
//drbs_setup_item.lCID = 1L;
for (int j=0; j<1; j++) {
/* ADD */
/* ADD */
asn1cSequenceAdd(drbs_setup_item->dLUPTNLInformation_ToBeSetup_List.list,
F1AP_DLUPTNLInformation_ToBeSetup_Item_t, dLUPTNLInformation_ToBeSetup_Item);
F1AP_DLUPTNLInformation_ToBeSetup_Item_t, dLUPTNLInformation_ToBeSetup_Item);
dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel;
/* gTPTunnel */
asn1cCalloc(dLUPTNLInformation_ToBeSetup_Item->dLUPTNLInformation.choice.gTPTunnel,
F1AP_GTPTunnel_t, gTPTunnel);
/* transportLayerAddress */
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &gTPTunnel->transportLayerAddress);
/* gTP_TEID */
OCTET_STRING_fromBuf(&gTPTunnel->gTP_TEID, "1204",
strlen("1204"));
F1AP_GTPTunnel_t, gTPTunnel);
/* transportLayerAddress */
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &gTPTunnel->transportLayerAddress);
/* gTP_TEID */
OCTET_STRING_fromBuf(&gTPTunnel->gTP_TEID, "1204",
strlen("1204"));
} // for j
} // for i
/* mandatory */
......@@ -333,7 +328,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
/* sRBID */
srbs_failedToBeSetup_item->sRBID = 13L;
/* cause */
asn1cCalloc(srbs_failedToBeSetup_item->cause, F1AP_Cause_t ,tmp);
asn1cCalloc(srbs_failedToBeSetup_item->cause, F1AP_Cause_t,tmp);
// dummy value
tmp->present = F1AP_Cause_PR_radioNetwork;
......@@ -358,7 +353,6 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
default:
break;
} // switch
} // for i
/* */
......@@ -406,7 +400,6 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
default:
break;
} // switch
} // for i
// /* */
......@@ -418,15 +411,15 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
for (int i=0; i<1; i++) {
asn1cSequenceAdd(ie10->value.choice.SCell_FailedtoSetup_List.list,
F1AP_SCell_FailedtoSetup_ItemIEs_t, sCell_FailedtoSetup_item_ies);
F1AP_SCell_FailedtoSetup_ItemIEs_t, sCell_FailedtoSetup_item_ies);
sCell_FailedtoSetup_item_ies->id = F1AP_ProtocolIE_ID_id_SCell_FailedtoSetup_Item;
sCell_FailedtoSetup_item_ies->criticality = F1AP_Criticality_ignore;
sCell_FailedtoSetup_item_ies->value.present = F1AP_SCell_FailedtoSetup_ItemIEs__value_PR_SCell_FailedtoSetup_Item;
/* 10.1 DRBs_Setup_Item */
F1AP_SCell_FailedtoSetup_Item_t*sCell_FailedtoSetup_item=
F1AP_SCell_FailedtoSetup_Item_t *sCell_FailedtoSetup_item=
&sCell_FailedtoSetup_item_ies->value.choice.SCell_FailedtoSetup_Item;
/* sCell_ID */
addnRCGI(sCell_FailedtoSetup_item->sCell_ID,f1ap_du_data->cell+i);
addnRCGI(sCell_FailedtoSetup_item->sCell_ID,f1ap_req(false, instance)->cell+i);
/* cause */
asn1cCalloc(sCell_FailedtoSetup_item->cause, F1AP_Cause_t, tmp);
// dummy value
......@@ -453,10 +446,8 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
default:
break;
} // switch
} // for i
/* Optional */
/* c11. InactivityMonitoringResponse */
if (0) {
......@@ -475,13 +466,13 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
ie12->criticality = F1AP_Criticality_ignore;
ie12->value.present = F1AP_UEContextSetupResponseIEs__value_PR_CriticalityDiagnostics;
asn1cCallocOne(ie12->value.choice.CriticalityDiagnostics.procedureCode,
F1AP_ProcedureCode_t, F1AP_ProcedureCode_id_UEContextSetup);
F1AP_ProcedureCode_t, F1AP_ProcedureCode_id_UEContextSetup);
asn1cCallocOne(ie12->value.choice.CriticalityDiagnostics.triggeringMessage,
F1AP_TriggeringMessage_t, F1AP_TriggeringMessage_initiating_message);
F1AP_TriggeringMessage_t, F1AP_TriggeringMessage_initiating_message);
asn1cCallocOne(ie12->value.choice.CriticalityDiagnostics.procedureCriticality,
F1AP_Criticality_t, F1AP_Criticality_reject);
F1AP_Criticality_t, F1AP_Criticality_reject);
asn1cCallocOne(ie12->value.choice.CriticalityDiagnostics.transactionID,
F1AP_TransactionID_t, 0);
F1AP_TransactionID_t, 0);
}
/* encode */
......@@ -489,7 +480,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
LOG_E(F1AP, "Failed to encode F1 UE CONTEXT SETUP RESPONSE\n");
return -1;
}
return 0;
}
......@@ -518,15 +509,14 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
ie1->id = F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID;
ie1->criticality = F1AP_Criticality_reject;
ie1->value.present = F1AP_UEContextReleaseRequestIEs__value_PR_GNB_CU_UE_F1AP_ID;
ie1->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(&f1ap_du_inst[instance], req->rnti);
ie1->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(false, instance, req->rnti);
/* mandatory */
/* c2. GNB_DU_UE_F1AP_ID */
asn1cSequenceAdd(out->protocolIEs.list, F1AP_UEContextReleaseRequestIEs_t, ie2);
ie2->id = F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID;
ie2->criticality = F1AP_Criticality_reject;
ie2->value.present = F1AP_UEContextReleaseRequestIEs__value_PR_GNB_DU_UE_F1AP_ID;
ie2->value.choice.GNB_DU_UE_F1AP_ID = f1ap_get_du_ue_f1ap_id(&f1ap_du_inst[instance], req->rnti);
ie2->value.choice.GNB_DU_UE_F1AP_ID = f1ap_get_du_ue_f1ap_id(false, instance, req->rnti);
/* mandatory */
/* c3. Cause */
asn1cSequenceAdd(out->protocolIEs.list, F1AP_UEContextReleaseRequestIEs_t, ie3);
......@@ -567,11 +557,10 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
return -1;
}
du_f1ap_itti_send_sctp_data_req(instance,
f1ap_du_data->assoc_id,
buffer,
len,
f1ap_du_data->default_sctp_stream_id);
f1ap_itti_send_sctp_data_req(false, instance,
buffer,
len,
getCxt(false, instance)->default_sctp_stream_id);
return 0;
}
......@@ -588,14 +577,14 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
/* GNB_CU_UE_F1AP_ID */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID, true);
ctxt.rnti = f1ap_get_rnti_by_cu_id(&f1ap_du_inst[instance], ie->value.choice.GNB_CU_UE_F1AP_ID);
ctxt.rnti = f1ap_get_rnti_by_cu_id(false, instance, ie->value.choice.GNB_CU_UE_F1AP_ID);
ctxt.module_id = instance;
ctxt.instance = instance;
ctxt.enb_flag = 1;
/* GNB_DU_UE_F1AP_ID */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true);
const rnti_t rnti = f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance],
const rnti_t rnti = f1ap_get_rnti_by_du_id(false, instance,
ie->value.choice.GNB_DU_UE_F1AP_ID);
AssertFatal(ctxt.rnti == rnti,
"RNTI obtained through DU ID (%x) is different from CU ID (%x)\n",
......@@ -720,7 +709,7 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
f1ap_ue_context_release_cplt_t *cplt) {
F1AP_F1AP_PDU_t pdu={0};
F1AP_F1AP_PDU_t pdu= {0};
F1AP_UEContextReleaseComplete_t *out;
/* Create */
/* 0. Message Type */
......@@ -736,14 +725,14 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
ie1->id = F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID;
ie1->criticality = F1AP_Criticality_reject;
ie1->value.present = F1AP_UEContextReleaseCompleteIEs__value_PR_GNB_CU_UE_F1AP_ID;
ie1->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(&f1ap_du_inst[instance], cplt->rnti);
ie1->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(false, instance, cplt->rnti);
/* mandatory */
/* c2. GNB_DU_UE_F1AP_ID */
asn1cSequenceAdd(out->protocolIEs.list,F1AP_UEContextReleaseCompleteIEs_t, ie2);
ie2->id = F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID;
ie2->criticality = F1AP_Criticality_reject;
ie2->value.present = F1AP_UEContextReleaseCompleteIEs__value_PR_GNB_DU_UE_F1AP_ID;
ie2->value.choice.GNB_DU_UE_F1AP_ID = f1ap_get_du_ue_f1ap_id(&f1ap_du_inst[instance], cplt->rnti);
ie2->value.choice.GNB_DU_UE_F1AP_ID = f1ap_get_du_ue_f1ap_id(false, instance, cplt->rnti);
/* optional -> currently not used */
/* c3. CriticalityDiagnostics */
//if (0) {
......@@ -801,12 +790,11 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
return -1;
}
du_f1ap_itti_send_sctp_data_req(instance,
f1ap_du_data->assoc_id,
buffer,
len,
f1ap_du_data->default_sctp_stream_id);
f1ap_remove_ue(&f1ap_du_inst[instance], cplt->rnti);
f1ap_itti_send_sctp_data_req(false, instance,
buffer,
len,
getCxt(false, instance)->default_sctp_stream_id);
f1ap_remove_ue(false, instance, cplt->rnti);
return 0;
}
......@@ -1011,7 +999,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
/* 8.1 SCell_ToBeSetup_Item */
F1AP_SCell_FailedtoSetupMod_Item_t *scell_failedtoSetupMod_item=&scell_failedtoSetupMod_item_ies->value.choice.SCell_FailedtoSetupMod_Item;
/* - sCell_ID */
addnRCGI(scell_failedtoSetupMod_item->sCell_ID, &f1ap_du_data->cell[i]);
addnRCGI(scell_failedtoSetupMod_item->sCell_ID, &f1ap_req(false, instance)->cell[i]);
asn1cCalloc(scell_failedtoSetupMod_item->cause, F1AP_Cause_t, tmp);
tmp->present = F1AP_Cause_PR_radioNetwork;
tmp->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnb_du_ue_f1ap_id;
......@@ -1096,7 +1084,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
return -1;
}
//du_f1ap_itti_send_sctp_data_req(instance, f1ap_setup_req->assoc_id, buffer, len, 0);
//f1ap_itti_send_sctp_data_req(false, instance, buffer, len, 0);
return 0;
}
......
......@@ -40,8 +40,6 @@
#include "f1ap_cu_ue_context_management.h"
#include "f1ap_du_ue_context_management.h"
extern f1ap_setup_req_t *f1ap_du_data_from_du;
/* Handlers matrix. Only f1 related procedure present here */
f1ap_message_decoded_callback f1ap_messages_callback[][3] = {
......
......@@ -22,26 +22,13 @@
#include "f1ap_common.h"
#include "f1ap_itti_messaging.h"
void cu_f1ap_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint8_t *buffer,
uint32_t buffer_length, uint16_t stream) {
void f1ap_itti_send_sctp_data_req(bool isCu, instance_t instance, uint8_t *buffer,
uint32_t buffer_length, uint16_t stream) {
MessageDef *message_p;
sctp_data_req_t *sctp_data_req;
message_p = itti_alloc_new_message(TASK_CU_F1, 0, SCTP_DATA_REQ);
message_p = itti_alloc_new_message(isCu?TASK_CU_F1:TASK_DU_F1, 0, SCTP_DATA_REQ);
sctp_data_req = &message_p->ittiMsg.sctp_data_req;
sctp_data_req->assoc_id = assoc_id;
sctp_data_req->buffer = buffer;
sctp_data_req->buffer_length = buffer_length;
sctp_data_req->stream = stream;
itti_send_msg_to_task(TASK_SCTP, instance, message_p);
}
void du_f1ap_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint8_t *buffer,
uint32_t buffer_length, uint16_t stream) {
MessageDef *message_p;
sctp_data_req_t *sctp_data_req;
message_p = itti_alloc_new_message(TASK_DU_F1, 0, SCTP_DATA_REQ);
sctp_data_req = &message_p->ittiMsg.sctp_data_req;
sctp_data_req->assoc_id = assoc_id;
sctp_data_req->assoc_id = f1ap_assoc_id(isCu,instance);
sctp_data_req->buffer = buffer;
sctp_data_req->buffer_length = buffer_length;
sctp_data_req->stream = stream;
......@@ -49,12 +36,12 @@ void du_f1ap_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint
itti_send_msg_to_task(TASK_SCTP, instance, message_p);
}
void f1ap_itti_send_sctp_close_association(instance_t instance, int32_t assoc_id) {
void f1ap_itti_send_sctp_close_association(bool isCu, instance_t instance) {
MessageDef *message_p = NULL;
sctp_close_association_t *sctp_close_association_p = NULL;
message_p = itti_alloc_new_message(TASK_S1AP, 0, SCTP_CLOSE_ASSOCIATION);
sctp_close_association_p = &message_p->ittiMsg.sctp_close_association;
sctp_close_association_p->assoc_id = assoc_id;
sctp_close_association_p->assoc_id = f1ap_assoc_id(isCu,instance);
itti_send_msg_to_task(TASK_SCTP, instance, message_p);
}
......@@ -22,14 +22,10 @@
#ifndef F1AP_ITTI_MESSAGING_H_
#define F1AP_ITTI_MESSAGING_H_
void cu_f1ap_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint8_t *buffer,
uint32_t buffer_length, uint16_t stream);
void f1ap_itti_send_sctp_data_req(bool isCu,instance_t instance, uint8_t *buffer,
uint32_t buffer_length, uint16_t stream);
void du_f1ap_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint8_t *buffer,
uint32_t buffer_length, uint16_t stream);
void f1ap_eNB_itti_send_sctp_close_association(instance_t instance,
int32_t assoc_id);
void f1ap_eNB_itti_send_sctp_close_association(bool isCu,instance_t instance);
#endif /* F1AP_ITTI_MESSAGING_H_ */
......@@ -1646,6 +1646,7 @@ int RCconfig_NR_DU_F1(MessageDef *msg_p, uint32_t i) {
AssertFatal(GNBParamList.paramarray[i][GNB_GNB_ID_IDX].uptr != NULL,
"gNB id %u is not defined in configuration file\n",i);
F1AP_SETUP_REQ (msg_p).num_cells_available = 0;
F1AP_SETUP_REQ (msg_p).cell_type=CELL_MACRO_GNB;
for (k=0; k <num_gnbs ; k++) {
if (strcmp(GNBSParams[GNB_ACTIVE_GNBS_IDX].strlistptr[k], *(GNBParamList.paramarray[i][GNB_GNB_NAME_IDX].strptr)) == 0) {
......
......@@ -55,7 +55,6 @@ static uint64_t pdcp_optmask;
ngran_node_t node_type = ngran_gNB;
uint8_t first_dcch = 0;
uint8_t proto_agent_flag = 0;
/****************************************************************************/
/* rlc_data_req queue - begin */
......
......@@ -183,7 +183,6 @@ eth_params_t *eth_params;
double cpuf;
int oaisim_flag=0;
uint8_t proto_agent_flag = 0;
/* forward declarations */
......
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