remove un-necessary global variables

This commit is contained in:
Laurent THOMAS
2024-12-04 12:26:36 +01:00
parent c942fe43a9
commit 279d49415f
48 changed files with 484 additions and 719 deletions
+2 -2
View File
@@ -52,12 +52,12 @@ int create_tasks(uint32_t enb_nb) {
rrc_enb_init();
itti_mark_task_ready(TASK_RRC_ENB);
if (get_softmodem_params()->emulate_l1 || EPC_MODE_ENABLED) {
if (get_softmodem_params()->emulate_l1 || !IS_SOFTMODEM_NOS1) {
rc = itti_create_task(TASK_SCTP, sctp_eNB_task, NULL);
AssertFatal(rc >= 0, "Create task for SCTP failed\n");
}
if (EPC_MODE_ENABLED) {
if (!IS_SOFTMODEM_NOS1) {
rc = itti_create_task(TASK_S1AP, s1ap_eNB_task, NULL);
AssertFatal(rc >= 0, "Create task for S1AP failed\n");
rc = itti_create_task(TASK_GTPV1_U, gtpv1uTask, NULL);
+5 -6
View File
@@ -52,12 +52,11 @@ int create_tasks_mbms(uint32_t enb_nb) {
if (enb_nb == 0) return 0;
if(!EPC_MODE_ENABLED){
if (IS_SOFTMODEM_NOS1) {
rc = itti_create_task(TASK_SCTP, sctp_eNB_task, NULL);
AssertFatal(rc >= 0, "Create task for SCTP failed\n");
}
LOG_I(MME_APP, "Creating MME_APP eNB Task\n");
rc = itti_create_task (TASK_MME_APP, MME_app_task, NULL);
AssertFatal(rc >= 0, "Create task for MME APP failed\n");
@@ -71,12 +70,12 @@ int create_tasks_mbms(uint32_t enb_nb) {
rc = itti_create_task (TASK_MCE_APP, MCE_app_task, NULL);
AssertFatal(rc >= 0, "Create task for MCE APP failed\n");
if(!EPC_MODE_ENABLED){
// rc = itti_create_task(TASK_SCTP, sctp_eNB_task, NULL);
// AssertFatal(rc >= 0, "Create task for SCTP failed\n");
if (IS_SOFTMODEM_NOS1) {
// rc = itti_create_task(TASK_SCTP, sctp_eNB_task, NULL);
// AssertFatal(rc >= 0, "Create task for SCTP failed\n");
rc = itti_create_task(TASK_GTPV1_U, gtpv1uTask, NULL);
AssertFatal(rc >= 0, "Create task for GTPV1U failed\n");
}
}
if (is_m3ap_MCE_enabled()) {
rc = itti_create_task(TASK_M3AP_MCE, m3ap_MCE_task, NULL);
+2 -2
View File
@@ -39,7 +39,7 @@ 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 (EPC_MODE_ENABLED) {
if (!IS_SOFTMODEM_NOS1) {
# if defined(NAS_BUILT_IN_UE)
if (ue_nb > 0) {
@@ -57,7 +57,7 @@ int create_tasks_ue(uint32_t ue_nb)
}
# endif
} /* EPC_MODE_ENABLED */
}
if (ue_nb > 0) {
if (itti_create_task (TASK_RRC_UE, rrc_ue_task, NULL) < 0) {
+2 -7
View File
@@ -117,13 +117,10 @@ runmode_t mode = normal_txrx;
FILE *input_fd=NULL;
#if MAX_NUM_CCs == 1
rx_gain_t rx_gain_mode[MAX_NUM_CCs][4] = {{max_gain,max_gain,max_gain,max_gain}};
double tx_gain[MAX_NUM_CCs][4] = {{20,0,0,0}};
double rx_gain[MAX_NUM_CCs][4] = {{110,0,0,0}};
#else
rx_gain_t rx_gain_mode[MAX_NUM_CCs][4] = {{max_gain,max_gain,max_gain,max_gain},{max_gain,max_gain,max_gain,max_gain}};
double tx_gain[MAX_NUM_CCs][4] = {{20,0,0,0},{20,0,0,0}};
double rx_gain[MAX_NUM_CCs][4] = {{110,0,0,0},{20,0,0,0}};
#endif
@@ -455,9 +452,7 @@ int main ( int argc, char **argv )
printf("Reading in command-line options\n");
get_options(uniqCfg);
EPC_MODE_ENABLED = !IS_SOFTMODEM_NOS1;
if (CONFIG_ISFLAGSET(CONFIG_ABORT) ) {
if (CONFIG_ISFLAGSET(CONFIG_ABORT)) {
fprintf(stderr,"Getting configuration failed\n");
exit(-1);
}
@@ -470,7 +465,7 @@ int main ( int argc, char **argv )
printf("configuring for RAU/RRU\n");
cpuf=get_cpu_freq_GHz();
printf("ITTI init, useMME: %i\n",EPC_MODE_ENABLED);
printf("ITTI init, useMME: %i\n", !IS_SOFTMODEM_NOS1);
itti_init(TASK_MAX, tasks_info);
init_opt();
-3
View File
@@ -114,11 +114,9 @@ FILE *input_fd=NULL;
int otg_enabled=0;
#if MAX_NUM_CCs == 1
rx_gain_t rx_gain_mode[MAX_NUM_CCs][4] = {{max_gain,max_gain,max_gain,max_gain}};
double tx_gain[MAX_NUM_CCs][4] = {{20,0,0,0}};
double rx_gain[MAX_NUM_CCs][4] = {{130,0,0,0}};
#else
rx_gain_t rx_gain_mode[MAX_NUM_CCs][4] = {{max_gain,max_gain,max_gain,max_gain},{max_gain,max_gain,max_gain,max_gain}};
double tx_gain[MAX_NUM_CCs][4] = {{20,0,0,0},{20,0,0,0}};
double rx_gain[MAX_NUM_CCs][4] = {{130,0,0,0},{20,0,0,0}};
#endif
@@ -543,7 +541,6 @@ int main( int argc, char **argv ) {
}
printf("sf_ahead = %d\n", sf_ahead);
EPC_MODE_ENABLED = !IS_SOFTMODEM_NOS1;
printf("Running with %d UE instances\n",NB_UE_INST);
#if T_TRACER
-5
View File
@@ -107,11 +107,9 @@ char *uecap_file;
runmode_t mode = normal_txrx;
#if MAX_NUM_CCs == 1
rx_gain_t rx_gain_mode[MAX_NUM_CCs][4] = {{max_gain,max_gain,max_gain,max_gain}};
double tx_gain[MAX_NUM_CCs][4] = {{20,0,0,0}};
double rx_gain[MAX_NUM_CCs][4] = {{110,0,0,0}};
#else
rx_gain_t rx_gain_mode[MAX_NUM_CCs][4] = {{max_gain,max_gain,max_gain,max_gain},{max_gain,max_gain,max_gain,max_gain}};
double tx_gain[MAX_NUM_CCs][4] = {{20,0,0,0},{20,0,0,0}};
double rx_gain[MAX_NUM_CCs][4] = {{110,0,0,0},{20,0,0,0}};
#endif
@@ -490,9 +488,6 @@ int main( int argc, char **argv ) {
lock_memory_to_ram();
get_options(uniqCfg);
EPC_MODE_ENABLED = !IS_SOFTMODEM_NOS1;
if (CONFIG_ISFLAGSET(CONFIG_ABORT) ) {
fprintf(stderr,"Getting configuration failed\n");
exit(-1);
-1
View File
@@ -46,7 +46,6 @@ static softmodem_params_t softmodem_params;
char *parallel_config=NULL;
char *worker_config=NULL;
int usrp_tx_thread = 0;
char *nfapi_str=NULL;
uint8_t nfapi_mode=0;
static mapping softmodem_funcs[] = MAPPING_SOFTMODEM_FUNCTIONS;
-1
View File
@@ -349,7 +349,6 @@ void configure_rru(void *, void *arg);
struct timespec timespec_add(struct timespec lhs, struct timespec rhs);
struct timespec timespec_sub(struct timespec lhs, struct timespec rhs);
extern uint8_t nfapi_mode;
extern int16_t vnf_pnf_sfnslot_delta;
#ifdef __cplusplus
}
#endif