Commit 686e5856 authored by Laurent THOMAS's avatar Laurent THOMAS

replace protobuf in 4G F1 split, first step: UL packets

parent df82ee1b
......@@ -2830,7 +2830,7 @@ add_dependencies(lte-softmodem rrc_flag s1ap_flag x2_flag oai_iqplayer)
target_link_libraries (lte-softmodem
-Wl,--start-group
RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB GTPV1U_OCP SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB SCHED_RU_LIB
RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB GTPV1U_OCP F1AP_LIB F1AP SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB SCHED_RU_LIB
PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB LFDS7
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB}
-Wl,--end-group z dl)
......
......@@ -476,6 +476,8 @@ int logInit (void)
register_log_component("NR_MAC","log",NR_MAC);
register_log_component("NR_PHY","log",NR_PHY);
register_log_component("NGAP","",NGAP);
register_log_component("ITTI","log",ITTI);
register_log_component("UTIL","log",UTIL);
for (int i=0 ; log_level_names[i].name != NULL ; i++)
g_log->level2string[i] = toupper(log_level_names[i].name[0]); // uppercased first letter of level name
......
......@@ -237,6 +237,8 @@ typedef enum {
ASN,
NFAPI_VNF,
NFAPI_PNF,
ITTI,
UTIL,
MAX_LOG_PREDEF_COMPONENTS,
}
comp_name_t;
......
......@@ -1057,6 +1057,48 @@ ID = LEGACY_NFAPI_PNF_TRACE
DESC = NFAPI_PNF legacy logs - trace level
GROUP = ALL:LEGACY_NFAPI_PNF:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
ID = LEGACY_ITTI_INFO
DESC = ITTI legacy logs - info level
GROUP = ALL:LEGACY_ITTI:LEGACY_GROUP_INFO:LEGACY
FORMAT = string,log
ID = LEGACY_ITTI_ERROR
DESC = ITTI legacy logs - error level
GROUP = ALL:LEGACY_ITTI:LEGACY_GROUP_ERROR:LEGACY
FORMAT = string,log
ID = LEGACY_ITTI_WARNING
DESC = ITTI legacy logs - warning level
GROUP = ALL:LEGACY_ITTI:LEGACY_GROUP_WARNING:LEGACY
FORMAT = string,log
ID = LEGACY_ITTI_DEBUG
DESC = ITTI legacy logs - debug level
GROUP = ALL:LEGACY_ITTI:LEGACY_GROUP_DEBUG:LEGACY
FORMAT = string,log
ID = LEGACY_ITTI_TRACE
DESC = ITTI legacy logs - trace level
GROUP = ALL:LEGACY_ITTI:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
ID = LEGACY_UTIL_INFO
DESC = UTIL legacy logs - info level
GROUP = ALL:LEGACY_UTIL:LEGACY_GROUP_INFO:LEGACY
FORMAT = string,log
ID = LEGACY_UTIL_ERROR
DESC = UTIL legacy logs - error level
GROUP = ALL:LEGACY_UTIL:LEGACY_GROUP_ERROR:LEGACY
FORMAT = string,log
ID = LEGACY_UTIL_WARNING
DESC = UTIL legacy logs - warning level
GROUP = ALL:LEGACY_UTIL:LEGACY_GROUP_WARNING:LEGACY
FORMAT = string,log
ID = LEGACY_UTIL_DEBUG
DESC = UTIL legacy logs - debug level
GROUP = ALL:LEGACY_UTIL:LEGACY_GROUP_DEBUG:LEGACY
FORMAT = string,log
ID = LEGACY_UTIL_TRACE
DESC = UTIL legacy logs - trace level
GROUP = ALL:LEGACY_UTIL:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
# this is a bad hack but I won't fix (function util_print_hex_octets
# in openairinterface5g/openair2/LAYER2/PDCP_v10.1.0/pdcp_util.c
# does funky things with the LOG_x macros but we work on the C pre-processor
......
......@@ -136,12 +136,12 @@ extern "C" {
LOG_E(TMR,"Queue for %s task contains %ld messages\n", itti_get_task_name(destination_task_id), s );
if ( s > 50 )
LOG_I(TMR,"Queue for %s task size: %ld (last message %s)\n",itti_get_task_name(destination_task_id), s+1,ITTI_MSG_NAME(message));
LOG_I(ITTI,"Queue for %s task size: %ld (last message %s)\n",itti_get_task_name(destination_task_id), s+1,ITTI_MSG_NAME(message));
t->message_queue.insert(t->message_queue.begin(), message);
eventfd_t sem_counter = 1;
AssertFatal ( sizeof(sem_counter) == write(t->sem_fd, &sem_counter, sizeof(sem_counter)), "");
LOG_D(TMR,"sent messages id=%d to %s\n",message_id, t->admin.name);
LOG_D(ITTI,"sent messages id=%d to %s\n",message_id, t->admin.name);
return 0;
}
......@@ -152,7 +152,7 @@ extern "C" {
while ( t->message_queue.size()>0 && t->admin.func != NULL ) {
if (t->message_queue.size()>1)
LOG_W(TMR,"queue in no thread mode is %ld\n", t->message_queue.size());
LOG_W(ITTI,"queue in no thread mode is %ld\n", t->message_queue.size());
pthread_mutex_unlock (&t->queue_cond_lock);
t->admin.func(NULL);
......@@ -208,7 +208,7 @@ extern "C" {
message->ittiMsg.timer_has_expired.arg=it->second.timer_arg;
if (itti_send_msg_to_task_locked(task_id, it->second.instance, message) < 0) {
LOG_W(TMR,"Failed to send msg TIMER_HAS_EXPIRED to task %u\n", task_id);
LOG_W(ITTI,"Failed to send msg TIMER_HAS_EXPIRED to task %u\n", task_id);
free(message);
t->timer_map.erase(it);
return -1;
......@@ -233,7 +233,7 @@ extern "C" {
epoll_timeout = t->next_timer-current_time;
pthread_mutex_unlock(&t->queue_cond_lock);
LOG_D(TMR,"enter blocking wait for %s\n", itti_get_task_name(task_id));
LOG_D(ITTI,"enter blocking wait for %s, timeout: %d ms\n", itti_get_task_name(task_id), epoll_timeout);
t->nb_events = epoll_wait(t->epoll_fd,t->events,t->nb_fd_epoll, epoll_timeout);
if ( t->nb_events < 0 && (errno == EINTR || errno == EAGAIN ) )
......@@ -243,7 +243,7 @@ extern "C" {
AssertFatal (t->nb_events >=0,
"epoll_wait failed for task %s, nb fds %d, timeout %lu: %s!\n",
itti_get_task_name(task_id), t->nb_fd_epoll, t->next_timer != UINT64_MAX ? t->next_timer-current_time : -1, strerror(errno));
LOG_D(TMR,"receive on %d descriptors for %s\n", t->nb_events, itti_get_task_name(task_id));
LOG_D(ITTI,"receive on %d descriptors for %s\n", t->nb_events, itti_get_task_name(task_id));
if (t->nb_events == 0)
/* No data to read -> return */
......@@ -292,11 +292,11 @@ extern "C" {
// in this case, *received_msg is NULL
if (t->message_queue.empty()) {
*received_msg=NULL;
LOG_D(TMR,"task %s received even from other fd (total fds: %d), returning msg NULL\n",t->admin.name, t->nb_fd_epoll);
LOG_D(ITTI,"task %s received even from other fd (total fds: %d), returning msg NULL\n",t->admin.name, t->nb_fd_epoll);
} else {
*received_msg=t->message_queue.back();
t->message_queue.pop_back();
LOG_D(TMR,"task %s received a message\n",t->admin.name);
LOG_D(ITTI,"task %s received a message\n",t->admin.name);
}
pthread_mutex_unlock (&t->queue_cond_lock);
......@@ -308,7 +308,7 @@ extern "C" {
pthread_mutex_lock(&t->queue_cond_lock);
if (!t->message_queue.empty()) {
LOG_D(TMR,"task %s received a message in polling mode\n",t->admin.name);
LOG_D(ITTI,"task %s received a message in polling mode\n",t->admin.name);
*received_msg=t->message_queue.back();
t->message_queue.pop_back();
} else
......@@ -322,7 +322,7 @@ extern "C" {
void *args_p) {
task_list_t *t=tasks[task_id];
threadCreate (&t->thread, start_routine, args_p, (char *)itti_get_task_name(task_id),-1,OAI_PRIORITY_RT);
LOG_I(TMR,"Created Posix thread %s\n", itti_get_task_name(task_id) );
LOG_I(ITTI,"Created Posix thread %s\n", itti_get_task_name(task_id) );
return 0;
}
......@@ -344,7 +344,7 @@ extern "C" {
tasks = new_tasks;
tasks[newQueue]= new task_list_t;
pthread_mutex_unlock (&lock_nb_queues);
LOG_I(TMR,"Starting itti queue: %s as task %d\n", taskInfo->name, newQueue);
LOG_I(ITTI,"Starting itti queue: %s as task %d\n", taskInfo->name, newQueue);
pthread_mutex_init(&tasks[newQueue]->queue_cond_lock, NULL);
memcpy(&tasks[newQueue]->admin, taskInfo, sizeof(task_info_t));
AssertFatal( ( tasks[newQueue]->epoll_fd = epoll_create1(0) ) >=0, "");
......@@ -392,7 +392,7 @@ extern "C" {
clock_gettime(CLOCK_MONOTONIC, &tp);
if (interval_us%1000 != 0)
LOG_W(TMR, "Can't set timer precision below 1ms, rounding it\n");
LOG_W(ITTI, "Can't set timer precision below 1ms, rounding it\n");
timer.duration = interval_sec*1000+interval_us/1000;
timer.timeout= ((uint64_t)tp.tv_sec*1000+tp.tv_nsec/(1000*1000)+timer.duration);
......@@ -421,7 +421,7 @@ extern "C" {
if (ret==1)
return 0;
else {
LOG_W(TMR, "tried to remove a non existing timer\n");
LOG_W(ITTI, "tried to remove a non existing timer\n");
return 1;
}
}
......
......@@ -236,7 +236,7 @@ void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name,
ret=pthread_attr_setschedpolicy(&attr, SCHED_OAI);
AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
if(priority<sched_get_priority_min(SCHED_OAI) || priority>sched_get_priority_max(SCHED_OAI)) {
LOG_E(TMR,"Prio not possible: %d, min is %d, max: %d, forced in the range\n",
LOG_E(UTIL,"Prio not possible: %d, min is %d, max: %d, forced in the range\n",
priority,
sched_get_priority_min(SCHED_OAI),
sched_get_priority_max(SCHED_OAI));
......
......@@ -141,7 +141,7 @@ static inline notifiedFIFO_elt_t *pullNotifiedFIFO_nothreadSafe(notifiedFIFO_t
notifiedFIFO_elt_t *ret=nf->outF;
if (nf->outF==nf->outF->next)
LOG_E(TMR,"Circular list in thread pool: push several times the same buffer is forbidden\n");
LOG_E(UTIL,"Circular list in thread pool: push several times the same buffer is forbidden\n");
nf->outF=nf->outF->next;
......
......@@ -1970,8 +1970,11 @@ int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i) {
LOG_I(ENB_APP,"FIAP: DU_ip4_address in DU %p, strlen %d\n",F1AP_SETUP_REQ (msg_p).DU_f1_ip_address.ipv4_address,(int)strlen(RC.mac[k]->eth_params_n.my_addr));
F1AP_SETUP_REQ (msg_p).DU_f1_ip_address.ipv6 = 0;
F1AP_SETUP_REQ (msg_p).DU_f1_ip_address.ipv4 = 1;
//strcpy(F1AP_SETUP_REQ (msg_p).DU_f1_ip_address.ipv6_address, "");
strcpy(F1AP_SETUP_REQ (msg_p).DU_f1_ip_address.ipv4_address, RC.mac[k]->eth_params_n.my_addr);
F1AP_SETUP_REQ (msg_p).DUport= RC.mac[k]->eth_params_n.my_portd;
F1AP_SETUP_REQ (msg_p).CUport= RC.mac[k]->eth_params_n.remote_portd;
//strcpy(F1AP_SETUP_REQ (msg_p).CU_ip_address[l].ipv6_address,*(F1ParamList.paramarray[l][ENB_CU_IPV6_ADDRESS_IDX].strptr));
//F1AP_SETUP_REQ (msg_p).CU_port = RC.mac[k]->eth_params_n.remote_portc; // maybe we dont need it
sprintf(aprefix,"%s.[%i].%s",ENB_CONFIG_STRING_ENB_LIST,k,ENB_CONFIG_STRING_SCTP_CONFIG);
......
......@@ -45,8 +45,8 @@ static instance_t cu_task_create_gtpu_instance_to_du(eth_params_t *IPaddrs) {
openAddr_t tmp={0};
strncpy(tmp.originHost, IPaddrs->my_addr, sizeof(tmp.originHost)-1);
strncpy(tmp.destinationHost, IPaddrs->remote_addr, sizeof(tmp.destinationHost)-1);
sprintf(tmp.originService, "%d", GTPV1U_UDP_PORT);
sprintf(tmp.destinationService, "%d", GTPV1U_UDP_PORT);
sprintf(tmp.originService, "%d", IPaddrs->my_portd);
sprintf(tmp.destinationService, "%d", IPaddrs->remote_portd);
return ocp_gtpv1Init(tmp);
}
......
......@@ -744,7 +744,6 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
return 0;
}
/* UL RRC Message Transfer */
int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instanceP,
int CC_idP,
......@@ -764,7 +763,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instanceP,
LOG_E(F1AP, "Failed to add UE \n");
return -1;
}
/* Create */
/* 0. Message Type */
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
......
......@@ -96,10 +96,12 @@ void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
.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);
*/
DU_send_F1_SETUP_REQUEST(instance);
}
......@@ -149,7 +151,8 @@ void *F1AP_DU_task(void *arg) {
AssertFatal(getCxt(DUtype, myInstance)->gtpInst>0,"Failed to create CU F1-U UDP listener");
// Fixme: fully inconsistent instances management
// dirty global var is a bad fix
DUuniqInstance=getCxt(DUtype, myInstance)->gtpInst;
extern instance_t legacyInstanceMapping;
legacyInstanceMapping = DUuniqInstance = getCxt(DUtype, myInstance)->gtpInst;
du_task_send_sctp_association_req(myInstance,msgSetup);
break;
......
......@@ -154,7 +154,19 @@ boolean_t cu_f1u_data_req(
const uint32_t *const destinationL2Id
)
{
return true;
mem_block_t *memblock = get_free_mem_block(sdu_buffer_size, __func__);
if (memblock == NULL) {
LOG_E(RLC, "%s:%d:%s: ERROR: get_free_mem_block failed\n", __FILE__, __LINE__, __FUNCTION__);
exit(1);
}
memcpy(memblock->data,sdu_buffer, sdu_buffer_size);
// These -4 are boring
int ret=pdcp_data_ind(ctxt_pP,srb_flagP, false, rb_id-4, sdu_buffer_size, memblock);
if (!ret) {
LOG_E(RLC, "%s:%d:%s: ERROR: pdcp_data_ind failed\n", __FILE__, __LINE__, __FUNCTION__);
/* what to do in case of failure? for the moment: nothing */
}
return ret;
}
void *pdcp_stats_thread(void *param) {
......
......@@ -192,6 +192,7 @@ error:
boolean_t
proto_agent_send_pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP, const srb_flag_t srb_flagP,
const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP, sdu_size_t sdu_sizeP, mem_block_t *sdu_pP) {
uint8_t *msg = NULL;
......
......@@ -427,6 +427,20 @@ rb_found:
F1AP_UL_RRC_MESSAGE(msg).rrc_container_length = size;
itti_send_msg_to_task(TASK_DU_F1, ENB_MODULE_ID_TO_INSTANCE(0 /*ctxt_pP->module_id*/), msg);
return;
} else {
// Fixme: very dirty workaround of incomplete F1-U implementation
instance_t DUuniqInstance=0;
MessageDef *msg = itti_alloc_new_message(TASK_RLC_ENB, 0, GTPV1U_ENB_TUNNEL_DATA_REQ);
gtpv1u_enb_tunnel_data_req_t *req=&GTPV1U_ENB_TUNNEL_DATA_REQ(msg);
req->buffer=malloc(size);
memcpy(req->buffer,buf,size);
req->length=size;
req->offset=0;
req->rnti=ue->rnti;
req->rab_id=rb_id+4;
LOG_D(RLC, "Received uplink user-plane traffic at RLC-DU to be sent to the CU, size %d \n", size);
itti_send_msg_to_task(OCP_GTPV1_U, DUuniqInstance, msg);
return;
}
}
......
......@@ -1078,29 +1078,43 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char
rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP(&ctxt,ue_context_p);
}
/*
if ((RC.rrc[ctxt.module_id]->node_type == ngran_eNB_CU) ||
(RC.rrc[ctxt.module_id]->node_type == ngran_ng_eNB_CU) ||
(RC.rrc[ctxt.module_id]->node_type == ngran_gNB_CU) ){
message_p = itti_alloc_new_message (TASK_RRC_ENB, 0, F1AP_UE_CONTEXT_SETUP_REQ);
F1AP_UE_CONTEXT_SETUP_REQ (message_p).rrc_container = ue_p->Srb0.Tx_buffer.Payload;
F1AP_UE_CONTEXT_SETUP_REQ (message_p).rrc_container_length = ue_p->Srb0.Tx_buffer.payload_size;
F1AP_UE_CONTEXT_SETUP_REQ (message_p).gNB_CU_ue_id = 0;
F1AP_UE_CONTEXT_SETUP_REQ (message_p).gNB_DU_ue_id = 0;
F1AP_UE_CONTEXT_SETUP_REQ (message_p).old_gNB_DU_ue_id = 0xFFFFFFFF; // unknown
F1AP_UE_CONTEXT_SETUP_REQ (message_p).rnti = ue_p->rnti;
F1AP_UE_CONTEXT_SETUP_REQ (message_p).srb_id = CCCH;
F1AP_UE_CONTEXT_SETUP_REQ (message_p).execute_duplication = 1;
F1AP_UE_CONTEXT_SETUP_REQ (message_p).RAT_frequency_priority_information.en_dc = 0;
itti_send_msg_to_task (TASK_CU_F1, ctxt_pP->module_id, message_p);
LOG_D(RRC, "Send F1AP_UE_CONTEXT_SETUP_REQ with ITTI\n");
}
*/
return (0);
if ((RC.rrc[ctxt.module_id]->node_type == ngran_eNB_CU) ||
(RC.rrc[ctxt.module_id]->node_type == ngran_ng_eNB_CU) ||
(RC.rrc[ctxt.module_id]->node_type == ngran_gNB_CU) ){
struct eNB_RRC_INST_s *rrc= RC.rrc[0];
MessageDef *message_p = itti_alloc_new_message (TASK_RRC_ENB, 0, F1AP_UE_CONTEXT_SETUP_REQ);
f1ap_ue_context_setup_t *req=&F1AP_UE_CONTEXT_SETUP_REQ (message_p);
req->gNB_CU_ue_id = 0;
req->gNB_DU_ue_id = 0;
req->rnti = ue_context_p->ue_context.rnti;
req->mcc = rrc->configuration.mcc[0];
req->mnc = rrc->configuration.mnc[0];
req->mnc_digit_length = rrc->configuration.mnc_digit_length[0];
req->nr_cellid = rrc->nr_cellid;
req->srbs_to_be_setup = malloc(sizeof(f1ap_srb_to_be_setup_t));
req->srbs_to_be_setup_length = 1;
f1ap_srb_to_be_setup_t *SRBs=req->srbs_to_be_setup;
SRBs[0].srb_id=CCCH;
req->drbs_to_be_setup_length = S1AP_INITIAL_CONTEXT_SETUP_REQ (msg_p).nb_of_e_rabs;
req->drbs_to_be_setup = malloc(req->drbs_to_be_setup_length * sizeof(f1ap_drb_to_be_setup_t));
f1ap_drb_to_be_setup_t *DRBs=req->drbs_to_be_setup;
for (int i = 0; i < req->drbs_to_be_setup_length ; i++) {
DRBs[i].drb_id=S1AP_INITIAL_CONTEXT_SETUP_REQ (msg_p).e_rab_param[i].e_rab_id;
DRBs[i].rlc_mode = RLC_MODE_AM;
DRBs[i].up_ul_tnl[0].tl_address = inet_addr(rrc->eth_params_s.my_addr);
DRBs[i].up_ul_tnl[0].port=rrc->eth_params_s.my_portd;
DRBs[i].up_ul_tnl_length = 1;
DRBs[i].up_dl_tnl[0].tl_address = inet_addr(rrc->eth_params_s.remote_addr);
DRBs[i].up_dl_tnl[0].port=rrc->eth_params_s.remote_portd;
DRBs[i].up_dl_tnl_length = 1;
}
LOG_I(RRC, "Send F1AP_UE_CONTEXT_SETUP_REQ with ITTI\n");
itti_send_msg_to_task (TASK_CU_F1, 0, message_p);
}
}
return (0);
}
/*------------------------------------------------------------------------------*/
......
......@@ -1370,17 +1370,18 @@ rrc_gNB_process_RRCReconfigurationComplete(
else if(SRB_configList!=NULL || DRB_configList!=NULL){
MessageDef *message_p;
message_p = itti_alloc_new_message (TASK_RRC_GNB, 0, F1AP_UE_CONTEXT_SETUP_REQ);
F1AP_UE_CONTEXT_SETUP_REQ (message_p).gNB_CU_ue_id = 0;
F1AP_UE_CONTEXT_SETUP_REQ (message_p).gNB_DU_ue_id = 0;
F1AP_UE_CONTEXT_SETUP_REQ (message_p).rnti = ue_context_pP->ue_context.rnti;
F1AP_UE_CONTEXT_SETUP_REQ (message_p).mcc = RC.nrrrc[0]->configuration.mcc[0];
F1AP_UE_CONTEXT_SETUP_REQ (message_p).mnc = RC.nrrrc[0]->configuration.mnc[0];
F1AP_UE_CONTEXT_SETUP_REQ (message_p).mnc_digit_length = RC.nrrrc[0]->configuration.mnc_digit_length[0];
F1AP_UE_CONTEXT_SETUP_REQ (message_p).nr_cellid = RC.nrrrc[0]->nr_cellid;
f1ap_ue_context_setup_t *req=&F1AP_UE_CONTEXT_SETUP_REQ (message_p);
req->gNB_CU_ue_id = 0;
req->gNB_DU_ue_id = 0;
req->rnti = ue_context_pP->ue_context.rnti;
req->mcc = RC.nrrrc[0]->configuration.mcc[0];
req->mnc = RC.nrrrc[0]->configuration.mnc[0];
req->mnc_digit_length = RC.nrrrc[0]->configuration.mnc_digit_length[0];
req->nr_cellid = RC.nrrrc[0]->nr_cellid;
if(SRB_configList!=NULL){
F1AP_UE_CONTEXT_SETUP_REQ (message_p).srbs_to_be_setup = malloc(SRB_configList->list.count*sizeof(f1ap_srb_to_be_setup_t));
F1AP_UE_CONTEXT_SETUP_REQ (message_p).srbs_to_be_setup_length = SRB_configList->list.count;
f1ap_srb_to_be_setup_t *SRBs=F1AP_UE_CONTEXT_SETUP_REQ (message_p).srbs_to_be_setup;
req->srbs_to_be_setup = malloc(SRB_configList->list.count*sizeof(f1ap_srb_to_be_setup_t));
req->srbs_to_be_setup_length = SRB_configList->list.count;
f1ap_srb_to_be_setup_t *SRBs=req->srbs_to_be_setup;
for (int i = 0; i < SRB_configList->list.count; i++){
if(SRB_configList->list.array[i]->srb_Identity > 1){
SRBs[i].srb_id = SRB_configList->list.array[i]->srb_Identity;
......@@ -1391,10 +1392,10 @@ rrc_gNB_process_RRCReconfigurationComplete(
if(DRB_configList!=NULL){
gtpv1u_gnb_create_tunnel_req_t create_tunnel_req;
memset(&create_tunnel_req, 0, sizeof(gtpv1u_gnb_create_tunnel_req_t));
F1AP_UE_CONTEXT_SETUP_REQ (message_p).drbs_to_be_setup = malloc(DRB_configList->list.count*sizeof(f1ap_drb_to_be_setup_t));
F1AP_UE_CONTEXT_SETUP_REQ (message_p).drbs_to_be_setup_length = DRB_configList->list.count;
f1ap_drb_to_be_setup_t *DRBs=F1AP_UE_CONTEXT_SETUP_REQ (message_p).drbs_to_be_setup;
LOG_I(RRC, "Length of DRB list:%d, %d \n", DRB_configList->list.count, F1AP_UE_CONTEXT_SETUP_REQ (message_p).drbs_to_be_setup_length);
req->drbs_to_be_setup = malloc(DRB_configList->list.count*sizeof(f1ap_drb_to_be_setup_t));
req->drbs_to_be_setup_length = DRB_configList->list.count;
f1ap_drb_to_be_setup_t *DRBs=req->drbs_to_be_setup;
LOG_I(RRC, "Length of DRB list:%d, %d \n", DRB_configList->list.count, req->drbs_to_be_setup_length);
for (int i = 0; i < DRB_configList->list.count; i++){
DRBs[i].drb_id = DRB_configList->list.array[i]->drb_Identity;
DRBs[i].rlc_mode = RLC_MODE_AM;
......
......@@ -95,7 +95,7 @@ static teid_t gtpv1uNewTeid(void) {
#endif
}
static instance_t legacyInstanceMapping=0;
instance_t legacyInstanceMapping=0;
#define compatInst(a) ((a)==0 || (a)==INSTANCE_DEFAULT?legacyInstanceMapping:a)
#define GTPV1U_HEADER_SIZE (8)
......
......@@ -91,6 +91,9 @@ int create_tasks(uint32_t enb_nb) {
if (NODE_IS_DU(type)) {
rc = itti_create_task(TASK_DU_F1, F1AP_DU_task, NULL);
AssertFatal(rc >= 0, "Create task for DU F1AP failed\n");
// DU is now GTP-U instead of protobuf
rc = itti_create_task(TASK_GTPV1_U, gtpv1u_eNB_task, NULL);
AssertFatal(rc >= 0, "Create task for GTPV1U failed\n");
}
if (!NODE_IS_CU(type)) {
......
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