Merged latest commit(MR957)
This commit is contained in:
@@ -301,87 +301,11 @@ void exit_function(const char *file, const char *function, const int line, const
|
||||
}
|
||||
|
||||
|
||||
void *l2l1_task(void *arg) {
|
||||
MessageDef *message_p = NULL;
|
||||
int result;
|
||||
itti_set_task_real_time(TASK_L2L1);
|
||||
itti_mark_task_ready(TASK_L2L1);
|
||||
/* Wait for the initialize message */
|
||||
printf("Wait for the ITTI initialize message\n");
|
||||
|
||||
do {
|
||||
if (message_p != NULL) {
|
||||
result = itti_free (ITTI_MSG_ORIGIN_ID(message_p), message_p);
|
||||
AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
|
||||
}
|
||||
|
||||
itti_receive_msg (TASK_L2L1, &message_p);
|
||||
|
||||
switch (ITTI_MSG_ID(message_p)) {
|
||||
case INITIALIZE_MESSAGE:
|
||||
/* Start gNB thread */
|
||||
LOG_D(EMU, "L2L1 TASK received %s\n", ITTI_MSG_NAME(message_p));
|
||||
start_gNB = 1;
|
||||
break;
|
||||
|
||||
case TERMINATE_MESSAGE:
|
||||
printf("received terminate message\n");
|
||||
oai_exit=1;
|
||||
start_gNB = 0;
|
||||
itti_exit_task ();
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(EMU, "Received unexpected message %s\n", ITTI_MSG_NAME(message_p));
|
||||
break;
|
||||
}
|
||||
} while (ITTI_MSG_ID(message_p) != INITIALIZE_MESSAGE);
|
||||
|
||||
result = itti_free (ITTI_MSG_ORIGIN_ID(message_p), message_p);
|
||||
AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
|
||||
/* ???? no else but seems to be UE only ???
|
||||
do {
|
||||
// Wait for a message
|
||||
itti_receive_msg (TASK_L2L1, &message_p);
|
||||
|
||||
switch (ITTI_MSG_ID(message_p)) {
|
||||
case TERMINATE_MESSAGE:
|
||||
oai_exit=1;
|
||||
itti_exit_task ();
|
||||
break;
|
||||
|
||||
case ACTIVATE_MESSAGE:
|
||||
start_UE = 1;
|
||||
break;
|
||||
|
||||
case DEACTIVATE_MESSAGE:
|
||||
start_UE = 0;
|
||||
break;
|
||||
|
||||
case MESSAGE_TEST:
|
||||
LOG_I(EMU, "Received %s\n", ITTI_MSG_NAME(message_p));
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(EMU, "Received unexpected message %s\n", ITTI_MSG_NAME(message_p));
|
||||
break;
|
||||
}
|
||||
|
||||
result = itti_free (ITTI_MSG_ORIGIN_ID(message_p), message_p);
|
||||
AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
|
||||
} while(!oai_exit);
|
||||
*/
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int create_gNB_tasks(uint32_t gnb_nb) {
|
||||
LOG_D(GNB_APP, "%s(gnb_nb:%d)\n", __FUNCTION__, gnb_nb);
|
||||
itti_wait_ready(1);
|
||||
|
||||
if (itti_create_task (TASK_L2L1, l2l1_task, NULL) < 0) {
|
||||
LOG_E(PDCP, "Create task for L2L1 failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (gnb_nb > 0) {
|
||||
/* Last task to create, others task must be ready before its start */
|
||||
@@ -420,7 +344,7 @@ int create_gNB_tasks(uint32_t gnb_nb) {
|
||||
}
|
||||
|
||||
|
||||
if (AMF_MODE_ENABLED && (get_softmodem_params()->phy_test==0 && get_softmodem_params()->do_ra==0)) {
|
||||
if (AMF_MODE_ENABLED && (get_softmodem_params()->phy_test==0 && get_softmodem_params()->do_ra==0 && get_softmodem_params()->sa==0)) {
|
||||
if (gnb_nb > 0) {
|
||||
/*
|
||||
if (itti_create_task (TASK_SCTP, sctp_eNB_task, NULL) < 0) {
|
||||
@@ -718,7 +642,6 @@ int stop_L1L2(module_id_t gnb_id) {
|
||||
|
||||
/* these tasks need to pick up new configuration */
|
||||
terminate_task(TASK_RRC_ENB, gnb_id);
|
||||
terminate_task(TASK_L2L1, gnb_id);
|
||||
LOG_I(GNB_APP, "calling kill_gNB_proc() for instance %d\n", gnb_id);
|
||||
kill_gNB_proc(gnb_id);
|
||||
LOG_I(GNB_APP, "calling kill_NR_RU_proc() for instance %d\n", gnb_id);
|
||||
@@ -754,13 +677,6 @@ int restart_L1L2(module_id_t gnb_id) {
|
||||
rrc_enb_init();
|
||||
itti_mark_task_ready(TASK_RRC_ENB);
|
||||
|
||||
if (itti_create_task (TASK_L2L1, l2l1_task, NULL) < 0) {
|
||||
LOG_E(PDCP, "Create task for L2L1 failed\n");
|
||||
return -1;
|
||||
} else {
|
||||
LOG_I(PDCP, "Re-created task for L2L1 successfully\n");
|
||||
}
|
||||
|
||||
/* pass a reconfiguration request which will configure everything down to
|
||||
* RC.eNB[i][j]->frame_parms, too */
|
||||
msg_p = itti_alloc_new_message(TASK_ENB_APP, RRC_CONFIGURATION_REQ);
|
||||
@@ -853,6 +769,9 @@ int main( int argc, char **argv )
|
||||
if (get_softmodem_params()->do_ra)
|
||||
AssertFatal(get_softmodem_params()->phy_test == 0,"RA and phy_test are mutually exclusive\n");
|
||||
|
||||
if (get_softmodem_params()->sa)
|
||||
AssertFatal(get_softmodem_params()->phy_test == 0,"Standalone mode and phy_test are mutually exclusive\n");
|
||||
|
||||
#if T_TRACER
|
||||
T_Config_Init();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user