seevral fixes for F1 in 4G

This commit is contained in:
Laurent THOMAS
2021-09-15 18:56:31 +02:00
parent e77a177f28
commit 4ac02d07fa
8 changed files with 28 additions and 17 deletions
+3 -1
View File
@@ -151,7 +151,9 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
// Furthermore, cell_type is not a attribute of a cell in the data structure !!!!!!!!!!
if (RC.nrrrc && RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CU)
f1ap_req(true, instance)->cell_type=CELL_MACRO_GNB;
LOG_I(F1AP, "Received Cell in %d context\n", f1ap_req(true, instance)->cell_type=CELL_MACRO_GNB);
else
f1ap_req(true, instance)->cell_type=CELL_MACRO_ENB;
LOG_I(F1AP, "Received Cell in %d context\n", f1ap_req(true, instance)->cell_type==CELL_MACRO_GNB);
// System Information
/* mib */
req->mib[i] = calloc(served_cells_item_p->gNB_DU_System_Information->mIB_message.size + 1, sizeof(char));
+1 -1
View File
@@ -122,7 +122,7 @@ void * F1AP_CU_task(void *arg) {
itti_mark_task_ready(TASK_CU_F1);
eth_params_t *IPaddrs;
// Hardcoded instance id!
if (RC.nrrrc[0]->node_type == ngran_gNB_CU)
if (RC.nrrrc && RC.nrrrc[0]->node_type == ngran_gNB_CU)
IPaddrs=&RC.nrrrc[0]->eth_params_s;
else
IPaddrs=&RC.rrc[0]->eth_params_s;
+3 -1
View File
@@ -44,7 +44,8 @@ int to_NRNRB(int nrb) {
for (int i=0; i<sizeofArray(nrb_lut); i++)
if (nrb_lut[i] == nrb)
return i;
if(!RC.nrrrc)
return 0;
AssertFatal(1==0,"nrb %d is not in the list of possible NRNRB\n",nrb);
}
@@ -867,6 +868,7 @@ int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance,
memcpy((void *)F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container[si],
(void *)sib_item->sIBmessage.buf,
size);
F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_type[si]=sib_item->sIBtype;
}
break;
+12 -6
View File
@@ -85,12 +85,18 @@ void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
f1ap_du_data->sctp_out_streams = sctp_new_association_resp->out_streams;
f1ap_du_data->default_sctp_stream_id = 0;
/* setup parameters for F1U and start the server */
const cudu_params_t params = {
.local_ipv4_address = RC.nrmac[instance]->eth_params_n.my_addr,
.local_port = RC.nrmac[instance]->eth_params_n.my_portd,
.remote_ipv4_address = RC.nrmac[instance]->eth_params_n.remote_addr,
.remote_port = RC.nrmac[instance]->eth_params_n.remote_portd
};
eth_params_t *tmp;
if ( RC.nrmac )
tmp= &RC.nrmac[instance]->eth_params_n;
else
tmp= &RC.mac[instance]->eth_params_n;
const cudu_params_t params = {
.local_ipv4_address = tmp->my_addr,
.local_port = tmp->my_portd,
.remote_ipv4_address = tmp->remote_addr,
.remote_port = tmp->remote_portd
};
if (!RC.nrrrc)
AssertFatal(proto_agent_start(instance, &params) == 0,
"could not start PROTO_AGENT for F1U on instance %ld!\n", instance);