Commit 4222d356 authored by matzakos's avatar matzakos

ENDC path switch S1-U: Enable GTP task and relevant GTP-U configuration at the...

ENDC path switch S1-U: Enable GTP task and relevant GTP-U configuration at the gNB for the S1-U plane with the SGW
parent aff4ca83
...@@ -182,6 +182,7 @@ extern void reset_opp_meas(void); ...@@ -182,6 +182,7 @@ extern void reset_opp_meas(void);
extern void print_opp_meas(void); extern void print_opp_meas(void);
extern void init_eNB_afterRU(void); extern void init_eNB_afterRU(void);
extern void *udp_eNB_task(void *args_p);
int transmission_mode=1; int transmission_mode=1;
int emulate_rf = 0; int emulate_rf = 0;
...@@ -389,10 +390,10 @@ int create_gNB_tasks(uint32_t gnb_nb) { ...@@ -389,10 +390,10 @@ int create_gNB_tasks(uint32_t gnb_nb) {
if (gnb_nb > 0) { if (gnb_nb > 0) {
/* Last task to create, others task must be ready before its start */ /* Last task to create, others task must be ready before its start */
if (itti_create_task (TASK_GNB_APP, gNB_app_task, NULL) < 0) { /*if (itti_create_task (TASK_GNB_APP, gNB_app_task, NULL) < 0) {
LOG_E(GNB_APP, "Create task for gNB APP failed\n"); LOG_E(GNB_APP, "Create task for gNB APP failed\n");
return -1; return -1;
} }*/
if(itti_create_task(TASK_SCTP, sctp_eNB_task, NULL) < 0){ if(itti_create_task(TASK_SCTP, sctp_eNB_task, NULL) < 0){
LOG_E(SCTP, "Create task for SCTP failed\n"); LOG_E(SCTP, "Create task for SCTP failed\n");
return -1; return -1;
...@@ -407,10 +408,10 @@ int create_gNB_tasks(uint32_t gnb_nb) { ...@@ -407,10 +408,10 @@ int create_gNB_tasks(uint32_t gnb_nb) {
} }
} }
/*
if (EPC_MODE_ENABLED) { if (EPC_MODE_ENABLED) {
if (gnb_nb > 0) { if (gnb_nb > 0) {
if (itti_create_task (TASK_SCTP, sctp_eNB_task, NULL) < 0) { /*if (itti_create_task (TASK_SCTP, sctp_eNB_task, NULL) < 0) {
LOG_E(SCTP, "Create task for SCTP failed\n"); LOG_E(SCTP, "Create task for SCTP failed\n");
return -1; return -1;
} }
...@@ -418,7 +419,7 @@ int create_gNB_tasks(uint32_t gnb_nb) { ...@@ -418,7 +419,7 @@ int create_gNB_tasks(uint32_t gnb_nb) {
if (itti_create_task (TASK_S1AP, s1ap_eNB_task, NULL) < 0) { if (itti_create_task (TASK_S1AP, s1ap_eNB_task, NULL) < 0) {
LOG_E(S1AP, "Create task for S1AP failed\n"); LOG_E(S1AP, "Create task for S1AP failed\n");
return -1; return -1;
} }*/
if(!emulate_rf){ if(!emulate_rf){
if (itti_create_task (TASK_UDP, udp_eNB_task, NULL) < 0) { if (itti_create_task (TASK_UDP, udp_eNB_task, NULL) < 0) {
LOG_E(UDP_, "Create task for UDP failed\n"); LOG_E(UDP_, "Create task for UDP failed\n");
...@@ -430,12 +431,17 @@ int create_gNB_tasks(uint32_t gnb_nb) { ...@@ -430,12 +431,17 @@ int create_gNB_tasks(uint32_t gnb_nb) {
LOG_E(GTPU, "Create task for GTPV1U failed\n"); LOG_E(GTPU, "Create task for GTPV1U failed\n");
return -1; return -1;
} }
} }
} }
*/
if (gnb_nb > 0) { if (gnb_nb > 0) {
if (itti_create_task (TASK_GNB_APP, gNB_app_task, NULL) < 0) {
LOG_E(GNB_APP, "Create task for gNB APP failed\n");
return -1;
}
LOG_I(NR_RRC,"Creating NR RRC gNB Task\n"); LOG_I(NR_RRC,"Creating NR RRC gNB Task\n");
if (itti_create_task (TASK_RRC_GNB, rrc_gnb_task, NULL) < 0) { if (itti_create_task (TASK_RRC_GNB, rrc_gnb_task, NULL) < 0) {
...@@ -831,6 +837,7 @@ int main( int argc, char **argv ) ...@@ -831,6 +837,7 @@ int main( int argc, char **argv )
} }
openair0_cfg[0].threequarter_fs = threequarter_fs; openair0_cfg[0].threequarter_fs = threequarter_fs;
EPC_MODE_ENABLED = !IS_SOFTMODEM_NOS1;
#if T_TRACER #if T_TRACER
T_Config_Init(); T_Config_Init();
......
...@@ -71,7 +71,7 @@ static void configure_nr_rrc(uint32_t gnb_id) ...@@ -71,7 +71,7 @@ static void configure_nr_rrc(uint32_t gnb_id)
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/*
static uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//, const Enb_properties_array_t *enb_properties) static uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//, const Enb_properties_array_t *enb_properties)
{ {
uint32_t gnb_id; uint32_t gnb_id;
...@@ -83,18 +83,18 @@ static uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//, ...@@ -83,18 +83,18 @@ static uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//,
s1ap_register_enb_req_t *s1ap_register_gNB; //Type Temporarily reuse s1ap_register_enb_req_t *s1ap_register_gNB; //Type Temporarily reuse
// note: there is an implicit relationship between the data structure and the message name // note: there is an implicit relationship between the data structure and the message name
msg_p = itti_alloc_new_message (TASK_GNB_APP, S1AP_REGISTER_ENB_REQ); //Message Temporarily reuse /*msg_p = itti_alloc_new_message (TASK_GNB_APP, S1AP_REGISTER_ENB_REQ); //Message Temporarily reuse
RCconfig_NR_S1(msg_p, gnb_id); RCconfig_NR_S1(msg_p, gnb_id);*/
if (gnb_id == 0) RCconfig_nr_gtpu(); if (gnb_id == 0) RCconfig_nr_gtpu();
s1ap_register_gNB = &S1AP_REGISTER_ENB_REQ(msg_p); //Message Temporarily reuse /*s1ap_register_gNB = &S1AP_REGISTER_ENB_REQ(msg_p); //Message Temporarily reuse
LOG_I(GNB_APP,"default drx %d\n",s1ap_register_gNB->default_drx); LOG_I(GNB_APP,"default drx %d\n",s1ap_register_gNB->default_drx);*/
LOG_I(GNB_APP,"[gNB %d] gNB_app_register for instance %d\n", gnb_id, GNB_MODULE_ID_TO_INSTANCE(gnb_id)); LOG_I(GNB_APP,"[gNB %d] gNB_app_register for instance %d\n", gnb_id, GNB_MODULE_ID_TO_INSTANCE(gnb_id));
itti_send_msg_to_task (TASK_S1AP, GNB_MODULE_ID_TO_INSTANCE(gnb_id), msg_p); //itti_send_msg_to_task (TASK_S1AP, GNB_MODULE_ID_TO_INSTANCE(gnb_id), msg_p);
register_gnb_pending++; register_gnb_pending++;
} }
...@@ -102,7 +102,7 @@ static uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//, ...@@ -102,7 +102,7 @@ static uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//,
return register_gnb_pending; return register_gnb_pending;
} }
*/
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
static uint32_t gNB_app_register_x2(uint32_t gnb_id_start, uint32_t gnb_id_end) { static uint32_t gNB_app_register_x2(uint32_t gnb_id_start, uint32_t gnb_id_end) {
...@@ -132,6 +132,7 @@ void *gNB_app_task(void *args_p) ...@@ -132,6 +132,7 @@ void *gNB_app_task(void *args_p)
uint32_t gnb_id_start = 0; uint32_t gnb_id_start = 0;
uint32_t gnb_id_end = gnb_id_start + gnb_nb; uint32_t gnb_id_end = gnb_id_start + gnb_nb;
uint32_t x2_register_gnb_pending = 0; uint32_t x2_register_gnb_pending = 0;
uint32_t register_gnb_pending=0;
uint32_t gnb_id; uint32_t gnb_id;
MessageDef *msg_p = NULL; MessageDef *msg_p = NULL;
const char *msg_name = NULL; const char *msg_name = NULL;
...@@ -176,7 +177,7 @@ void *gNB_app_task(void *args_p) ...@@ -176,7 +177,7 @@ void *gNB_app_task(void *args_p)
if (EPC_MODE_ENABLED) { if (EPC_MODE_ENABLED) {
/* Try to register each gNB */ /* Try to register each gNB */
//registered_gnb = 0; //registered_gnb = 0;
//register_gnb_pending = gNB_app_register (gnb_id_start, gnb_id_end);//, gnb_properties_p); register_gnb_pending = gNB_app_register (gnb_id_start, gnb_id_end);//, gnb_properties_p);
} else { } else {
/* Start L2L1 task */ /* Start L2L1 task */
msg_p = itti_alloc_new_message(TASK_GNB_APP, INITIALIZE_MESSAGE); msg_p = itti_alloc_new_message(TASK_GNB_APP, INITIALIZE_MESSAGE);
......
...@@ -359,7 +359,7 @@ void x2ap_eNB_handle_sctp_init_msg_multi_cnf( ...@@ -359,7 +359,7 @@ void x2ap_eNB_handle_sctp_init_msg_multi_cnf(
* Failure means multi_sd < 0. * Failure means multi_sd < 0.
*/ */
if (instance->multi_sd < 0) { if (instance->multi_sd < 0) {
X2AP_ERROR("Error: be sure to properly configure X2 in your configuration file.\n"); X2AP_ERROR("Error: be sure to properly configure X22 in your configuration file.\n");
DevAssert(instance->multi_sd >= 0); DevAssert(instance->multi_sd >= 0);
} }
......
...@@ -51,17 +51,17 @@ int create_gNB_tasks(uint32_t gnb_nb) ...@@ -51,17 +51,17 @@ int create_gNB_tasks(uint32_t gnb_nb)
} }
if (gnb_nb > 0) { if (gnb_nb > 0) {
/* Last task to create, others task must be ready before its start */ // Last task to create, others task must be ready before its start
if (itti_create_task (TASK_GNB_APP, gNB_app_task, NULL) < 0) { if (itti_create_task (TASK_GNB_APP, gNB_app_task, NULL) < 0) {
LOG_E(GNB_APP, "Create task for gNB APP failed\n"); LOG_E(GNB_APP, "Create task for gNB APP failed\n");
return -1; return -1;
} }
} }
/*
if (EPC_MODE_ENABLED) { if (EPC_MODE_ENABLED) {
if (gnb_nb > 0) { if (gnb_nb > 0) {
if (itti_create_task (TASK_SCTP, sctp_eNB_task, NULL) < 0) { /*if (itti_create_task (TASK_SCTP, sctp_eNB_task, NULL) < 0) {
LOG_E(SCTP, "Create task for SCTP failed\n"); LOG_E(SCTP, "Create task for SCTP failed\n");
return -1; return -1;
} }
...@@ -69,7 +69,7 @@ int create_gNB_tasks(uint32_t gnb_nb) ...@@ -69,7 +69,7 @@ int create_gNB_tasks(uint32_t gnb_nb)
if (itti_create_task (TASK_S1AP, s1ap_eNB_task, NULL) < 0) { if (itti_create_task (TASK_S1AP, s1ap_eNB_task, NULL) < 0) {
LOG_E(S1AP, "Create task for S1AP failed\n"); LOG_E(S1AP, "Create task for S1AP failed\n");
return -1; return -1;
} }*/
if(!emulate_rf){ if(!emulate_rf){
if (itti_create_task (TASK_UDP, udp_eNB_task, NULL) < 0) { if (itti_create_task (TASK_UDP, udp_eNB_task, NULL) < 0) {
LOG_E(UDP_, "Create task for UDP failed\n"); LOG_E(UDP_, "Create task for UDP failed\n");
...@@ -84,7 +84,15 @@ int create_gNB_tasks(uint32_t gnb_nb) ...@@ -84,7 +84,15 @@ int create_gNB_tasks(uint32_t gnb_nb)
} }
} }
*/
/*if (gnb_nb > 0) {
// Last task to create, others task must be ready before its start
if (itti_create_task (TASK_GNB_APP, gNB_app_task, NULL) < 0) {
LOG_E(GNB_APP, "Create task for gNB APP failed\n");
return -1;
}
}*/
if (gnb_nb > 0) { if (gnb_nb > 0) {
LOG_I(NR_RRC,"Creating NR RRC gNB Task\n"); LOG_I(NR_RRC,"Creating NR RRC gNB Task\n");
...@@ -100,4 +108,4 @@ int create_gNB_tasks(uint32_t gnb_nb) ...@@ -100,4 +108,4 @@ int create_gNB_tasks(uint32_t gnb_nb)
return 0; return 0;
} }
#endif //#endif
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