Commit 0b816634 authored by Raymond Knopp's avatar Raymond Knopp

Merge branch 'feature-127-protocol-split' of...

Merge branch 'feature-127-protocol-split' of https://gitlab.eurecom.fr/oai/openairinterface5g into feature-127-protocol-split

Conflicts:
	openair2/F1AP/f1ap_du_rrc_message_transfer.c
parents de205def d9661177
......@@ -211,6 +211,7 @@ typedef struct f1ap_dl_rrc_message_s {
uint32_t gNB_CU_ue_id;
uint32_t gNB_DU_ue_id;
uint32_t old_gNB_DU_ue_id;
uint16_t rnti;
uint8_t srb_id;
uint8_t execute_duplication;
uint8_t *rrc_container;
......
......@@ -209,9 +209,160 @@ uint8_t F1AP_get_next_transaction_identifier(module_id_t enb_mod_idP, module_id_
return transaction_identifier[enb_mod_idP+cu_mod_idP];
}
uint8_t F1AP_get_UE_identifier(module_id_t enb_mod_idP, int CC_idP, int UE_id) {
static uint8_t UE_identifier[NUMBER_OF_eNB_MAX];
module_id_t F1AP_get_UE_identifier(module_id_t enb_mod_idP, int CC_idP, int UE_id) {
static module_id_t UE_identifier[NUMBER_OF_eNB_MAX];
UE_identifier[enb_mod_idP+CC_idP+UE_id] = (UE_identifier[enb_mod_idP+CC_idP+UE_id] + 1) % F1AP_UE_IDENTIFIER_NUMBER;
//LOG_T(F1AP,"generated xid is %d\n",transaction_identifier[enb_mod_idP+du_mod_idP]);
return UE_identifier[enb_mod_idP+CC_idP+UE_id];
}
int f1ap_add_ue(f1ap_cudu_ue_inst_t *f1_ue_inst,
module_id_t module_idP,
int CC_idP,
int UE_id,
rnti_t rntiP){
int i;
for (i=0; i < MAX_MOBILES_PER_ENB; i++){
if (f1_ue_inst->rnti[i] == rntiP) {
f1_ue_inst->f1ap_uid[i] = i;
f1_ue_inst->mac_uid[i] = UE_id;
LOG_I(F1AP, "Updating the index of UE with RNTI %x and du_ue_f1ap_id %d\n", f1_ue_inst->rnti[i], f1_ue_inst->du_ue_f1ap_id[i]);
return i;
}
}
for (i=0; i < MAX_MOBILES_PER_ENB ; i++){
if (f1_ue_inst->rnti[i] == 0 ){
f1_ue_inst->rnti[i]=rntiP;
f1_ue_inst->f1ap_uid[i]=i;
f1_ue_inst->mac_uid[i]=UE_id;
f1_ue_inst->du_ue_f1ap_id[i] = F1AP_get_UE_identifier(module_idP, CC_idP, i);
f1_ue_inst->cu_ue_f1ap_id[i] = F1AP_get_UE_identifier(module_idP, CC_idP, i);
f1_ue_inst->num_ues++;
LOG_I(F1AP, "Adding a new UE with RNTI %x and cu/du ue_f1ap_id %d\n", f1_ue_inst->rnti[i], f1_ue_inst->du_ue_f1ap_id[i]);
return i;
}
}
return -1;
}
int f1ap_remove_ue(f1ap_cudu_ue_inst_t *f1_ue_inst,
rnti_t rntiP){
int i;
for (i=0; i < MAX_MOBILES_PER_ENB; i++){
if (f1_ue_inst->rnti[i] == rntiP) {
f1_ue_inst->rnti[i] = 0;
break;
}
}
return 0 ;
}
int f1ap_get_du_ue_f1ap_id (f1ap_cudu_ue_inst_t *f1_ue_inst,
rnti_t rntiP){
int i;
for (i=0; i < MAX_MOBILES_PER_ENB; i++){
if (f1_ue_inst->rnti[i] == rntiP) {
return f1_ue_inst->du_ue_f1ap_id[i];
}
}
return -1;
}
int f1ap_get_cu_ue_f1ap_id (f1ap_cudu_ue_inst_t *f1_ue_inst,
rnti_t rntiP){
int i;
for (i=0; i < MAX_MOBILES_PER_ENB; i++){
if (f1_ue_inst->rnti[i] == rntiP) {
return f1_ue_inst->cu_ue_f1ap_id[i];
}
}
return -1;
}
int f1ap_get_rnti_by_du_id(f1ap_cudu_ue_inst_t *f1_ue_inst,
module_id_t du_ue_f1ap_id ){
int i;
for (i=0; i < MAX_MOBILES_PER_ENB; i++){
if (f1_ue_inst->du_ue_f1ap_id[i] == du_ue_f1ap_id) {
return f1_ue_inst->rnti[i];
}
}
return -1;
}
int f1ap_get_rnti_by_cu_id(f1ap_cudu_ue_inst_t *f1_ue_inst,
module_id_t cu_ue_f1ap_id ){
int i;
for (i=0; i < MAX_MOBILES_PER_ENB; i++){
if (f1_ue_inst->cu_ue_f1ap_id[i] == cu_ue_f1ap_id) {
return f1_ue_inst->rnti[i];
}
}
return -1;
}
int f1ap_get_du_uid(f1ap_cudu_ue_inst_t *f1_ue_inst,
module_id_t du_ue_f1ap_id ){
int i;
for (i=0; i < MAX_MOBILES_PER_ENB; i++){
if (f1_ue_inst->du_ue_f1ap_id[i] == du_ue_f1ap_id) {
return i;
}
}
return -1;
}
int f1ap_get_cu_uid(f1ap_cudu_ue_inst_t *f1_ue_inst,
module_id_t cu_ue_f1ap_id ){
int i;
for (i=0; i < MAX_MOBILES_PER_ENB; i++){
if (f1_ue_inst->cu_ue_f1ap_id[i] == cu_ue_f1ap_id) {
return i;
}
}
return -1;
}
int f1ap_get_uid_by_rnti(f1ap_cudu_ue_inst_t *f1_ue_inst,
rnti_t rntiP ){
int i;
for (i=0; i < MAX_MOBILES_PER_ENB; i++){
if (f1_ue_inst->rnti[i] == rntiP) {
return i;
}
}
return -1;
}
int f1ap_du_add_cu_ue_id(f1ap_cudu_ue_inst_t *f1_ue_inst,
module_id_t du_ue_f1ap_id,
module_id_t cu_ue_f1ap_id){
module_id_t f1ap_uid = f1ap_get_du_uid(f1_ue_inst,du_ue_f1ap_id);
if (f1ap_uid < 0 )
return -1 ;
f1_ue_inst->cu_ue_f1ap_id[f1ap_uid]=cu_ue_f1ap_id;
LOG_I(F1AP, "Adding cu_ue_f1ap_id %d for UE with RNTI %x \n", cu_ue_f1ap_id, f1_ue_inst->rnti[f1ap_uid]);
return 0 ;
}
int f1ap_cu_add_du_ue_id(f1ap_cudu_ue_inst_t *f1_ue_inst,
module_id_t cu_ue_f1ap_id,
module_id_t du_ue_f1ap_id){
module_id_t f1ap_uid = f1ap_get_cu_uid(f1_ue_inst,cu_ue_f1ap_id);
if (f1ap_uid < 0 )
return -1 ;
f1_ue_inst->du_ue_f1ap_id[f1ap_uid]=du_ue_f1ap_id;
LOG_I(F1AP, "Adding du_ue_f1ap_id %d for UE with RNTI %x \n", du_ue_f1ap_id, f1_ue_inst->rnti[f1ap_uid]);
return 0 ;
}
\ No newline at end of file
......@@ -425,8 +425,67 @@ typedef int (*f1ap_message_decoded_callback)(
F1AP_F1AP_PDU_t *message_p
);
// instance and module_id are assumed to be the same
typedef struct f1ap_cudu_ue_inst_s {
// used for eNB stats generation
rnti_t rnti[MAX_MOBILES_PER_ENB];
module_id_t f1ap_uid[MAX_MOBILES_PER_ENB];
module_id_t mac_uid[MAX_MOBILES_PER_ENB];
module_id_t du_ue_f1ap_id[MAX_MOBILES_PER_ENB];
module_id_t cu_ue_f1ap_id[MAX_MOBILES_PER_ENB];
uint16_t num_ues;
} f1ap_cudu_ue_inst_t;
uint8_t F1AP_get_next_transaction_identifier(module_id_t enb_mod_idP, module_id_t cu_mod_idP);
uint8_t F1AP_get_UE_identifier(module_id_t enb_mod_idP, int CC_idP, int UE_id);
module_id_t F1AP_get_UE_identifier(module_id_t enb_mod_idP, int CC_idP, int UE_id);
int f1ap_add_ue(f1ap_cudu_ue_inst_t *f1_ue_inst,
module_id_t module_idP,
int CC_idP,
int UE_id,
rnti_t rntiP);
int f1ap_remove_ue(f1ap_cudu_ue_inst_t *f1_ue_inst,
rnti_t rntiP);
int f1ap_get_du_ue_f1ap_id (f1ap_cudu_ue_inst_t *f1_ue_inst,
rnti_t rntiP);
int f1ap_get_cu_ue_f1ap_id (f1ap_cudu_ue_inst_t *f1_ue_inst,
rnti_t rntiP);
//rnti
int f1ap_get_rnti_by_du_id(f1ap_cudu_ue_inst_t *f1_ue_inst,
module_id_t du_ue_f1ap_id );
int f1ap_get_rnti_by_cu_id(f1ap_cudu_ue_inst_t *f1_ue_inst,
module_id_t cu_ue_f1ap_id );
int f1ap_get_du_uid(f1ap_cudu_ue_inst_t *f1_ue_inst,
module_id_t du_ue_f1ap_id );
int f1ap_get_cu_uid(f1ap_cudu_ue_inst_t *f1_ue_inst,
module_id_t cu_ue_f1ap_id );
int f1ap_get_uid_by_rnti(f1ap_cudu_ue_inst_t *f1_ue_inst,
rnti_t rntiP );
int f1ap_du_add_cu_ue_id(f1ap_cudu_ue_inst_t *f1_ue_inst,
module_id_t du_ue_f1ap_id,
module_id_t cu_ue_f1ap_id);
int f1ap_cu_add_du_ue_id(f1ap_cudu_ue_inst_t *f1_ue_inst,
module_id_t cu_ue_f1ap_id,
module_id_t du_ue_f1ap_id);
#endif /* F1AP_COMMON_H_ */
......@@ -84,7 +84,7 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu)
{
printf("CU_handle_F1_SETUP_REQUEST\n");
LOG_D(CU_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);
printf("F1AP_SETUP_REQ(message_p).gNB_DU_id %lu \n", 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);
/* gNB_DU_name */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_F1SetupRequestIEs_t, ie, container,
......@@ -122,13 +122,13 @@ 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';
printf ("F1AP_SETUP_REQ(message_p).gNB_DU_name %s \n", F1AP_SETUP_REQ(message_p).gNB_DU_name);
LOG_D(CU_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;
printf ("F1AP_SETUP_REQ(message_p).num_cells_available %d \n", F1AP_SETUP_REQ(message_p).num_cells_available);
LOG_D(CU_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 +139,7 @@ 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]);
printf ("F1AP_SETUP_REQ(message_p).tac[%d] %d \n", i, 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]);
/* - nRCGI */
TBCD_TO_MCC_MNC(&(served_celles_item_p->served_Cell_Information.nRCGI.pLMN_Identity), F1AP_SETUP_REQ(message_p).mcc[i],
......@@ -150,11 +150,11 @@ 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]);
printf("[SCTP %d] Received nRCGI: MCC %d, MNC %d, CELL_ID %d\n", assoc_id,
LOG_D(CU_F1AP, "[SCTP %d] Received nRCGI: MCC %d, MNC %d, CELL_ID %d\n", assoc_id,
F1AP_SETUP_REQ(message_p).mcc[i],
F1AP_SETUP_REQ(message_p).mnc[i],
F1AP_SETUP_REQ(message_p).nr_cellid[i]);
printf("nr_cellId : %x %x %x %x %x\n",
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],
......@@ -162,7 +162,7 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
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;
printf ("F1AP_SETUP_REQ(message_p).nr_pci[%d] %d \n", i, F1AP_SETUP_REQ(message_p).nr_pci[i]);
LOG_D(CU_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 +172,7 @@ 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;
printf ("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(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]);
/* 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 +181,7 @@ 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;
printf ("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(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]);
}
......@@ -294,7 +294,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;
printf("num_cells_to_activate = %d \n", num_cells_to_activate);
LOG_D(CU_F1AP, "num_cells_to_activate = %d \n", num_cells_to_activate);
for (i=0;
i<num_cells_to_activate;
i++) {
......@@ -335,13 +335,13 @@ 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));
printf("SI %d: ");
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");
LOG_D(CU_F1AP, "SI %d: ");
for (int n=0;n<f1ap_setup_resp->SI_container_length[i][0];n++) LOG_D(CU_F1AP, "%2x ",f1ap_setup_resp->SI_container[i][0][n]);
LOG_D(CU_F1AP, "\n");
OCTET_STRING_fromBuf(&gNB_CUSystemInformation->sImessage,
f1ap_setup_resp->SI_container[i][0], f1ap_setup_resp->SI_container_length[i][0]);
printf("f1ap_setup_resp->SI_container_length = %d \n" , f1ap_setup_resp->SI_container_length[0][0]);
LOG_D(CU_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;
......@@ -362,24 +362,17 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
/* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
printf("Failed to encode F1 setup request\n");
LOG_E(CU_F1AP, "Failed to encode F1 setup request\n");
return -1;
}
// printf("\n");
cu_f1ap_itti_send_sctp_data_req(instance, f1ap_du_data_from_du->assoc_id, buffer, len, 0);
/* decode */
// if (f1ap_decode_pdu(&pdu, buffer, len) > 0) {
// printf("Failed to decode F1 setup request\n");
// }
//printf("F1 setup response present = %d\n", out->value.present);
//f1ap_send_sctp_data_req(instance_p->instance, f1ap_mme_data_p->assoc_id, buffer, len, 0);
return 0;
}
int CU_send_F1_SETUP_FAILURE(instance_t instance) {
printf("CU_send_F1_SETUP_FAILURE\n");
LOG_D(CU_F1AP, "CU_send_F1_SETUP_FAILURE\n");
module_id_t enb_mod_idP;
module_id_t cu_mod_idP;
......@@ -454,7 +447,7 @@ int CU_send_F1_SETUP_FAILURE(instance_t instance) {
/* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
printf("Failed to encode F1 setup request\n");
LOG_E(CU_F1AP, "Failed to encode F1 setup request\n");
return -1;
}
......@@ -858,7 +851,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) {
printf("Failed to encode F1 setup request\n");
LOG_E(CU_F1AP, "Failed to encode F1 setup request\n");
return -1;
}
......
......@@ -44,10 +44,15 @@
// a compile error
#undef C_RNTI
// 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;
f1ap_cudu_ue_inst_t f1ap_cu_ue[MAX_eNB];
/*
Initial UL RRC Message Transfer
*/
......@@ -59,7 +64,7 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu) {
printf("CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER\n");
LOG_D(CU_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
......@@ -90,7 +95,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;
printf("du_ue_f1ap_id %lu \n", du_ue_f1ap_id);
LOG_D(CU_F1AP, "du_ue_f1ap_id %lu \n", du_ue_f1ap_id);
/* NRCGI
* TODO: process NRCGI
......@@ -117,9 +122,9 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
ccch_sdu_len = ie->value.choice.RRCContainer.size;
memcpy(RRC_MAC_CCCH_DATA_IND (message_p).sdu, ie->value.choice.RRCContainer.buf,
ccch_sdu_len);
printf ("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_D(CU_F1AP, "RRCContainer(CCCH) :");
for (int i=0;i<ie->value.choice.RRCContainer.size;i++) LOG_D(CU_F1AP, "%2x ",RRC_MAC_CCCH_DATA_IND (message_p).sdu[i]);
LOG_D(CU_F1AP, "\n");
// Find instance from nr_cellid
int rrc_inst = -1;
for (int i=0;i<RC.nb_inst;i++) {
......@@ -132,6 +137,14 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
}
AssertFatal(rrc_inst>=0,"couldn't find an RRC instance for nr_cell %ll\n",nr_cellid);
int f1ap_uid = f1ap_add_ue(&f1ap_cu_ue[rrc_inst], rrc_inst, CC_id, 0, rnti);
if (f1ap_uid < 0 ) {
LOG_E(CU_F1AP, "Failed to add UE \n");
return -1;
}
f1ap_cu_ue[rrc_inst].du_ue_f1ap_id[f1ap_uid] = du_ue_f1ap_id;
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;
......@@ -141,32 +154,6 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
itti_send_msg_to_task (TASK_RRC_ENB, instance, message_p);
// OR creat the ctxt and srb_info struct required by rrc_eNB_decode_ccch
/*
PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt,
instance, // to fix
ENB_FLAG_YES,
rnti,
0, // frame
0); // slot
CC_id = RRC_MAC_CCCH_DATA_IND(msg_p).CC_id;
srb_info_p = &RC.rrc[instance]->carrier[CC_id].Srb0;
if (ccch_sdu_len >= RRC_BUFFER_SIZE_MAX) {
LOG_E(RRC, "CCCH message has size %d > %d\n",ccch_sdu_len,RRC_BUFFER_SIZE_MAX);
break;
}
memcpy(srb_info_p->Rx_buffer.Payload,
ccch_sdu,
ccch_sdu_len);
srb_info->Rx_buffer.payload_size = ccch_sdu_len;
rrc_eNB_decode_ccch(&ctxt, srb_info, CC_id);
*/
// if size > 0
// CU_send_DL_RRC_MESSAGE_TRANSFER(C.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.Payload, RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size)
return 0;
}
......@@ -204,8 +191,11 @@ int CU_send_DL_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_DLRRCMessageTransferIEs__value_PR_GNB_CU_UE_F1AP_ID;
ie->value.choice.GNB_CU_UE_F1AP_ID = f1ap_dl_rrc->gNB_CU_ue_id;
ie->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(&f1ap_cu_ue[instance],f1ap_dl_rrc->rnti);
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
LOG_I(CU_F1AP, "Setting GNB_CU_UE_F1AP_ID %d associated with UE RNTI %x (instance %d)\n",
ie->value.choice.GNB_CU_UE_F1AP_ID, f1ap_dl_rrc->rnti, instance);
/* mandatory */
/* c2. GNB_DU_UE_F1AP_ID */
......@@ -213,8 +203,9 @@ int CU_send_DL_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_DLRRCMessageTransferIEs__value_PR_GNB_DU_UE_F1AP_ID;
ie->value.choice.GNB_DU_UE_F1AP_ID = du_ue_f1ap_id; // TODO: f1ap_dl_rrc->gNB_DU_ue_id
ie->value.choice.GNB_DU_UE_F1AP_ID = f1ap_get_du_ue_f1ap_id(&f1ap_cu_ue[instance],f1ap_dl_rrc->rnti); //f1ap_dl_rrc->gNB_DU_ue_id; // TODO: f1ap_dl_rrc->gNB_DU_ue_id
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
LOG_I(CU_F1AP, "GNB_DU_UE_F1AP_ID %d associated with UE RNTI %x \n", ie->value.choice.GNB_DU_UE_F1AP_ID, f1ap_dl_rrc->rnti);
/* optional */
/* c3. oldgNB_DU_UE_F1AP_ID */
......@@ -276,22 +267,12 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
/* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
printf("Failed to encode F1 setup request\n");
LOG_E(CU_F1AP, "Failed to encode F1 setup request\n");
return -1;
}
#ifdef F1AP_TEST
printf("\n");
/* decode */
if (f1ap_decode_pdu(&pdu, buffer, len) > 0) {
printf("Failed to decode F1 setup request\n");
return -1;
}
#endif
cu_f1ap_itti_send_sctp_data_req(instance, f1ap_assoc_id, buffer, len, 0);
return 0;
}
......@@ -304,7 +285,7 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu) {
printf("CU_handle_UL_RRC_MESSAGE_TRANSFER \n");
LOG_D(CU_F1AP, "CU_handle_UL_RRC_MESSAGE_TRANSFER \n");
MessageDef *message_p;
F1AP_ULRRCMessageTransfer_t *container;
......@@ -336,14 +317,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;
printf("cu_ue_f1ap_id %lu \n", 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_ue[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;
printf("du_ue_f1ap_id %lu \n", 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_ue[instance],du_ue_f1ap_id));
/* mandatory */
......@@ -351,7 +332,7 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_ULRRCMessageTransferIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_SRBID, true);
srb_id = ie->value.choice.SRBID;
printf("srb_id %lu \n", srb_id);
LOG_D(CU_F1AP, "srb_id %lu \n", srb_id);
// issue in here
......@@ -366,8 +347,9 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
ccch_sdu_len = ie->value.choice.RRCContainer.size;
memcpy(RRC_MAC_CCCH_DATA_IND (message_p).sdu, ie->value.choice.RRCContainer.buf,
ccch_sdu_len);
printf ("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_D(CU_F1AP, "RRCContainer(CCCH) :");
for (int i=0;i<ie->value.choice.RRCContainer.size;i++) LOG_D(CU_F1AP, "%2x ",RRC_MAC_CCCH_DATA_IND (message_p).sdu[i]);
LOG_D(CU_F1AP, "\n");
return 0;
}
......@@ -120,25 +120,25 @@ void *F1AP_CU_task(void *arg) {
switch (ITTI_MSG_ID(received_msg)) {
case SCTP_NEW_ASSOCIATION_IND:
LOG_I(CU_F1AP, "SCTP_NEW_ASSOCIATION_IND for instance %d\n",ITTI_MESSAGE_GET_INSTANCE(received_msg));
LOG_I(CU_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, "SCTP_NEW_ASSOCIATION_RESP for instance %d\n",ITTI_MESSAGE_GET_INSTANCE(received_msg));
LOG_I(CU_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, "SCTP_DATA_IND for Instance %d\n",ITTI_MESSAGE_GET_INSTANCE(received_msg));
LOG_I(CU_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_W(CU_F1AP, "F1AP_SETUP_RESP\n");
LOG_I(CU_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),
......@@ -146,7 +146,7 @@ void *F1AP_CU_task(void *arg) {
break;
case F1AP_DL_RRC_MESSAGE: // from rrc
LOG_W(CU_F1AP, "F1AP_DL_RRC_MESSAGE\n");
LOG_I(CU_F1AP, "CU Task Received F1AP_DL_RRC_MESSAGE\n");
// CU_send_f1setup_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg),
// &F1AP_SETUP_RESP(received_msg));
CU_send_DL_RRC_MESSAGE_TRANSFER(ITTI_MESSAGE_GET_INSTANCE(received_msg),
......
......@@ -356,18 +356,10 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance) {
/* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
printf("Failed to encode F1 setup request\n");
LOG_E(CU_F1AP, "Failed to encode F1 setup request\n");
return -1;
}
printf("\n");
/* decode */
if (f1ap_decode_pdu(&pdu, buffer, len) > 0) {
printf("Failed to decode F1 setup request\n");
return -1;
}
//AssertFatal(1==0,"Not implemented yet\n");
return 0;
}
......@@ -869,15 +861,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) {
/* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
printf("Failed to encode F1 setup request\n");
return -1;
}
printf("\n");
/* decode */
if (f1ap_decode_pdu(&pdu, buffer, len) > 0) {
printf("Failed to decode F1 setup request\n");
LOG_E(CU_F1AP, "Failed to encode F1 setup request\n");
return -1;
}
......
......@@ -33,33 +33,35 @@
#include "f1ap_common.h"
#include "f1ap_decoder.h"
int asn1_decoder_xer_print = 1;
static int f1ap_decode_initiating_message(F1AP_F1AP_PDU_t *pdu)
{
MessageDef *message_p;
MessagesIds message_id;
asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} };
//MessageDef *message_p;
//MessagesIds message_id;
//asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} };
DevAssert(pdu != NULL);
switch(pdu->choice.initiatingMessage->procedureCode) {
case F1AP_ProcedureCode_id_F1Setup:
res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
printf("f1ap_eNB_decode_initiating_message!\n");
//res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
LOG_I(F1AP, "f1ap_eNB_decode_initiating_message!\n");
break;
case F1AP_ProcedureCode_id_InitialULRRCMessageTransfer:
res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
printf("f1ap_eNB_decode_initiating_message!\n");
//res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
LOG_I(F1AP, "f1ap_eNB_decode_initiating_message!\n");
break;
case F1AP_ProcedureCode_id_DLRRCMessageTransfer:
res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
printf("f1ap_eNB_decode_initiating_message!\n");
//res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
LOG_I(F1AP, "f1ap_eNB_decode_initiating_message!\n");
break;
case F1AP_ProcedureCode_id_ULRRCMessageTransfer:
res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
printf("f1ap_eNB_decode_initiating_message!\n");
//res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
LOG_I(F1AP, "f1ap_eNB_decode_initiating_message!\n");
break;
// case F1AP_ProcedureCode_id_InitialContextSetup:
// res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
......@@ -75,7 +77,7 @@ static int f1ap_decode_initiating_message(F1AP_F1AP_PDU_t *pdu)
default:
// F1AP_ERROR("Unknown procedure ID (%d) for initiating message\n",
// (int)pdu->choice.initiatingMessage->procedureCode);
printf("Unknown procedure ID (%d) for initiating message\n",
LOG_E(F1AP, "Unknown procedure ID (%d) for initiating message\n",
(int)pdu->choice.initiatingMessage->procedureCode);
AssertFatal( 0, "Unknown procedure ID (%d) for initiating message\n",
(int)pdu->choice.initiatingMessage->procedureCode);
......@@ -138,7 +140,11 @@ int f1ap_decode_pdu(F1AP_F1AP_PDU_t *pdu, const uint8_t *const buffer, uint32_t
0,
0);
if (asn1_decoder_xer_print) {
LOG_E(F1AP, "----------------- ASN1 DECODER PRINT START----------------- \n");
xer_fprint(stdout, &asn_DEF_F1AP_F1AP_PDU, pdu);
LOG_E(F1AP, "----------------- ASN1 DECODER PRINT END ----------------- \n");
}
//LOG_I(F1AP, "f1ap_decode_pdu.dec_ret.code = %d\n", dec_ret.code);
if (dec_ret.code != RC_OK) {
......@@ -157,7 +163,7 @@ int f1ap_decode_pdu(F1AP_F1AP_PDU_t *pdu, const uint8_t *const buffer, uint32_t
return f1ap_decode_unsuccessful_outcome(pdu);
default:
LOG_D(F1AP, "Unknown presence (%d) or not implemented\n", (int)pdu->present);
LOG_E(F1AP, "Unknown presence (%d) or not implemented\n", (int)pdu->present);
break;
}
......
......@@ -39,10 +39,12 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
int DU_send_UL_RRC_MESSAGE_TRANSFER(void);
int DU_send_UL_RRC_MESSAGE_TRANSFER(protocol_ctxt_t* ctxt_pP,
rb_id_t srb_idP,
uint8_t *sduP,
sdu_size_t sdu_lenP);
int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(
module_id_t module_idP,
int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
int CC_idP,
int UE_id,
rnti_t rntiP,
......
......@@ -69,7 +69,7 @@ void du_task_send_sctp_association_req(instance_t instance, f1ap_setup_req_t *f1
*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]);
//printf("nr_cellid : %llx (%lld)",f1ap_setup_req->nr_cellid[0],f1ap_setup_req->nr_cellid[0]);
//du_f1ap_register_to_sctp
itti_send_msg_to_task(TASK_SCTP, instance, message_p);
......@@ -139,7 +139,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, "F1AP_SETUP_REQ\n");
LOG_I(DU_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;
......@@ -147,14 +147,14 @@ void *F1AP_DU_task(void *arg) {
case SCTP_NEW_ASSOCIATION_RESP:
// 1. store the respon
// 2. send the f1setup_req
LOG_I(DU_F1AP, "SCTP_NEW_ASSOCIATION_RESP\n");
LOG_I(DU_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, "SCTP_DATA_IND\n");
LOG_I(DU_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;
......
......@@ -298,17 +298,10 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
/* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
printf("Failed to encode F1 setup request\n");
LOG_E(DU_F1AP, "Failed to encode F1 setup request\n");
return -1;
}
printf("\n");
/* decode */
// if (f1ap_decode_pdu(&pdu, buffer, len) > 0) {
// printf("Failed to decode F1 setup request\n");
// }
//du_f1ap_itti_send_sctp_data_req(instance, f1ap_setup_req->assoc_id, buffer, len, 0);
return 0;
}
......@@ -688,16 +681,10 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
/* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
printf("Failed to encode F1 setup request\n");
LOG_E(DU_F1AP, "Failed to encode F1 setup request\n");
return -1;
}
printf("\n");
/* decode */
// if (f1ap_decode_pdu(&pdu, buffer, len) > 0) {
// printf("Failed to decode F1 setup request\n");
// }
//du_f1ap_itti_send_sctp_data_req(instance, f1ap_setup_req->assoc_id, buffer, len, 0);
return 0;
......
......@@ -33,6 +33,8 @@
#include "f1ap_common.h"
#include "f1ap_encoder.h"
int asn1_encoder_xer_print = 1;
/*
static inline int f1ap_encode_initiating(f1ap_message *message,
uint8_t **buffer,
......@@ -76,14 +78,21 @@ int f1ap_encode_pdu(F1AP_F1AP_PDU_t *pdu, uint8_t **buffer, uint32_t *length)
DevAssert(buffer != NULL);
DevAssert(length != NULL);
if (asn1_encoder_xer_print) {
LOG_E(F1AP, "----------------- ASN1 ENCODER PRINT START ----------------- \n");
xer_fprint(stdout, &asn_DEF_F1AP_F1AP_PDU, pdu);
LOG_E(F1AP, "----------------- ASN1 ENCODER PRINT END----------------- \n");
}
encoded = aper_encode_to_new_buffer(&asn_DEF_F1AP_F1AP_PDU, 0, pdu, (void **)buffer);
if (encoded < 0) {
LOG_E(F1AP, "Failed to encode F1AP message\n");
return -1;
}
*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;
......
......@@ -117,7 +117,7 @@ int f1ap_handle_message(instance_t instance, uint32_t assoc_id, int32_t stream,
}
/* Calling the right handler */
printf("Calling handler with instance %d\n",instance);
LOG_I(DU_F1AP, "Calling handler with instance %d\n",instance);
ret = (*f1ap_messages_callback[pdu.choice.initiatingMessage->procedureCode][pdu.present - 1])
(instance, assoc_id, stream, &pdu);
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_F1AP_F1AP_PDU, &pdu);
......
......@@ -55,7 +55,7 @@ void du_f1ap_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint
sctp_data_req->buffer_length = buffer_length;
sctp_data_req->stream = stream;
printf("Sending ITTI message to SCTP Task\n");
LOG_I(F1AP, "Sending ITTI message to SCTP Task\n");
itti_send_msg_to_task(TASK_SCTP, instance, message_p);
}
......
......@@ -1135,7 +1135,7 @@ void pdcp_add_UE(const protocol_ctxt_t* const ctxt_pP){
pdcp_enb[ctxt_pP->module_id].rnti[i]=ctxt_pP->rnti;
pdcp_enb[ctxt_pP->module_id].uid[i]=i;
pdcp_enb[ctxt_pP->module_id].num_ues++;
printf("add new uid is %d %x\n\n", i, ctxt_pP->rnti);
LOG_I(PDCP,"add new uid is %d %x\n\n", i, ctxt_pP->rnti);
// ret=1;
break;
}
......
......@@ -37,6 +37,8 @@
#include "assertions.h"
#include "common/ran_context.h"
extern RAN_CONTEXT_t RC;
extern boolean_t pdcp_data_ind(
const protocol_ctxt_t* const ctxt_pP,
......@@ -689,6 +691,30 @@ void rlc_data_ind (
else
#endif /*UETARGET*/
{
switch (RC.rrc[ctxt_pP->module_id]->node_type){
case ngran_eNB_CU :
case ngran_ng_eNB_CU :
case ngran_gNB_CU :
pdcp_data_ind (
ctxt_pP,
1, // srb_flagP,
0, // MBMS_flagP,
rb_idP,
sdu_sizeP,
sdu_pP);
break;
case ngran_eNB_DU :
case ngran_gNB_DU :
DU_send_UL_RRC_MESSAGE_TRANSFER(
ctxt_pP,
rb_idP,
sdu_pP,
sdu_sizeP
);
break;
default:
pdcp_data_ind (
ctxt_pP,
srb_flagP,
......@@ -696,6 +722,9 @@ void rlc_data_ind (
rb_idP,
sdu_sizeP,
sdu_pP);
break;
}
}
}
//-----------------------------------------------------------------------------
......
......@@ -5771,11 +5771,12 @@ rrc_eNB_generate_RRCConnectionSetup(
F1AP_DL_RRC_MESSAGE (message_p).gNB_CU_ue_id = 0;
F1AP_DL_RRC_MESSAGE (message_p).gNB_DU_ue_id = 0;
F1AP_DL_RRC_MESSAGE (message_p).old_gNB_DU_ue_id = 0xFFFFFFFF; // unknown
F1AP_DL_RRC_MESSAGE (message_p).rnti = ue_p->rnti;
F1AP_DL_RRC_MESSAGE (message_p).srb_id = CCCH;
F1AP_DL_RRC_MESSAGE (message_p).execute_duplication = 1;
F1AP_DL_RRC_MESSAGE (message_p).RAT_frequency_priority_information.en_dc = 0;
itti_send_msg_to_task (TASK_CU_F1, UE_MODULE_ID_TO_INSTANCE(ctxt_pP->module_id), message_p);
LOG_E(RRC, "F1AP_DL_RRC_MESSAGE\n");
itti_send_msg_to_task (TASK_CU_F1, ctxt_pP->module_id, message_p);
LOG_D(RRC, "Send F1AP_DL_RRC_MESSAGE with ITTI\n");
break;
case ngran_eNB_DU :
case ngran_gNB_DU :
......
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