Merge remote-tracking branch 'origin/issue391-removeunusedcode_L2L1task' into develop_integration_2019_w04
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
This commit is contained in:
@@ -25,40 +25,34 @@
|
||||
# include "common/utils/LOG/log.h"
|
||||
# include "targets/RT/USER/lte-softmodem.h"
|
||||
|
||||
# ifdef OPENAIR2
|
||||
# if defined(ENABLE_USE_MME)
|
||||
# include "sctp_eNB_task.h"
|
||||
# include "x2ap_eNB.h"
|
||||
# include "s1ap_eNB.h"
|
||||
# include "nas_ue_task.h"
|
||||
# include "udp_eNB_task.h"
|
||||
# include "gtpv1u_eNB_task.h"
|
||||
/* temporary warning removale while implementing noS1 */
|
||||
/* as config option */
|
||||
# else
|
||||
# ifdef EPC_MODE_ENABLED
|
||||
# undef EPC_MODE_ENABLED
|
||||
# endif
|
||||
# define EPC_MODE_ENABLED 0
|
||||
# endif
|
||||
# if ENABLE_RAL
|
||||
# include "lteRALue.h"
|
||||
# include "lteRALenb.h"
|
||||
# endif
|
||||
# include "RRC/LTE/rrc_defs.h"
|
||||
# endif
|
||||
#ifdef OPENAIR2
|
||||
#if defined(ENABLE_USE_MME)
|
||||
#include "sctp_eNB_task.h"
|
||||
#include "x2ap_eNB.h"
|
||||
#include "s1ap_eNB.h"
|
||||
#include "nas_ue_task.h"
|
||||
#include "udp_eNB_task.h"
|
||||
#include "gtpv1u_eNB_task.h"
|
||||
/* temporary warning removale while implementing noS1 */
|
||||
/* as config option */
|
||||
#else
|
||||
#ifdef EPC_MODE_ENABLED
|
||||
#undef EPC_MODE_ENABLED
|
||||
#endif
|
||||
#define EPC_MODE_ENABLED 0
|
||||
#endif
|
||||
#if ENABLE_RAL
|
||||
#include "lteRALue.h"
|
||||
#include "lteRALenb.h"
|
||||
#endif
|
||||
#include "RRC/LTE/rrc_defs.h"
|
||||
#endif
|
||||
# include "enb_app.h"
|
||||
|
||||
|
||||
int create_tasks(uint32_t enb_nb)
|
||||
{
|
||||
int create_tasks(uint32_t enb_nb) {
|
||||
LOG_D(ENB_APP, "%s(enb_nb:%d\n", __FUNCTION__, enb_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 (enb_nb > 0) {
|
||||
/* Last task to create, others task must be ready before its start */
|
||||
@@ -67,50 +61,52 @@ int create_tasks(uint32_t enb_nb)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
# if defined(ENABLE_USE_MME)
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (enb_nb > 0) {
|
||||
if (itti_create_task (TASK_X2AP, x2ap_task, NULL) < 0) {
|
||||
LOG_E(X2AP, "Create task for X2AP failed\n");
|
||||
return -1;
|
||||
}
|
||||
if (enb_nb > 0) {
|
||||
if (itti_create_task (TASK_X2AP, x2ap_task, NULL) < 0) {
|
||||
LOG_E(X2AP, "Create task for X2AP failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (itti_create_task (TASK_SCTP, sctp_eNB_task, NULL) < 0) {
|
||||
LOG_E(SCTP, "Create task for SCTP failed\n");
|
||||
return -1;
|
||||
}
|
||||
if (itti_create_task (TASK_SCTP, sctp_eNB_task, NULL) < 0) {
|
||||
LOG_E(SCTP, "Create task for SCTP failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (itti_create_task (TASK_S1AP, s1ap_eNB_task, NULL) < 0) {
|
||||
LOG_E(S1AP, "Create task for S1AP failed\n");
|
||||
return -1;
|
||||
}
|
||||
if(!(get_softmodem_params()->emulate_rf)){
|
||||
if (itti_create_task (TASK_UDP, udp_eNB_task, NULL) < 0) {
|
||||
LOG_E(UDP_, "Create task for UDP failed\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (itti_create_task (TASK_S1AP, s1ap_eNB_task, NULL) < 0) {
|
||||
LOG_E(S1AP, "Create task for S1AP failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (itti_create_task (TASK_GTPV1_U, >pv1u_eNB_task, NULL) < 0) {
|
||||
LOG_E(GTPU, "Create task for GTPV1U failed\n");
|
||||
if(!(get_softmodem_params()->emulate_rf)) {
|
||||
if (itti_create_task (TASK_UDP, udp_eNB_task, NULL) < 0) {
|
||||
LOG_E(UDP_, "Create task for UDP failed\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
} /* if (EPC_MODE_ENABLED) */
|
||||
#endif
|
||||
if (enb_nb > 0) {
|
||||
LOG_I(RRC,"Creating RRC eNB Task\n");
|
||||
|
||||
if (itti_create_task (TASK_RRC_ENB, rrc_enb_task, NULL) < 0) {
|
||||
LOG_E(RRC, "Create task for RRC eNB failed\n");
|
||||
if (itti_create_task (TASK_GTPV1_U, >pv1u_eNB_task, NULL) < 0) {
|
||||
LOG_E(GTPU, "Create task for GTPV1U failed\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
} /* if (EPC_MODE_ENABLED) */
|
||||
|
||||
#endif
|
||||
|
||||
if (enb_nb > 0) {
|
||||
LOG_I(RRC,"Creating RRC eNB Task\n");
|
||||
|
||||
if (itti_create_task (TASK_RRC_ENB, rrc_enb_task, NULL) < 0) {
|
||||
LOG_E(RRC, "Create task for RRC eNB failed\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
itti_wait_ready(0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -24,57 +24,52 @@
|
||||
# include "create_tasks.h"
|
||||
# include "common/utils/LOG/log.h"
|
||||
|
||||
# ifdef OPENAIR2
|
||||
# if defined(ENABLE_USE_MME)
|
||||
# include "sctp_eNB_task.h"
|
||||
# include "s1ap_eNB.h"
|
||||
# include "nas_ue_task.h"
|
||||
# include "udp_eNB_task.h"
|
||||
# include "gtpv1u_eNB_task.h"
|
||||
# endif
|
||||
# if ENABLE_RAL
|
||||
# include "lteRALue.h"
|
||||
# include "lteRALenb.h"
|
||||
# endif
|
||||
# include "RRC/LTE/rrc_defs.h"
|
||||
# endif
|
||||
#ifdef OPENAIR2
|
||||
#if defined(ENABLE_USE_MME)
|
||||
#include "sctp_eNB_task.h"
|
||||
#include "s1ap_eNB.h"
|
||||
#include "nas_ue_task.h"
|
||||
#include "udp_eNB_task.h"
|
||||
#include "gtpv1u_eNB_task.h"
|
||||
#endif
|
||||
#if ENABLE_RAL
|
||||
#include "lteRALue.h"
|
||||
#include "lteRALenb.h"
|
||||
#endif
|
||||
#include "RRC/LTE/rrc_defs.h"
|
||||
#endif
|
||||
# include "enb_app.h"
|
||||
|
||||
int create_tasks_ue(uint32_t ue_nb)
|
||||
{
|
||||
int create_tasks_ue(uint32_t ue_nb) {
|
||||
LOG_D(ENB_APP, "%s(ue_nb:%d)\n", __FUNCTION__, ue_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 defined(ENABLE_USE_MME)
|
||||
# if defined(NAS_BUILT_IN_UE)
|
||||
if (ue_nb > 0) {
|
||||
nas_user_container_t *users = calloc(1, sizeof(*users));
|
||||
if (users == NULL) abort();
|
||||
users->count = ue_nb;
|
||||
if (itti_create_task (TASK_NAS_UE, nas_ue_task, users) < 0) {
|
||||
LOG_E(NAS, "Create task for NAS UE failed\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
|
||||
if (ue_nb > 0) {
|
||||
if (itti_create_task (TASK_RRC_UE, rrc_ue_task, NULL) < 0) {
|
||||
LOG_E(RRC, "Create task for RRC UE failed\n");
|
||||
return -1;
|
||||
}
|
||||
if (ue_nb > 0) {
|
||||
nas_user_container_t *users = calloc(1, sizeof(*users));
|
||||
|
||||
if (users == NULL) abort();
|
||||
|
||||
users->count = ue_nb;
|
||||
|
||||
if (itti_create_task (TASK_NAS_UE, nas_ue_task, users) < 0) {
|
||||
LOG_E(NAS, "Create task for NAS UE failed\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
# endif
|
||||
# endif
|
||||
|
||||
if (ue_nb > 0) {
|
||||
if (itti_create_task (TASK_RRC_UE, rrc_ue_task, NULL) < 0) {
|
||||
LOG_E(RRC, "Create task for RRC UE failed\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
itti_wait_ready(0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -127,10 +127,7 @@ int config_sync_var=-1;
|
||||
uint16_t runtime_phy_rx[29][6]; // SISO [MCS 0-28][RBs 0-5 : 6, 15, 25, 50, 75, 100]
|
||||
uint16_t runtime_phy_tx[29][6]; // SISO [MCS 0-28][RBs 0-5 : 6, 15, 25, 50, 75, 100]
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
volatile int start_eNB = 0;
|
||||
volatile int start_UE = 0;
|
||||
#endif
|
||||
|
||||
volatile int oai_exit = 0;
|
||||
|
||||
uint32_t downlink_frequency[MAX_NUM_CCs][4];
|
||||
@@ -379,61 +376,6 @@ static void *scope_thread(void *arg) {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
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");
|
||||
|
||||
while (1) {
|
||||
itti_receive_msg (TASK_L2L1, &message_p);
|
||||
|
||||
switch (ITTI_MSG_ID(message_p)) {
|
||||
case INITIALIZE_MESSAGE:
|
||||
/* Start eNB thread */
|
||||
LOG_D(PHY, "L2L1 TASK received %s\n", ITTI_MSG_NAME(message_p));
|
||||
start_eNB = 1;
|
||||
break;
|
||||
|
||||
case TERMINATE_MESSAGE:
|
||||
LOG_W(PHY, " *** Exiting L2L1 thread\n");
|
||||
oai_exit=1;
|
||||
start_eNB = 0;
|
||||
itti_exit_task ();
|
||||
break;
|
||||
|
||||
case ACTIVATE_MESSAGE:
|
||||
start_UE = 1;
|
||||
break;
|
||||
|
||||
case DEACTIVATE_MESSAGE:
|
||||
start_UE = 0;
|
||||
break;
|
||||
|
||||
case MESSAGE_TEST:
|
||||
printf("Received %s\n", ITTI_MSG_NAME(message_p));
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("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);
|
||||
message_p = NULL;
|
||||
};
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static void get_options(void) {
|
||||
CONFIG_SETRTFLAG(CONFIG_NOEXITONHELP);
|
||||
get_common_options();
|
||||
@@ -565,7 +507,6 @@ int stop_L1L2(module_id_t enb_id) {
|
||||
|
||||
/* these tasks need to pick up new configuration */
|
||||
terminate_task(enb_id, TASK_ENB_APP, TASK_RRC_ENB);
|
||||
terminate_task(enb_id, TASK_ENB_APP, TASK_L2L1);
|
||||
oai_exit = 1;
|
||||
LOG_I(ENB_APP, "calling kill_RU_proc() for instance %d\n", enb_id);
|
||||
kill_RU_proc(RC.ru[enb_id]);
|
||||
@@ -617,13 +558,6 @@ int restart_L1L2(module_id_t enb_id) {
|
||||
LOG_I(RRC, "Re-created task for RRC eNB successfully\n");
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
@@ -201,6 +201,8 @@
|
||||
{"C" , CONFIG_HLP_DLF, 0, uptr:&(downlink_frequency[0][0]), defuintval:2680000000, TYPE_UINT, 0}, \
|
||||
{"a" , CONFIG_HLP_CHOFF, 0, iptr:&CHAIN_OFFSET, defintval:0, TYPE_INT, 0}, \
|
||||
{"d" , CONFIG_HLP_SOFTS, PARAMFLAG_BOOL, uptr:(uint32_t *)&DO_FORMS, defintval:0, TYPE_INT8, 0}, \
|
||||
{"W" , CONFIG_HLP_L2MONW, 0, strptr:(char **)&in_ip, defstrval:"127.0.0.1", TYPE_STRING, sizeof(in_ip)}, \
|
||||
{"P" , CONFIG_HLP_L2MONP, 0, strptr:(char **)&in_path, defstrval:"/tmp/oai_opt.pcap", TYPE_STRING, sizeof(in_path)}, \
|
||||
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \
|
||||
{"S" , CONFIG_HLP_MSLOTS, PARAMFLAG_BOOL, u8ptr:&exit_missed_slots, defintval:1, TYPE_UINT8, 0}, \
|
||||
{"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&NUMEROLOGY, defintval:0, TYPE_INT, 0}, \
|
||||
@@ -237,6 +239,7 @@
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
}
|
||||
|
||||
/***************************************************************************************************************************************/
|
||||
/* */
|
||||
#include "threads_t.h"
|
||||
@@ -292,14 +295,6 @@ extern int sync_var;
|
||||
extern int transmission_mode;
|
||||
extern double cpuf;
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
extern volatile int start_eNB;
|
||||
extern volatile int start_UE;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
// In lte-enb.c
|
||||
extern void init_eNB(int single_thread_flag,int wait_for_sync);
|
||||
extern void stop_eNB(int);
|
||||
|
||||
@@ -128,10 +128,6 @@ int config_sync_var=-1;
|
||||
uint16_t runtime_phy_rx[29][6]; // SISO [MCS 0-28][RBs 0-5 : 6, 15, 25, 50, 75, 100]
|
||||
uint16_t runtime_phy_tx[29][6]; // SISO [MCS 0-28][RBs 0-5 : 6, 15, 25, 50, 75, 100]
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
volatile int start_eNB = 0;
|
||||
volatile int start_UE = 0;
|
||||
#endif
|
||||
volatile int oai_exit = 0;
|
||||
|
||||
clock_source_t clock_source = internal;
|
||||
@@ -402,48 +398,6 @@ static void *scope_thread(void *arg) {
|
||||
|
||||
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
void *l2l1_task(void *arg) {
|
||||
MessageDef *message_p = NULL;
|
||||
int result;
|
||||
itti_set_task_real_time(TASK_L2L1);
|
||||
itti_mark_task_ready(TASK_L2L1);
|
||||
|
||||
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(SIM, "Received %s\n", ITTI_MSG_NAME(message_p));
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(SIM, "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;
|
||||
}
|
||||
#endif
|
||||
|
||||
extern int16_t dlsch_demod_shift;
|
||||
|
||||
static void get_options(void) {
|
||||
|
||||
Reference in New Issue
Block a user