remove un-necessary global variables
This commit is contained in:
@@ -69,13 +69,13 @@ typedef struct {
|
||||
|
||||
static log_mem_cnt_t log_mem_d[2];
|
||||
static int log_mem_flag = 0;
|
||||
volatile int log_mem_side=0;
|
||||
static volatile int log_mem_side = 0;
|
||||
static pthread_mutex_t log_mem_lock;
|
||||
static pthread_cond_t log_mem_notify;
|
||||
static pthread_t log_mem_thread;
|
||||
static int log_mem_file_cnt=0;
|
||||
volatile int log_mem_write_flag=0;
|
||||
volatile int log_mem_write_side=0;
|
||||
static volatile int log_mem_write_flag = 0;
|
||||
static volatile int log_mem_write_side = 0;
|
||||
static char * log_mem_filename;
|
||||
|
||||
static mapping log_level_names[] = {{"error", OAILOG_ERR},
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
|
||||
#include "common/config/config_userapi.h"
|
||||
#include "load_module_shlib.h"
|
||||
loader_data_t loader_data;
|
||||
|
||||
void loader_init(void) {
|
||||
paramdef_t LoaderParams[] = LOADER_PARAMS_DESC;
|
||||
|
||||
|
||||
@@ -32,9 +32,6 @@
|
||||
#ifndef LOAD_SHLIB_H
|
||||
#define LOAD_SHLIB_H
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
char *fname;
|
||||
int (*fptr)(void);
|
||||
@@ -68,11 +65,10 @@ typedef int(*checkverfunc_t)(char * mainexec_version, char ** shlib_version);
|
||||
/* the function array when calling load_module_shlib (farray param NULL) */
|
||||
typedef int(*getfarrayfunc_t)(loader_shlibfunc_t **funcarray);
|
||||
|
||||
#ifdef LOAD_MODULE_SHLIB_MAIN
|
||||
#define LOADER_CONFIG_PREFIX "loader"
|
||||
#define DEFAULT_PATH ""
|
||||
#define DEFAULT_MAXSHLIBS 10
|
||||
loader_data_t loader_data;
|
||||
extern loader_data_t loader_data;
|
||||
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* LOADER parameters */
|
||||
@@ -85,13 +81,8 @@ loader_data_t loader_data;
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------------*/
|
||||
#else /* LOAD_MODULE_SHLIB_MAIN */
|
||||
|
||||
extern int load_module_version_shlib(char *modname, char *version, loader_shlibfunc_t *farray, int numf, void *initfunc_arg);
|
||||
extern void * get_shlibmodule_fptr(char *modname, char *fname);
|
||||
extern loader_data_t loader_data;
|
||||
#endif /* LOAD_MODULE_SHLIB_MAIN */
|
||||
int load_module_version_shlib(char *modname, char *version, loader_shlibfunc_t *farray, int numf, void *initfunc_arg);
|
||||
void *get_shlibmodule_fptr(char *modname, char *fname);
|
||||
#define load_module_shlib(M, F, N, I) load_module_version_shlib(M, NULL, F, N, I)
|
||||
void loader_reset();
|
||||
#endif
|
||||
|
||||
@@ -434,7 +434,7 @@ typedef struct timer_elm_s {
|
||||
void itti_send_terminate_message(task_id_t task_id) {
|
||||
}
|
||||
|
||||
sem_t itti_sem_block;
|
||||
static sem_t itti_sem_block;
|
||||
void itti_wait_tasks_unblock()
|
||||
{
|
||||
int rc = sem_post(&itti_sem_block);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -78,16 +78,12 @@ extern int nfapi_sync_var;
|
||||
extern int sync_var;
|
||||
|
||||
nfapi_tx_request_pdu_t *tx_request_pdu[1023][10][10]; // [frame][subframe][max_num_pdus]
|
||||
uint8_t nr_tx_pdus[32][16][4096];
|
||||
nfapi_nr_pdu_t *tx_data_request[1023][20][10]; //[frame][slot][max_num_pdus]
|
||||
uint8_t tx_pdus[32][8][4096];
|
||||
|
||||
nfapi_ue_release_request_body_t release_rntis;
|
||||
|
||||
nfapi_nr_pnf_param_response_t g_pnf_param_resp;
|
||||
|
||||
|
||||
nfapi_pnf_p7_config_t *p7_config_g = NULL;
|
||||
static nfapi_pnf_p7_config_t *p7_config_g = NULL;
|
||||
|
||||
void *pnf_allocate(size_t size) {
|
||||
return malloc(size);
|
||||
@@ -1727,8 +1723,8 @@ int pnf_nr_sim_pack_vendor_extention_tlv(void *ve, uint8_t **ppWritePackedMsg, u
|
||||
return -1;
|
||||
}
|
||||
|
||||
nfapi_dl_config_request_t dummy_dl_config_req;
|
||||
nfapi_tx_request_t dummy_tx_req;
|
||||
static nfapi_dl_config_request_t dummy_dl_config_req;
|
||||
static nfapi_tx_request_t dummy_tx_req;
|
||||
|
||||
int start_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nfapi_start_request_t *req) {
|
||||
printf("[PNF] Received NFAPI_START_REQ phy_id:%d\n", req->header.phy_id);
|
||||
|
||||
@@ -59,10 +59,6 @@ static uint32_t rand_range(uint32_t min, uint32_t max)
|
||||
return ((rand() % (max + 1 - min)) + min);
|
||||
}
|
||||
|
||||
|
||||
|
||||
extern "C" nfapi_pnf_param_response_t g_pnf_param_resp;
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
|
||||
@@ -2068,7 +2068,7 @@ void vnf_handle_timing_info(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_p7)
|
||||
}
|
||||
}
|
||||
|
||||
int16_t vnf_pnf_sfnslot_delta;
|
||||
static int16_t vnf_pnf_sfnslot_delta;
|
||||
|
||||
void vnf_nr_handle_timing_info(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_p7)
|
||||
{
|
||||
|
||||
@@ -24,263 +24,263 @@
|
||||
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
|
||||
|
||||
// This is 4096/(1:4096) in simde__m128i format
|
||||
simde__m128i inv_ch[4096];/* = {512,512,512,512,512,512,512,512,
|
||||
256,256,256,256,256,256,256,256,
|
||||
170,170,170,170,170,170,170,170,
|
||||
128,128,128,128,128,128,128,128,
|
||||
102,102,102,102,102,102,102,102,
|
||||
85,85,85,85,85,85,85,85,
|
||||
73,73,73,73,73,73,73,73,
|
||||
64,64,64,64,64,64,64,64,
|
||||
56,56,56,56,56,56,56,56,
|
||||
51,51,51,51,51,51,51,51,
|
||||
46,46,46,46,46,46,46,46,
|
||||
42,42,42,42,42,42,42,42,
|
||||
39,39,39,39,39,39,39,39,
|
||||
36,36,36,36,36,36,36,36,
|
||||
34,34,34,34,34,34,34,34,
|
||||
32,32,32,32,32,32,32,32,
|
||||
30,30,30,30,30,30,30,30,
|
||||
28,28,28,28,28,28,28,28,
|
||||
26,26,26,26,26,26,26,26,
|
||||
25,25,25,25,25,25,25,25,
|
||||
24,24,24,24,24,24,24,24,
|
||||
23,23,23,23,23,23,23,23,
|
||||
22,22,22,22,22,22,22,22,
|
||||
21,21,21,21,21,21,21,21,
|
||||
20,20,20,20,20,20,20,20,
|
||||
19,19,19,19,19,19,19,19,
|
||||
18,18,18,18,18,18,18,18,
|
||||
18,18,18,18,18,18,18,18,
|
||||
17,17,17,17,17,17,17,17,
|
||||
17,17,17,17,17,17,17,17,
|
||||
16,16,16,16,16,16,16,16,
|
||||
16,16,16,16,16,16,16,16,
|
||||
15,15,15,15,15,15,15,15,
|
||||
15,15,15,15,15,15,15,15,
|
||||
14,14,14,14,14,14,14,14,
|
||||
14,14,14,14,14,14,14,14,
|
||||
13,13,13,13,13,13,13,13,
|
||||
13,13,13,13,13,13,13,13,
|
||||
13,13,13,13,13,13,13,13,
|
||||
12,12,12,12,12,12,12,12,
|
||||
12,12,12,12,12,12,12,12,
|
||||
12,12,12,12,12,12,12,12,
|
||||
11,11,11,11,11,11,11,11,
|
||||
11,11,11,11,11,11,11,11,
|
||||
11,11,11,11,11,11,11,11,
|
||||
11,11,11,11,11,11,11,11,
|
||||
10,10,10,10,10,10,10,10,
|
||||
10,10,10,10,10,10,10,10,
|
||||
10,10,10,10,10,10,10,10,
|
||||
10,10,10,10,10,10,10,10,
|
||||
10,10,10,10,10,10,10,10,
|
||||
9,9,9,9,9,9,9,9,
|
||||
9,9,9,9,9,9,9,9,
|
||||
9,9,9,9,9,9,9,9,
|
||||
9,9,9,9,9,9,9,9,
|
||||
9,9,9,9,9,9,9,9,
|
||||
8,8,8,8,8,8,8,8,
|
||||
8,8,8,8,8,8,8,8,
|
||||
8,8,8,8,8,8,8,8,
|
||||
8,8,8,8,8,8,8,8,
|
||||
8,8,8,8,8,8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,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
};*/
|
||||
static simde__m128i inv_ch[4096]; /* = {512,512,512,512,512,512,512,512,
|
||||
256,256,256,256,256,256,256,256,
|
||||
170,170,170,170,170,170,170,170,
|
||||
128,128,128,128,128,128,128,128,
|
||||
102,102,102,102,102,102,102,102,
|
||||
85,85,85,85,85,85,85,85,
|
||||
73,73,73,73,73,73,73,73,
|
||||
64,64,64,64,64,64,64,64,
|
||||
56,56,56,56,56,56,56,56,
|
||||
51,51,51,51,51,51,51,51,
|
||||
46,46,46,46,46,46,46,46,
|
||||
42,42,42,42,42,42,42,42,
|
||||
39,39,39,39,39,39,39,39,
|
||||
36,36,36,36,36,36,36,36,
|
||||
34,34,34,34,34,34,34,34,
|
||||
32,32,32,32,32,32,32,32,
|
||||
30,30,30,30,30,30,30,30,
|
||||
28,28,28,28,28,28,28,28,
|
||||
26,26,26,26,26,26,26,26,
|
||||
25,25,25,25,25,25,25,25,
|
||||
24,24,24,24,24,24,24,24,
|
||||
23,23,23,23,23,23,23,23,
|
||||
22,22,22,22,22,22,22,22,
|
||||
21,21,21,21,21,21,21,21,
|
||||
20,20,20,20,20,20,20,20,
|
||||
19,19,19,19,19,19,19,19,
|
||||
18,18,18,18,18,18,18,18,
|
||||
18,18,18,18,18,18,18,18,
|
||||
17,17,17,17,17,17,17,17,
|
||||
17,17,17,17,17,17,17,17,
|
||||
16,16,16,16,16,16,16,16,
|
||||
16,16,16,16,16,16,16,16,
|
||||
15,15,15,15,15,15,15,15,
|
||||
15,15,15,15,15,15,15,15,
|
||||
14,14,14,14,14,14,14,14,
|
||||
14,14,14,14,14,14,14,14,
|
||||
13,13,13,13,13,13,13,13,
|
||||
13,13,13,13,13,13,13,13,
|
||||
13,13,13,13,13,13,13,13,
|
||||
12,12,12,12,12,12,12,12,
|
||||
12,12,12,12,12,12,12,12,
|
||||
12,12,12,12,12,12,12,12,
|
||||
11,11,11,11,11,11,11,11,
|
||||
11,11,11,11,11,11,11,11,
|
||||
11,11,11,11,11,11,11,11,
|
||||
11,11,11,11,11,11,11,11,
|
||||
10,10,10,10,10,10,10,10,
|
||||
10,10,10,10,10,10,10,10,
|
||||
10,10,10,10,10,10,10,10,
|
||||
10,10,10,10,10,10,10,10,
|
||||
10,10,10,10,10,10,10,10,
|
||||
9,9,9,9,9,9,9,9,
|
||||
9,9,9,9,9,9,9,9,
|
||||
9,9,9,9,9,9,9,9,
|
||||
9,9,9,9,9,9,9,9,
|
||||
9,9,9,9,9,9,9,9,
|
||||
8,8,8,8,8,8,8,8,
|
||||
8,8,8,8,8,8,8,8,
|
||||
8,8,8,8,8,8,8,8,
|
||||
8,8,8,8,8,8,8,8,
|
||||
8,8,8,8,8,8,8,8,
|
||||
8,8,8,8,8,8,8,8,
|
||||
8,8,8,8,8,8,8,8,
|
||||
8,8,8,8,8,8,8,8,
|
||||
7,7,7,7,7,7,7,7,
|
||||
7,7,7,7,7,7,7,7,
|
||||
7,7,7,7,7,7,7,7,
|
||||
7,7,7,7,7,7,7,7,
|
||||
7,7,7,7,7,7,7,7,
|
||||
7,7,7,7,7,7,7,7,
|
||||
7,7,7,7,7,7,7,7,
|
||||
7,7,7,7,7,7,7,7,
|
||||
7,7,7,7,7,7,7,7,
|
||||
6,6,6,6,6,6,6,6,
|
||||
6,6,6,6,6,6,6,6,
|
||||
6,6,6,6,6,6,6,6,
|
||||
6,6,6,6,6,6,6,6,
|
||||
6,6,6,6,6,6,6,6,
|
||||
6,6,6,6,6,6,6,6,
|
||||
6,6,6,6,6,6,6,6,
|
||||
6,6,6,6,6,6,6,6,
|
||||
6,6,6,6,6,6,6,6,
|
||||
6,6,6,6,6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,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
};*/
|
||||
|
||||
void init_fde() {
|
||||
for (int i=1;i<4096;i++) inv_ch[i] = simde_mm_set1_epi16(4096/i);
|
||||
|
||||
@@ -29,8 +29,7 @@
|
||||
#define k1 1024
|
||||
#define k2 (1024-k1)
|
||||
|
||||
int32_t rx_power_avg_eNB[3];
|
||||
|
||||
static int32_t rx_power_avg_eNB[3];
|
||||
|
||||
void dump_I0_stats(FILE *fd,PHY_VARS_eNB *eNB) {
|
||||
|
||||
|
||||
@@ -3025,22 +3025,20 @@ inline int check_skip_dc(int rb,LTE_DL_FRAME_PARMS *frame_parms) {
|
||||
return(0);
|
||||
}
|
||||
|
||||
static uint64_t qam4_tm2_p2_0[8][16] __attribute__((aligned(32)));
|
||||
static uint64_t qam4_tm2_p2_1[8][16] __attribute__((aligned(32)));
|
||||
static uint64_t qam4_tm2_p2_b0[8][4][16] __attribute__((aligned(32)));
|
||||
static uint64_t qam4_tm2_p2_b1[8][4][16] __attribute__((aligned(32)));
|
||||
|
||||
uint64_t qam4_tm2_p2_0[8][16] __attribute__ ((aligned(32)));
|
||||
uint64_t qam4_tm2_p2_1[8][16] __attribute__ ((aligned(32)));
|
||||
uint64_t qam4_tm2_p2_b0[8][4][16] __attribute__ ((aligned(32)));
|
||||
uint64_t qam4_tm2_p2_b1[8][4][16] __attribute__ ((aligned(32)));
|
||||
|
||||
uint64_t qam16_tm2_p2_0[8][256] __attribute__ ((aligned(32)));
|
||||
uint64_t qam16_tm2_p2_1[8][256] __attribute__ ((aligned(32)));
|
||||
uint64_t qam16_tm2_p2_b0[8][4][256] __attribute__ ((aligned(32)));
|
||||
uint64_t qam16_tm2_p2_b1[8][4][256] __attribute__ ((aligned(32)));
|
||||
|
||||
uint64_t qam64_tm2_p2_0[8][4096] __attribute__ ((aligned(32)));
|
||||
uint64_t qam64_tm2_p2_1[8][4096] __attribute__ ((aligned(32)));
|
||||
uint64_t qam64_tm2_p2_b0[8][4][4096] __attribute__ ((aligned(32)));
|
||||
uint64_t qam64_tm2_p2_b1[8][4][4096] __attribute__ ((aligned(32)));
|
||||
static uint64_t qam16_tm2_p2_0[8][256] __attribute__((aligned(32)));
|
||||
static uint64_t qam16_tm2_p2_1[8][256] __attribute__((aligned(32)));
|
||||
static uint64_t qam16_tm2_p2_b0[8][4][256] __attribute__((aligned(32)));
|
||||
static uint64_t qam16_tm2_p2_b1[8][4][256] __attribute__((aligned(32)));
|
||||
|
||||
static uint64_t qam64_tm2_p2_0[8][4096] __attribute__((aligned(32)));
|
||||
static uint64_t qam64_tm2_p2_1[8][4096] __attribute__((aligned(32)));
|
||||
static uint64_t qam64_tm2_p2_b0[8][4][4096] __attribute__((aligned(32)));
|
||||
static uint64_t qam64_tm2_p2_b1[8][4][4096] __attribute__((aligned(32)));
|
||||
|
||||
void init_modulation_LUT_qam4_tm2_p2() {
|
||||
|
||||
|
||||
@@ -235,8 +235,7 @@ void init_mpdcch2ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB *eNB) {
|
||||
|
||||
extern uint8_t *generate_dci0(uint8_t *dci, uint8_t *e, uint8_t DCI_LENGTH, uint16_t coded_bits, uint16_t rnti);
|
||||
|
||||
|
||||
uint16_t mpdcch_dmrs_tab[12 * 6];
|
||||
static uint16_t mpdcch_dmrs_tab[12 * 6];
|
||||
|
||||
void init_mpdcch_dmrs_tab(uint16_t oss) {
|
||||
int re = 5 * oss;
|
||||
|
||||
@@ -41,7 +41,7 @@ const uint16_t NCS_restricted[15] = {15, 18, 22, 26, 32, 38, 46, 55, 68, 82, 100
|
||||
const uint16_t NCS_4[7] = {2, 4, 6, 8, 10, 12, 15};
|
||||
|
||||
int16_t ru[2*839]; // quantized roots of unity
|
||||
uint32_t ZC_inv[839]; // multiplicative inverse for roots u
|
||||
static uint32_t ZC_inv[839]; // multiplicative inverse for roots u
|
||||
uint16_t du[838];
|
||||
|
||||
extern PRACH_TDD_PREAMBLE_MAP tdd_preamble_map[64][7];
|
||||
|
||||
@@ -44,8 +44,7 @@ extern const uint16_t NCS_unrestricted[16];
|
||||
extern const uint16_t NCS_restricted[15];
|
||||
extern const uint16_t NCS_4[7];
|
||||
|
||||
extern int16_t ru[2*839]; // quantized roots of unity
|
||||
extern uint32_t ZC_inv[839]; // multiplicative inverse for roots u
|
||||
extern int16_t ru[2 * 839]; // quantized roots of unity
|
||||
extern uint16_t du[838];
|
||||
|
||||
|
||||
|
||||
@@ -560,7 +560,7 @@ void ulsch_channel_level(int32_t **drs_ch_estimates_ext,
|
||||
simde_m_empty();
|
||||
}
|
||||
|
||||
int ulsch_power_LUT[750];
|
||||
static int ulsch_power_LUT[750];
|
||||
|
||||
void init_ulsch_power_LUT(void) {
|
||||
int i;
|
||||
|
||||
@@ -35,22 +35,11 @@
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "transport_proto_ue.h"
|
||||
#include "openair1/PHY/LTE_TRANSPORT/dci_tools_common_extern.h"
|
||||
#include "PHY/LTE_TRANSPORT/transport_vars.h"
|
||||
|
||||
#include "assertions.h"
|
||||
|
||||
extern uint16_t RIV2nb_rb_LUT6[32];
|
||||
extern uint16_t RIV2first_rb_LUT6[32];
|
||||
extern uint16_t RIV2nb_rb_LUT25[512];
|
||||
extern uint16_t RIV2first_rb_LUT25[512];
|
||||
extern uint16_t RIV2nb_rb_LUT50[1600];
|
||||
extern uint16_t RIV2first_rb_LUT50[1600];
|
||||
extern uint16_t RIV2nb_rb_LUT100[6000];
|
||||
extern uint16_t RIV2first_rb_LUT100[600];
|
||||
|
||||
extern uint16_t RIV_max6,RIV_max25,RIV_max50,RIV_max100;
|
||||
|
||||
int8_t delta_PUSCH_msg2[8] = {-6,-4,-2,0,2,4,6,8};
|
||||
static int8_t delta_PUSCH_msg2[8] = {-6, -4, -2, 0, 2, 4, 6, 8};
|
||||
|
||||
int generate_ue_ulsch_params_from_rar(PHY_VARS_UE *ue,
|
||||
UE_rxtx_proc_t *proc,
|
||||
|
||||
@@ -873,8 +873,8 @@ static simde__m256i pucch2_11bit[2048 * 2];
|
||||
static simde__m256i *pucch2_lut[9] =
|
||||
{pucch2_3bit, pucch2_4bit, pucch2_5bit, pucch2_6bit, pucch2_7bit, pucch2_8bit, pucch2_9bit, pucch2_10bit, pucch2_11bit};
|
||||
|
||||
simde__m64 pucch2_polar_4bit[16];
|
||||
simde__m128i pucch2_polar_llr_num_lut[256],pucch2_polar_llr_den_lut[256];
|
||||
static simde__m64 pucch2_polar_4bit[16];
|
||||
static simde__m128i pucch2_polar_llr_num_lut[256], pucch2_polar_llr_den_lut[256];
|
||||
|
||||
void init_pucch2_luts() {
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ void createE1inst(E1_t type, instance_t instance, uint64_t gnb_id, e1ap_net_conf
|
||||
e1ap_inst[instance]->gtpInstF1U = -1;
|
||||
}
|
||||
|
||||
E1AP_TransactionID_t transacID[E1AP_MAX_NUM_TRANSAC_IDS] = {0};
|
||||
static E1AP_TransactionID_t transacID[E1AP_MAX_NUM_TRANSAC_IDS] = {0};
|
||||
|
||||
void e1ap_common_init() {
|
||||
srand(time(NULL));
|
||||
|
||||
+60
-46
@@ -210,7 +210,7 @@ void *eNB_app_task(void *args_p) {
|
||||
itti_mark_task_ready (TASK_ENB_APP);
|
||||
|
||||
/* Try to register each eNB */
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
register_enb_pending = eNB_app_register(enb_id_start, enb_id_end);
|
||||
}
|
||||
|
||||
@@ -248,67 +248,81 @@ void *eNB_app_task(void *args_p) {
|
||||
break;
|
||||
|
||||
case S1AP_REGISTER_ENB_CNF:
|
||||
if (EPC_MODE_ENABLED) {
|
||||
LOG_I(ENB_APP, "[eNB %ld] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
S1AP_REGISTER_ENB_CNF(msg_p).nb_mme);
|
||||
register_enb_pending--;
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
LOG_I(ENB_APP,
|
||||
"[eNB %ld] Received %s: associated MME %d\n",
|
||||
instance,
|
||||
ITTI_MSG_NAME(msg_p),
|
||||
S1AP_REGISTER_ENB_CNF(msg_p).nb_mme);
|
||||
register_enb_pending--;
|
||||
|
||||
/* Check if at least eNB is registered with one MME */
|
||||
if (S1AP_REGISTER_ENB_CNF(msg_p).nb_mme > 0) {
|
||||
registered_enb++;
|
||||
}
|
||||
/* Check if at least eNB is registered with one MME */
|
||||
if (S1AP_REGISTER_ENB_CNF(msg_p).nb_mme > 0) {
|
||||
registered_enb++;
|
||||
}
|
||||
|
||||
/* Check if all register eNB requests have been processed */
|
||||
if (register_enb_pending == 0) {
|
||||
if (registered_enb == enb_nb) {
|
||||
/* If all eNB are registered, start L2L1 task */
|
||||
MessageDef *msg_init_p;
|
||||
msg_init_p = itti_alloc_new_message (TASK_ENB_APP, 0, INITIALIZE_MESSAGE);
|
||||
itti_send_msg_to_task (TASK_L2L1, INSTANCE_DEFAULT, msg_init_p);
|
||||
} else {
|
||||
LOG_W(ENB_APP, " %d eNB not associated with a MME, retrying registration in %d seconds ...\n",
|
||||
enb_nb - registered_enb, ENB_REGISTER_RETRY_DELAY);
|
||||
/* Check if all register eNB requests have been processed */
|
||||
if (register_enb_pending == 0) {
|
||||
if (registered_enb == enb_nb) {
|
||||
/* If all eNB are registered, start L2L1 task */
|
||||
MessageDef *msg_init_p;
|
||||
msg_init_p = itti_alloc_new_message(TASK_ENB_APP, 0, INITIALIZE_MESSAGE);
|
||||
itti_send_msg_to_task(TASK_L2L1, INSTANCE_DEFAULT, msg_init_p);
|
||||
} else {
|
||||
LOG_W(ENB_APP,
|
||||
" %d eNB not associated with a MME, retrying registration in %d seconds ...\n",
|
||||
enb_nb - registered_enb,
|
||||
ENB_REGISTER_RETRY_DELAY);
|
||||
|
||||
/* Restart the eNB registration process in ENB_REGISTER_RETRY_DELAY seconds */
|
||||
if (timer_setup (ENB_REGISTER_RETRY_DELAY, 0, TASK_ENB_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT,
|
||||
NULL, &enb_register_retry_timer_id) < 0) {
|
||||
LOG_E(ENB_APP, " Can not start eNB register retry timer, use \"sleep\" instead!\n");
|
||||
sleep(ENB_REGISTER_RETRY_DELAY);
|
||||
/* Restart the registration process */
|
||||
registered_enb = 0;
|
||||
register_enb_pending = eNB_app_register(enb_id_start, enb_id_end);
|
||||
}
|
||||
/* Restart the eNB registration process in ENB_REGISTER_RETRY_DELAY seconds */
|
||||
if (timer_setup(ENB_REGISTER_RETRY_DELAY,
|
||||
0,
|
||||
TASK_ENB_APP,
|
||||
INSTANCE_DEFAULT,
|
||||
TIMER_ONE_SHOT,
|
||||
NULL,
|
||||
&enb_register_retry_timer_id)
|
||||
< 0) {
|
||||
LOG_E(ENB_APP, " Can not start eNB register retry timer, use \"sleep\" instead!\n");
|
||||
sleep(ENB_REGISTER_RETRY_DELAY);
|
||||
/* Restart the registration process */
|
||||
registered_enb = 0;
|
||||
register_enb_pending = eNB_app_register(enb_id_start, enb_id_end);
|
||||
}
|
||||
}
|
||||
} /* if (EPC_MODE_ENABLED) */
|
||||
}
|
||||
} /* if ((!IS_SOFTMODEM_NOS1)) */
|
||||
|
||||
break;
|
||||
|
||||
case S1AP_DEREGISTERED_ENB_IND:
|
||||
if (EPC_MODE_ENABLED) {
|
||||
LOG_W(ENB_APP, "[eNB %ld] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
S1AP_DEREGISTERED_ENB_IND(msg_p).nb_mme);
|
||||
/* TODO handle recovering of registration */
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
LOG_W(ENB_APP,
|
||||
"[eNB %ld] Received %s: associated MME %d\n",
|
||||
instance,
|
||||
ITTI_MSG_NAME(msg_p),
|
||||
S1AP_DEREGISTERED_ENB_IND(msg_p).nb_mme);
|
||||
/* TODO handle recovering of registration */
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TIMER_HAS_EXPIRED:
|
||||
if (EPC_MODE_ENABLED) {
|
||||
LOG_I(ENB_APP, " Received %s: timer_id %ld\n", ITTI_MSG_NAME (msg_p), TIMER_HAS_EXPIRED(msg_p).timer_id);
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
LOG_I(ENB_APP, " Received %s: timer_id %ld\n", ITTI_MSG_NAME(msg_p), TIMER_HAS_EXPIRED(msg_p).timer_id);
|
||||
|
||||
if (TIMER_HAS_EXPIRED (msg_p).timer_id == enb_register_retry_timer_id) {
|
||||
/* Restart the registration process */
|
||||
registered_enb = 0;
|
||||
register_enb_pending = eNB_app_register(enb_id_start, enb_id_end);
|
||||
}
|
||||
if (TIMER_HAS_EXPIRED(msg_p).timer_id == enb_register_retry_timer_id) {
|
||||
/* Restart the registration process */
|
||||
registered_enb = 0;
|
||||
register_enb_pending = eNB_app_register(enb_id_start, enb_id_end);
|
||||
}
|
||||
|
||||
if (TIMER_HAS_EXPIRED (msg_p).timer_id == x2_enb_register_retry_timer_id) {
|
||||
/* Restart the registration process */
|
||||
x2_registered_enb = 0;
|
||||
x2_register_enb_pending = eNB_app_register_x2 (enb_id_start, enb_id_end);
|
||||
}
|
||||
} /* if (EPC_MODE_ENABLED) */
|
||||
if (TIMER_HAS_EXPIRED(msg_p).timer_id == x2_enb_register_retry_timer_id) {
|
||||
/* Restart the registration process */
|
||||
x2_registered_enb = 0;
|
||||
x2_register_enb_pending = eNB_app_register_x2(enb_id_start, enb_id_end);
|
||||
}
|
||||
} /* if ((!IS_SOFTMODEM_NOS1)) */
|
||||
|
||||
// if(TIMER_HAS_EXPIRED (msg_p).timer_id == m2_enb_register_retry_timer_id) {
|
||||
//
|
||||
|
||||
@@ -295,7 +295,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc) {
|
||||
|
||||
if (ENBParamList.paramarray[i][ENB_ENB_ID_IDX].uptr == NULL) {
|
||||
// Calculate a default eNB ID
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if ((!IS_SOFTMODEM_NOS1)) {
|
||||
uint32_t hash;
|
||||
hash = s1ap_generate_eNB_id ();
|
||||
enb_id = i + (hash & 0xFFFF8);
|
||||
@@ -1892,7 +1892,7 @@ int RCconfig_M2(MessageDef *msg_p, uint32_t i) {
|
||||
for (k = 0; k < ENBParamList.numelt; k++) {
|
||||
if (ENBParamList.paramarray[k][ENB_ENB_ID_IDX].uptr == NULL) {
|
||||
// Calculate a default eNB ID
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if ((!IS_SOFTMODEM_NOS1)) {
|
||||
uint32_t hash;
|
||||
hash = s1ap_generate_eNB_id ();
|
||||
enb_id = k + (hash & 0xFFFF8);
|
||||
@@ -2072,7 +2072,7 @@ int RCconfig_M2(MessageDef *msg_p, uint32_t i) {
|
||||
M2AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = SCTP_OUT_STREAMS;
|
||||
M2AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = SCTP_IN_STREAMS;
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if ((!IS_SOFTMODEM_NOS1)) {
|
||||
sprintf(aprefix,"%s.[%i].%s",ENB_CONFIG_STRING_ENB_LIST,k,ENB_CONFIG_STRING_SCTP_CONFIG);
|
||||
config_get(config_get_if(), SCTPParams, sizeofArray(SCTPParams), aprefix);
|
||||
M2AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = (uint16_t)*(SCTPParams[ENB_SCTP_INSTREAMS_IDX].uptr);
|
||||
@@ -2140,7 +2140,7 @@ int RCconfig_S1(
|
||||
for (int k = 0; k < ENBParamList.numelt; k++) {
|
||||
if (ENBParamList.paramarray[k][ENB_ENB_ID_IDX].uptr == NULL) {
|
||||
// Calculate a default eNB ID
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if ((!IS_SOFTMODEM_NOS1)) {
|
||||
uint32_t hash = 0;
|
||||
hash = s1ap_generate_eNB_id();
|
||||
enb_id = k + (hash & 0xFFFF8);
|
||||
@@ -2374,7 +2374,7 @@ int RCconfig_S1(
|
||||
S1AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = SCTP_OUT_STREAMS;
|
||||
S1AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = SCTP_IN_STREAMS;
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if ((!IS_SOFTMODEM_NOS1)) {
|
||||
sprintf(aprefix,"%s.[%i].%s",ENB_CONFIG_STRING_ENB_LIST,k,ENB_CONFIG_STRING_SCTP_CONFIG);
|
||||
config_get(config_get_if(), SCTPParams, sizeofArray(SCTPParams), aprefix);
|
||||
S1AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = (uint16_t)*(SCTPParams[ENB_SCTP_INSTREAMS_IDX].uptr);
|
||||
@@ -2432,7 +2432,7 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) {
|
||||
for (k = 0; k < ENBParamList.numelt; k++) {
|
||||
if (ENBParamList.paramarray[k][ENB_ENB_ID_IDX].uptr == NULL) {
|
||||
// Calculate a default eNB ID
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if ((!IS_SOFTMODEM_NOS1)) {
|
||||
uint32_t hash;
|
||||
hash = s1ap_generate_eNB_id ();
|
||||
enb_id = k + (hash & 0xFFFF8);
|
||||
@@ -2584,7 +2584,7 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) {
|
||||
X2AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = SCTP_OUT_STREAMS;
|
||||
X2AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = SCTP_IN_STREAMS;
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if ((!IS_SOFTMODEM_NOS1)) {
|
||||
sprintf(aprefix,"%s.[%i].%s",ENB_CONFIG_STRING_ENB_LIST,k,ENB_CONFIG_STRING_SCTP_CONFIG);
|
||||
config_get(config_get_if(), SCTPParams, sizeofArray(SCTPParams), aprefix);
|
||||
X2AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = (uint16_t)*(SCTPParams[ENB_SCTP_INSTREAMS_IDX].uptr);
|
||||
@@ -2659,7 +2659,7 @@ void RCConfig(void) {
|
||||
/* get global parameters, defined outside any section in the config file */
|
||||
printf("Getting ENBSParams\n");
|
||||
config_get(config_get_if(), ENBSParams, sizeofArray(ENBSParams), NULL);
|
||||
//EPC_MODE_ENABLED = ((*ENBSParams[ENB_NOS1_IDX].uptr) == 0);
|
||||
//(!IS_SOFTMODEM_NOS1) = ((*ENBSParams[ENB_NOS1_IDX].uptr) == 0);
|
||||
RC.nb_inst = ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt;
|
||||
|
||||
if (RC.nb_inst > 0) {
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "f1ap_common.h"
|
||||
#include "f1ap_encoder.h"
|
||||
|
||||
int asn1_encoder_xer_print = 0;
|
||||
static int asn1_encoder_xer_print = 0;
|
||||
|
||||
int f1ap_encode_pdu(F1AP_F1AP_PDU_t *pdu, uint8_t **buffer, uint32_t *length) {
|
||||
ssize_t encoded;
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include "PHY_INTERFACE/phy_stub_UE.h"
|
||||
#include "common/ran_context.h"
|
||||
#include <openair2/RRC/LTE/rrc_proto.h>
|
||||
#include "executables/softmodem-common.h"
|
||||
|
||||
extern void openair_rrc_top_init_ue( int eMBMS_active, char *uecap_xer, uint8_t cba_group_active, uint8_t HO_active);
|
||||
|
||||
@@ -51,7 +52,7 @@ void dl_phy_sync_success(module_id_t module_idP, frame_t frameP, unsigned char e
|
||||
LOG_D(MAC, "[UE %d] Frame %d: PHY Sync to eNB_index %d successful \n",
|
||||
module_idP, frameP, eNB_index);
|
||||
|
||||
if (first_sync == 1 && !(EPC_MODE_ENABLED)) {
|
||||
if (first_sync == 1 && IS_SOFTMODEM_NOS1) {
|
||||
//layer2_init_UE(module_idP);
|
||||
openair_rrc_ue_init(module_idP, eNB_index);
|
||||
} else {
|
||||
|
||||
@@ -593,7 +593,7 @@ static bool allocate_dl_retransmission(module_id_t module_id,
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32_t pf_tbs[3][29]; // pre-computed, approximate TBS values for PF coefficient
|
||||
static uint32_t pf_tbs[3][29]; // pre-computed, approximate TBS values for PF coefficient
|
||||
typedef struct UEsched_s {
|
||||
float coef;
|
||||
NR_UE_info_t * UE;
|
||||
|
||||
@@ -102,8 +102,8 @@ static void nr_fill_nfapi_pucch(gNB_MAC_INST *nrmac,
|
||||
#define L1_RSRP_HYSTERIS 10 //considering 10 dBm as hysterisis for avoiding frequent SSB Beam Switching. !Fixme provide exact value if any
|
||||
//#define L1_DIFF_RSRP_STEP_SIZE 2
|
||||
|
||||
int ssb_index_sorted[MAX_NUM_SSB] = {0};
|
||||
int ssb_rsrp_sorted[MAX_NUM_SSB] = {0};
|
||||
static int ssb_index_sorted[MAX_NUM_SSB] = {0};
|
||||
static int ssb_rsrp_sorted[MAX_NUM_SSB] = {0};
|
||||
|
||||
//Measured RSRP Values Table 10.1.16.1-1 from 36.133
|
||||
//Stored all the upper limits[Max RSRP Value of corresponding index]
|
||||
|
||||
@@ -1767,7 +1767,7 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac,
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32_t ul_pf_tbs[5][29]; // pre-computed, approximate TBS values for PF coefficient
|
||||
static uint32_t ul_pf_tbs[5][29]; // pre-computed, approximate TBS values for PF coefficient
|
||||
typedef struct UEsched_s {
|
||||
float coef;
|
||||
NR_UE_info_t * UE;
|
||||
|
||||
@@ -1055,7 +1055,7 @@ bool pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
|
||||
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
|
||||
pdcpHead->rb_id = rb_id;
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
/* for the UE compiled in S1 mode, we need 1 here
|
||||
* for the UE compiled in noS1 mode, we need 0
|
||||
* TODO: be sure of this
|
||||
@@ -1070,12 +1070,12 @@ bool pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
|
||||
}
|
||||
} // nfapi_mode
|
||||
} else {
|
||||
if (UE_NAS_USE_TUN) {
|
||||
pdcpHead->inst = ctxt_pP->module_id;
|
||||
} else if (ENB_NAS_USE_TUN) {
|
||||
pdcpHead->inst = 0;
|
||||
}
|
||||
}
|
||||
if (UE_NAS_USE_TUN) {
|
||||
pdcpHead->inst = ctxt_pP->module_id;
|
||||
} else if (ENB_NAS_USE_TUN) {
|
||||
pdcpHead->inst = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
pdcpHead->rb_id = rb_id + (ctxt_pP->module_id * LTE_maxDRB);
|
||||
pdcpHead->inst = ctxt_pP->module_id;
|
||||
@@ -1275,7 +1275,7 @@ pdcp_run (
|
||||
|
||||
// IP/NAS -> PDCP traffic : TX, read the pkt from the upper layer buffer
|
||||
// if (LINK_ENB_PDCP_TO_GTPV1U && ctxt_pP->enb_flag == ENB_FLAG_NO) {
|
||||
if (!get_softmodem_params()->emulate_l1 && (!EPC_MODE_ENABLED || ctxt_pP->enb_flag == ENB_FLAG_NO)) {
|
||||
if (!get_softmodem_params()->emulate_l1 && (IS_SOFTMODEM_NOS1 || ctxt_pP->enb_flag == ENB_FLAG_NO)) {
|
||||
pdcp_fifo_read_input_sdus(ctxt_pP);
|
||||
}
|
||||
|
||||
@@ -1311,125 +1311,9 @@ pdcp_mbms_run (
|
||||
)
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
// if (ctxt_pP->enb_flag) {
|
||||
// start_meas(&eNB_pdcp_stats[ctxt_pP->module_id].pdcp_run);
|
||||
// } else {
|
||||
// start_meas(&UE_pdcp_stats[ctxt_pP->module_id].pdcp_run);
|
||||
// }
|
||||
|
||||
// pdcp_enb[ctxt_pP->module_id].sfn++; // range: 0 to 18,446,744,073,709,551,615
|
||||
// pdcp_enb[ctxt_pP->module_id].frame=ctxt_pP->frame; // 1023
|
||||
// pdcp_enb[ctxt_pP->module_id].subframe= ctxt_pP->subframe;
|
||||
// pdcp_update_stats(ctxt_pP);
|
||||
// VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_RUN, VCD_FUNCTION_IN);
|
||||
// MessageDef *msg_p;
|
||||
//int result;
|
||||
//protocol_ctxt_t ctxt;
|
||||
|
||||
// do {
|
||||
// // Checks if a message has been sent to PDCP sub-task
|
||||
// itti_poll_msg (ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE, &msg_p);
|
||||
//
|
||||
// if (msg_p != NULL) {
|
||||
// switch (ITTI_MSG_ID(msg_p)) {
|
||||
// case RRC_DCCH_DATA_REQ:
|
||||
// PROTOCOL_CTXT_SET_BY_MODULE_ID(
|
||||
// &ctxt,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).module_id,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).enb_flag,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).rnti,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).frame,
|
||||
// 0,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).eNB_index);
|
||||
// LOG_D(PDCP, PROTOCOL_CTXT_FMT"Received %s from %s: instance %d, rb_id %d, muiP %d, confirmP %d, mode %d\n",
|
||||
// PROTOCOL_CTXT_ARGS(&ctxt),
|
||||
// ITTI_MSG_NAME (msg_p),
|
||||
// ITTI_MSG_ORIGIN_NAME(msg_p),
|
||||
// ITTI_MSG_DESTINATION_INSTANCE (msg_p),
|
||||
// RRC_DCCH_DATA_REQ (msg_p).rb_id,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).muip,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).confirmp,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).mode);
|
||||
// LOG_D(PDCP, "Before calling pdcp_data_req from pdcp_run! RRC_DCCH_DATA_REQ (msg_p).rb_id: %d \n", RRC_DCCH_DATA_REQ (msg_p).rb_id);
|
||||
// result = pdcp_data_req (&ctxt,
|
||||
// SRB_FLAG_YES,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).rb_id,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).muip,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).confirmp,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).sdu_size,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).sdu_p,
|
||||
// RRC_DCCH_DATA_REQ (msg_p).mode,
|
||||
// NULL, NULL
|
||||
// );
|
||||
//
|
||||
// if (result != true)
|
||||
// LOG_E(PDCP, "PDCP data request failed!\n");
|
||||
//
|
||||
// // Message buffer has been processed, free it now.
|
||||
// result = itti_free (ITTI_MSG_ORIGIN_ID(msg_p), RRC_DCCH_DATA_REQ (msg_p).sdu_p);
|
||||
// AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
|
||||
// break;
|
||||
//
|
||||
// case RRC_PCCH_DATA_REQ: {
|
||||
// sdu_size_t sdu_buffer_sizeP;
|
||||
// sdu_buffer_sizeP = RRC_PCCH_DATA_REQ(msg_p).sdu_size;
|
||||
// uint8_t CC_id = RRC_PCCH_DATA_REQ(msg_p).CC_id;
|
||||
// uint8_t ue_index = RRC_PCCH_DATA_REQ(msg_p).ue_index;
|
||||
// RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_paging[ue_index] = sdu_buffer_sizeP;
|
||||
//
|
||||
// if (sdu_buffer_sizeP > 0) {
|
||||
// memcpy(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].paging[ue_index], RRC_PCCH_DATA_REQ(msg_p).sdu_p, sdu_buffer_sizeP);
|
||||
// }
|
||||
//
|
||||
// //paging pdcp log
|
||||
// LOG_D(PDCP, "PDCP Received RRC_PCCH_DATA_REQ CC_id %d length %d \n", CC_id, sdu_buffer_sizeP);
|
||||
// }
|
||||
// break;
|
||||
//
|
||||
// default:
|
||||
// LOG_E(PDCP, "Received unexpected message %s\n", ITTI_MSG_NAME (msg_p));
|
||||
// break;
|
||||
// }
|
||||
//
|
||||
// result = itti_free (ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
|
||||
// AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
|
||||
// }
|
||||
// } while(msg_p != NULL);
|
||||
//
|
||||
// IP/NAS -> PDCP traffic : TX, read the pkt from the upper layer buffer
|
||||
// if (LINK_ENB_PDCP_TO_GTPV1U && ctxt_pP->enb_flag == ENB_FLAG_NO) {
|
||||
//if (EPC_MODE_ENABLED || ctxt_pP->enb_flag == ENB_FLAG_NO ) {
|
||||
|
||||
pdcp_fifo_read_input_mbms_sdus_fromtun(ctxt_pP);
|
||||
//}
|
||||
|
||||
// PDCP -> NAS/IP traffic: RX
|
||||
// if (ctxt_pP->enb_flag) {
|
||||
// start_meas(&eNB_pdcp_stats[ctxt_pP->module_id].pdcp_ip);
|
||||
// } else {
|
||||
// start_meas(&UE_pdcp_stats[ctxt_pP->module_id].pdcp_ip);
|
||||
// }
|
||||
//
|
||||
|
||||
//pdcp_fifo_flush_mbms_sdus(ctxt_pP);
|
||||
|
||||
// if (ctxt_pP->enb_flag) {
|
||||
// stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].pdcp_ip);
|
||||
// } else {
|
||||
// stop_meas(&UE_pdcp_stats[ctxt_pP->module_id].pdcp_ip);
|
||||
// }
|
||||
//
|
||||
// if (ctxt_pP->enb_flag) {
|
||||
// stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].pdcp_run);
|
||||
// } else {
|
||||
// stop_meas(&UE_pdcp_stats[ctxt_pP->module_id].pdcp_run);
|
||||
// }
|
||||
//
|
||||
// VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_RUN, VCD_FUNCTION_OUT);
|
||||
pdcp_fifo_read_input_mbms_sdus_fromtun(ctxt_pP);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void pdcp_init_stats_UE(module_id_t mod, uint16_t uid) {
|
||||
Pdcp_stats_tx_window_ms[mod][uid] = 100;
|
||||
Pdcp_stats_rx_window_ms[mod][uid] = 100;
|
||||
|
||||
@@ -330,9 +330,9 @@ void *MCE_app_task(void *args_p) {
|
||||
itti_mark_task_ready (TASK_MCE_APP);
|
||||
|
||||
/* Try to register each MCE */
|
||||
if ( EPC_MODE_ENABLED && RC.rrc == NULL )
|
||||
LOG_E(RRC, "inconsistent global variables\n");
|
||||
if (EPC_MODE_ENABLED && RC.rrc ) {
|
||||
if (!IS_SOFTMODEM_NOS1 && RC.rrc == NULL)
|
||||
LOG_E(RRC, "inconsistent global variables\n");
|
||||
if (!IS_SOFTMODEM_NOS1 && RC.rrc) {
|
||||
register_mce_pending = MCE_app_register(mce_id_start, mce_id_end);
|
||||
}
|
||||
|
||||
@@ -478,10 +478,13 @@ void *MCE_app_task(void *args_p) {
|
||||
break;
|
||||
|
||||
case M3AP_DEREGISTERED_MCE_IND:
|
||||
if (EPC_MODE_ENABLED) {
|
||||
LOG_W(MCE_APP, "[MCE %ld] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
M3AP_DEREGISTERED_MCE_IND(msg_p).nb_mme);
|
||||
/* TODO handle recovering of registration */
|
||||
if ((!IS_SOFTMODEM_NOS1)) {
|
||||
LOG_W(MCE_APP,
|
||||
"[MCE %ld] Received %s: associated MME %d\n",
|
||||
instance,
|
||||
ITTI_MSG_NAME(msg_p),
|
||||
M3AP_DEREGISTERED_MCE_IND(msg_p).nb_mme);
|
||||
/* TODO handle recovering of registration */
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -46,7 +46,6 @@ extern UE_RRC_INST_NB_IoT *UE_rrc_inst_NB_IoT;
|
||||
extern eNB_RRC_INST_NB_IoT *eNB_rrc_inst_NB_IoT;
|
||||
extern PHY_Config_NB_IoT_t *config_INFO;
|
||||
|
||||
extern uint8_t DRB2LCHAN_NB_IoT[2];
|
||||
extern LTE_LogicalChannelConfig_NB_r13_t SRB1bis_logicalChannelConfig_defaultValue_NB_IoT;
|
||||
extern LTE_LogicalChannelConfig_NB_r13_t SRB1_logicalChannelConfig_defaultValue_NB_IoT;
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ static int rrc_set_state (module_id_t ue_mod_idP, Rrc_State_t state) {
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
static int rrc_set_sub_state( module_id_t ue_mod_idP, Rrc_Sub_State_t subState ) {
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
switch (UE_rrc_inst[ue_mod_idP].RrcState) {
|
||||
case RRC_STATE_INACTIVE:
|
||||
AssertFatal ((RRC_SUB_STATE_INACTIVE_FIRST <= subState) && (subState <= RRC_SUB_STATE_INACTIVE_LAST),
|
||||
@@ -546,7 +546,7 @@ static void rrc_ue_generate_RRCConnectionSetupComplete(const protocol_ctxt_t *co
|
||||
const char *nas_msg;
|
||||
int nas_msg_length;
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
nas_msg = (char *)UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.nas_data;
|
||||
nas_msg_length = UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.length;
|
||||
} else {
|
||||
@@ -760,7 +760,7 @@ rrc_ue_establish_drb(
|
||||
LOG_I(RRC,"[UE %d] Frame %d: processing RRCConnectionReconfiguration: reconfiguring DRB %ld/LCID %d\n",
|
||||
ue_mod_idP, frameP, DRB_config->drb_Identity, (int)*DRB_config->logicalChannelIdentity);
|
||||
|
||||
if(!EPC_MODE_ENABLED) {
|
||||
if (IS_SOFTMODEM_NOS1) {
|
||||
ip_addr_offset3 = 0;
|
||||
ip_addr_offset4 = 1;
|
||||
LOG_I(OIP,"[UE %d] trying to bring up the OAI interface %d, IP X.Y.%d.%d\n", ue_mod_idP, ip_addr_offset3+ue_mod_idP,
|
||||
@@ -781,7 +781,7 @@ rrc_ue_establish_drb(
|
||||
AssertFatal(false, "not implemented\n");
|
||||
LOG_D(RRC,"[UE %d] State = Attached (eNB %d)\n",ue_mod_idP,eNB_index);
|
||||
}
|
||||
} // !EPC_MODE_ENABLED
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
@@ -2919,7 +2919,7 @@ int decode_BCCH_DLSCH_Message(
|
||||
}
|
||||
|
||||
if (rrc_get_sub_state(ctxt_pP->module_id) == RRC_SUB_STATE_IDLE_SIB_COMPLETE) {
|
||||
if ((UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.nas_data != NULL) || (!EPC_MODE_ENABLED)) {
|
||||
if ((UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.nas_data != NULL) || IS_SOFTMODEM_NOS1) {
|
||||
rrc_ue_generate_RRCConnectionRequest(ctxt_pP, 0);
|
||||
rrc_set_sub_state( ctxt_pP->module_id, RRC_SUB_STATE_IDLE_CONNECTING );
|
||||
}
|
||||
@@ -3092,65 +3092,6 @@ int decode_SIB1_MBMS( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_in
|
||||
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus_MBMS = 1;
|
||||
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIB1systemInfoValueTag_MBMS = sib1_MBMS->systemInfoValueTag_r14;
|
||||
|
||||
/*
|
||||
if (EPC_MODE_ENABLED)
|
||||
{
|
||||
int cell_valid = 0;
|
||||
|
||||
if (sib1->cellAccessRelatedInfo.cellBarred == LTE_SystemInformationBlockType1__cellAccessRelatedInfo__cellBarred_notBarred) {
|
||||
int plmn;
|
||||
int plmn_number;
|
||||
plmn_number = sib1->cellAccessRelatedInfo.plmn_IdentityList.list.count;
|
||||
|
||||
for (plmn = 0; plmn < plmn_number; plmn++) {
|
||||
LTE_PLMN_Identity_t *plmn_Identity;
|
||||
plmn_Identity = &sib1->cellAccessRelatedInfo.plmn_IdentityList.list.array[plmn]->plmn_Identity;
|
||||
|
||||
if (
|
||||
(
|
||||
(plmn_Identity->mcc == NULL)
|
||||
||
|
||||
(
|
||||
(UE_rrc_inst[ctxt_pP->module_id].plmnID.MCCdigit1 == *(plmn_Identity->mcc->list.array[0])) &&
|
||||
(UE_rrc_inst[ctxt_pP->module_id].plmnID.MCCdigit2 == *(plmn_Identity->mcc->list.array[1])) &&
|
||||
(UE_rrc_inst[ctxt_pP->module_id].plmnID.MCCdigit3 == *(plmn_Identity->mcc->list.array[2]))
|
||||
)
|
||||
)
|
||||
&&
|
||||
(UE_rrc_inst[ctxt_pP->module_id].plmnID.MNCdigit1 == *(plmn_Identity->mnc.list.array[0]))
|
||||
&&
|
||||
(UE_rrc_inst[ctxt_pP->module_id].plmnID.MNCdigit2 == *(plmn_Identity->mnc.list.array[1]))
|
||||
&&
|
||||
(
|
||||
((UE_rrc_inst[ctxt_pP->module_id].plmnID.MNCdigit3 == 0xf) && (plmn_Identity->mnc.list.count == 2))
|
||||
||
|
||||
(UE_rrc_inst[ctxt_pP->module_id].plmnID.MNCdigit3 == *(plmn_Identity->mnc.list.array[2]))
|
||||
)
|
||||
) {
|
||||
MessageDef *msg_p;
|
||||
msg_p = itti_alloc_new_message(TASK_RRC_UE, 0, NAS_CELL_SELECTION_CNF);
|
||||
NAS_CELL_SELECTION_CNF (msg_p).errCode = AS_SUCCESS;
|
||||
NAS_CELL_SELECTION_CNF (msg_p).cellID = BIT_STRING_to_uint32(&sib1->cellAccessRelatedInfo.cellIdentity);
|
||||
NAS_CELL_SELECTION_CNF (msg_p).tac = BIT_STRING_to_uint16(&sib1->cellAccessRelatedInfo.trackingAreaCode);
|
||||
NAS_CELL_SELECTION_CNF (msg_p).rat = 0xFF;
|
||||
NAS_CELL_SELECTION_CNF (msg_p).rsrq = rsrq;
|
||||
NAS_CELL_SELECTION_CNF (msg_p).rsrp = rsrp;
|
||||
itti_send_msg_to_task(TASK_NAS_UE, ctxt_pP->instance, msg_p);
|
||||
cell_valid = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cell_valid == 0) {
|
||||
MessageDef *msg_p;
|
||||
msg_p = itti_alloc_new_message(TASK_RRC_UE, 0, PHY_FIND_NEXT_CELL_REQ);
|
||||
itti_send_msg_to_task(TASK_PHY_UE, ctxt_pP->instance, msg_p);
|
||||
LOG_E(RRC, "Synched with a cell, but PLMN doesn't match our SIM, the message PHY_FIND_NEXT_CELL_REQ is sent but lost in current UE implementation! \n");
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SIB1, VCD_FUNCTION_OUT );
|
||||
return 0;
|
||||
}
|
||||
@@ -3300,7 +3241,7 @@ int decode_SIB1( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,
|
||||
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus = 1;
|
||||
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIB1systemInfoValueTag = sib1->systemInfoValueTag;
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
int cell_valid = 0;
|
||||
|
||||
if (sib1->cellAccessRelatedInfo.cellBarred == LTE_SystemInformationBlockType1__cellAccessRelatedInfo__cellBarred_notBarred) {
|
||||
@@ -3962,7 +3903,7 @@ int decode_SI( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index ) {
|
||||
|
||||
// After SI is received, prepare RRCConnectionRequest
|
||||
if (UE_rrc_inst[ctxt_pP->module_id].MBMS_flag < 3) // see -Q option
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
rrc_ue_generate_RRCConnectionRequest( ctxt_pP, eNB_index );
|
||||
}
|
||||
|
||||
|
||||
@@ -59,12 +59,6 @@ rrc_init_global_param(
|
||||
DCCH_LCHAN_DESC.transport_block_size = 4;
|
||||
DCCH_LCHAN_DESC.max_transport_blocks = 16;
|
||||
DCCH_LCHAN_DESC.Delay_class = 1;
|
||||
DTCH_DL_LCHAN_DESC.transport_block_size = 52;
|
||||
DTCH_DL_LCHAN_DESC.max_transport_blocks = 20;
|
||||
DTCH_DL_LCHAN_DESC.Delay_class = 1;
|
||||
DTCH_UL_LCHAN_DESC.transport_block_size = 52;
|
||||
DTCH_UL_LCHAN_DESC.max_transport_blocks = 20;
|
||||
DTCH_UL_LCHAN_DESC.Delay_class = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
+17
-16
@@ -124,6 +124,7 @@ extern struct rrc_eNB_ue_context_s *get_first_ue_context(eNB_RRC_INST *rrc_insta
|
||||
pthread_mutex_t rrc_release_freelist;
|
||||
RRC_release_list_t rrc_release_info;
|
||||
pthread_mutex_t lock_ue_freelist;
|
||||
static uint8_t DRB2LCHAN[8];
|
||||
|
||||
void
|
||||
openair_rrc_on(
|
||||
@@ -846,7 +847,7 @@ rrc_eNB_free_UE(
|
||||
return;
|
||||
}
|
||||
|
||||
if(EPC_MODE_ENABLED) {
|
||||
if ((!IS_SOFTMODEM_NOS1)) {
|
||||
if ((ue_context_pP->ue_context.ul_failure_timer >= 20000) && (mac_eNB_get_rrc_status(enb_mod_idP, rnti) >= RRC_CONNECTED)) {
|
||||
LOG_I(RRC, "[eNB %d] S1AP_UE_CONTEXT_RELEASE_REQ sent for RNTI %x, cause 21, radio connection with ue lost\n", enb_mod_idP, rnti);
|
||||
rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ(enb_mod_idP, ue_context_pP, S1AP_CAUSE_RADIO_NETWORK,
|
||||
@@ -1031,7 +1032,7 @@ rrc_eNB_process_RRCConnectionSetupComplete(
|
||||
ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // set rrc inactivity timer when UE goes into RRC_CONNECTED
|
||||
T(T_ENB_RRC_CONNECTION_SETUP_COMPLETE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||
|
||||
if (EPC_MODE_ENABLED == 1) {
|
||||
if ((!IS_SOFTMODEM_NOS1) == 1) {
|
||||
// Forward message to S1AP layer
|
||||
rrc_eNB_send_S1AP_NAS_FIRST_REQ(ctxt_pP, ue_context_pP, rrcConnectionSetupComplete);
|
||||
} else {
|
||||
@@ -1374,7 +1375,7 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
|
||||
ue_context_pP->ue_context.Srb1.Active = 1;
|
||||
//ue_context_pP->ue_context.Srb2.Srb_info.Srb_id = 2;
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
hashtable_rc_t h_rc;
|
||||
int j;
|
||||
rrc_ue_s1ap_ids_t *rrc_ue_s1ap_ids_p = NULL;
|
||||
@@ -1450,13 +1451,13 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
|
||||
put_UE_in_freelist(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid, 0);
|
||||
return;
|
||||
}
|
||||
} /* EPC_MODE_ENABLED */
|
||||
} /* (!IS_SOFTMODEM_NOS1) */
|
||||
|
||||
/* Update RNTI in ue_context */
|
||||
ue_context_pP->ue_id_rnti = ctxt_pP->rntiMaybeUEid; // here ue_id_rnti is just a key, may be something else
|
||||
ue_context_pP->ue_context.rnti = ctxt_pP->rntiMaybeUEid;
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
uint8_t send_security_mode_command = false;
|
||||
rrc_pdcp_config_security(
|
||||
ctxt_pP,
|
||||
@@ -5109,7 +5110,7 @@ rrc_eNB_configure_rbs_handover(struct rrc_eNB_ue_context_s *ue_context_p, protoc
|
||||
|
||||
rrc_rlc_config_asn1_req(ctxt_pP, ue_context_p->ue_context.SRB_configList, (LTE_DRB_ToAddModList_t *)NULL, (LTE_DRB_ToReleaseList_t *)NULL, (LTE_PMCH_InfoList_r9_t *)NULL, 0, 0);
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
rrc_eNB_process_security (
|
||||
ctxt_pP,
|
||||
ue_context_p,
|
||||
@@ -5257,7 +5258,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
||||
LOG_D(RRC, "[eNB %d] Frame %d: Establish RLC UM Bidirectional, DRB %d Active\n",
|
||||
ctxt_pP->module_id, ctxt_pP->frame, (int)DRB_configList->list.array[i]->drb_Identity);
|
||||
|
||||
if (!EPC_MODE_ENABLED && !ENB_NAS_USE_TUN) {
|
||||
if (IS_SOFTMODEM_NOS1 && !ENB_NAS_USE_TUN) {
|
||||
LOG_I(OIP, "[eNB %d] trying to bring up the OAI interface oai%d\n",
|
||||
ctxt_pP->module_id,
|
||||
ctxt_pP->module_id);
|
||||
@@ -5276,7 +5277,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
||||
LOG_D(RRC, "[eNB %d] State = Attached (UE rnti %x module id %u)\n",
|
||||
ctxt_pP->module_id, ue_context_pP->ue_context.rnti, ue_module_id);
|
||||
} /* oip_ifup */
|
||||
} /* !EPC_MODE_ENABLED && ENB_NAS_USE_TUN*/
|
||||
} /* !(!IS_SOFTMODEM_NOS1) && ENB_NAS_USE_TUN*/
|
||||
|
||||
LOG_D(RRC,
|
||||
PROTOCOL_RRC_CTXT_UE_FMT" RRC_eNB --- MAC_CONFIG_REQ (DRB) ---> MAC_eNB\n",
|
||||
@@ -6365,7 +6366,7 @@ rrc_eNB_decode_dcch(
|
||||
/*NN: revise the condition */
|
||||
/*FK: left the condition as is for the case MME is used (S1 mode) but setting dedicated_DRB = 1 otherwise (noS1 mode) so that no second RRCReconfiguration message activationg more DRB is sent as this causes problems with the nasmesh driver.*/
|
||||
|
||||
if (EPC_MODE_ENABLED || get_softmodem_params()->emulate_l1) {
|
||||
if (!IS_SOFTMODEM_NOS1 || get_softmodem_params()->emulate_l1) {
|
||||
if (ue_context_p->ue_context.StatusRrc == RRC_RECONFIGURED) {
|
||||
dedicated_DRB = 1;
|
||||
LOG_I(RRC,
|
||||
@@ -6461,7 +6462,7 @@ rrc_eNB_decode_dcch(
|
||||
ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier);
|
||||
}
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
if (dedicated_DRB == 1) {
|
||||
// rrc_eNB_send_S1AP_E_RAB_SETUP_RESP(ctxt_pP,
|
||||
// ue_context_p,
|
||||
@@ -6538,7 +6539,7 @@ rrc_eNB_decode_dcch(
|
||||
LOG_I(RRC,"issue rrc_eNB_send_PATH_SWITCH_REQ \n");
|
||||
rrc_eNB_send_PATH_SWITCH_REQ(ctxt_pP,ue_context_p);
|
||||
}
|
||||
} /* EPC_MODE_ENABLED */
|
||||
} /* (!IS_SOFTMODEM_NOS1) */
|
||||
|
||||
break;
|
||||
|
||||
@@ -6837,7 +6838,7 @@ rrc_eNB_decode_dcch(
|
||||
ue_context_p->ue_context.does_nr = 0;
|
||||
}
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
rrc_eNB_send_S1AP_UE_CAPABILITIES_IND(ctxt_pP,
|
||||
ue_context_p,
|
||||
ul_dcch_msg);
|
||||
@@ -6875,7 +6876,7 @@ rrc_eNB_decode_dcch(
|
||||
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP,
|
||||
"[MSG] RRC UL Information Transfer \n");
|
||||
|
||||
if (EPC_MODE_ENABLED == 1) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
rrc_eNB_send_S1AP_UPLINK_NAS(ctxt_pP,
|
||||
ue_context_p,
|
||||
ul_dcch_msg);
|
||||
@@ -7264,7 +7265,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
|
||||
ue_context_p->ue_context.rnti,
|
||||
ue_context_p->ue_context.ue_release_timer_thres_s1);
|
||||
|
||||
if (EPC_MODE_ENABLED)
|
||||
if (!IS_SOFTMODEM_NOS1)
|
||||
rrc_eNB_generate_RRCConnectionRelease(ctxt_pP, ue_context_p);
|
||||
else
|
||||
removed_ue_count = add_ue_to_remove(ue_to_be_removed, removed_ue_count, ue_context_p);
|
||||
@@ -7318,7 +7319,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
|
||||
ue_context_p->ue_context.ue_release_timer_rrc = 1;
|
||||
ue_context_p->ue_context.ue_release_timer_thres_rrc = 100;
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
if (rrc_release_info.RRC_release_ctrl[release_num].flag == 4) { // if timer_s1 == 0
|
||||
rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_CPLT(ctxt_pP->module_id,
|
||||
ue_context_p->ue_context.eNB_ue_s1ap_id);
|
||||
@@ -7343,7 +7344,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
|
||||
if (rrc_ue_s1ap_ids != NULL) {
|
||||
rrc_eNB_S1AP_remove_ue_ids(RC.rrc[ctxt_pP->module_id], rrc_ue_s1ap_ids);
|
||||
}
|
||||
} /* EPC_MODE_ENABLED */
|
||||
} /* (!IS_SOFTMODEM_NOS1) */
|
||||
|
||||
rrc_release_info.RRC_release_ctrl[release_num].flag = 0;
|
||||
rrc_release_info.num_UEs--;
|
||||
|
||||
@@ -38,22 +38,12 @@
|
||||
|
||||
extern UE_RRC_INST *UE_rrc_inst;
|
||||
|
||||
|
||||
extern uint8_t DRB2LCHAN[8];
|
||||
|
||||
extern LTE_LogicalChannelConfig_t SRB1_logicalChannelConfig_defaultValue;
|
||||
extern LTE_LogicalChannelConfig_t SRB2_logicalChannelConfig_defaultValue;
|
||||
|
||||
extern int NB_UE_INST;
|
||||
extern void* bigphys_malloc(int);
|
||||
|
||||
|
||||
//uint8_t RACH_TIME_ALLOC;
|
||||
extern uint16_t RACH_FREQ_ALLOC;
|
||||
//uint8_t NB_RACH;
|
||||
extern LCHAN_DESC BCCH_LCHAN_DESC,CCCH_LCHAN_DESC,DCCH_LCHAN_DESC,DTCH_DL_LCHAN_DESC,DTCH_UL_LCHAN_DESC;
|
||||
extern MAC_MEAS_T BCCH_MEAS_TRIGGER,CCCH_MEAS_TRIGGER,DCCH_MEAS_TRIGGER,DTCH_MEAS_TRIGGER;
|
||||
extern MAC_AVG_T BCCH_MEAS_AVG,CCCH_MEAS_AVG,DCCH_MEAS_AVG, DTCH_MEAS_AVG;
|
||||
extern LCHAN_DESC CCCH_LCHAN_DESC, DCCH_LCHAN_DESC;
|
||||
|
||||
extern UE_PF_PO_t UE_PF_PO[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
|
||||
extern pthread_mutex_t ue_pf_po_mutex;
|
||||
|
||||
@@ -43,8 +43,6 @@ UE_RRC_INST *UE_rrc_inst = NULL;
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
extern uint16_t ue_id_g;
|
||||
|
||||
uint8_t DRB2LCHAN[8];
|
||||
|
||||
long logicalChannelGroup0 = 0;
|
||||
long logicalChannelSR_Mask_r9=0;
|
||||
|
||||
@@ -75,11 +73,7 @@ const LTE_LogicalChannelConfig_t SRB2_logicalChannelConfig_defaultValue = {.ul_S
|
||||
.ext1 = &logicalChannelSR_Mask_r9_ext1};
|
||||
|
||||
//CONSTANTS
|
||||
uint16_t RACH_FREQ_ALLOC;
|
||||
//uint8_t NB_RACH;
|
||||
LCHAN_DESC BCCH_LCHAN_DESC,CCCH_LCHAN_DESC,DCCH_LCHAN_DESC,DTCH_DL_LCHAN_DESC,DTCH_UL_LCHAN_DESC;
|
||||
MAC_MEAS_T BCCH_MEAS_TRIGGER,CCCH_MEAS_TRIGGER,DCCH_MEAS_TRIGGER,DTCH_MEAS_TRIGGER;
|
||||
MAC_AVG_T BCCH_MEAS_AVG, CCCH_MEAS_AVG,DCCH_MEAS_AVG, DTCH_MEAS_AVG;
|
||||
LCHAN_DESC CCCH_LCHAN_DESC, DCCH_LCHAN_DESC;
|
||||
|
||||
// only used for RRC connection re-establishment procedure TS36.331 5.3.7
|
||||
// [0]: current C-RNTI, [1]: prior C-RNTI
|
||||
|
||||
@@ -93,7 +93,7 @@ int opt_enabled=0;
|
||||
//static unsigned char g_PDUBuffer[1600];
|
||||
//static unsigned int g_PDUOffset;
|
||||
|
||||
FILE *file_fd = NULL;
|
||||
static FILE *file_fd = NULL;
|
||||
const pcap_hdr_t file_header = {
|
||||
0xa1b2c3d4, /* magic number */
|
||||
2,
|
||||
@@ -120,7 +120,7 @@ typedef struct {
|
||||
struct sockaddr_in address;
|
||||
} opt_listener_t;
|
||||
|
||||
opt_listener_t opt_listener;
|
||||
static opt_listener_t opt_listener;
|
||||
|
||||
unsigned short checksum(unsigned short *ptr, int length) {
|
||||
int sum = 0;
|
||||
|
||||
@@ -49,8 +49,7 @@
|
||||
|
||||
static int indent = 0;
|
||||
|
||||
|
||||
x2ap_eNB_internal_data_t x2ap_eNB_internal_data;
|
||||
static x2ap_eNB_internal_data_t x2ap_eNB_internal_data;
|
||||
|
||||
RB_GENERATE(x2ap_enb_map, x2ap_eNB_data_s, entry, x2ap_eNB_compare_assoc_id);
|
||||
|
||||
|
||||
+55
-52
@@ -232,7 +232,7 @@ void *MME_app_task(void *args_p) {
|
||||
|
||||
/* Try to register each MCE */
|
||||
// This assumes that node_type of all RRC instances is the same
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
//register_mce_pending = MCE_app_register(RC.rrc[0]->node_type, mce_id_start, mce_id_end);
|
||||
}
|
||||
|
||||
@@ -264,41 +264,41 @@ void *MME_app_task(void *args_p) {
|
||||
break;
|
||||
|
||||
case M3AP_REGISTER_MCE_CNF: //M3AP_REGISTER_MCE_CNF debería
|
||||
//AssertFatal(!NODE_IS_DU(RC.rrc[0]->node_type), "Should not have received S1AP_REGISTER_ENB_CNF\n");
|
||||
// if (EPC_MODE_ENABLED) {
|
||||
// LOG_I(MME_APP, "[MCE %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
// M3AP_REGISTER_MCE_CNF(msg_p).nb_mme);
|
||||
// DevAssert(register_mce_pending > 0);
|
||||
// register_mce_pending--;
|
||||
// AssertFatal(!NODE_IS_DU(RC.rrc[0]->node_type), "Should not have received S1AP_REGISTER_ENB_CNF\n");
|
||||
// if ((!IS_SOFTMODEM_NOS1)) {
|
||||
// LOG_I(MME_APP, "[MCE %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
// M3AP_REGISTER_MCE_CNF(msg_p).nb_mme);
|
||||
// DevAssert(register_mce_pending > 0);
|
||||
// register_mce_pending--;
|
||||
|
||||
// /* Check if at least MCE is registered with one MME */
|
||||
// if (M3AP_REGISTER_MCE_CNF(msg_p).nb_mme > 0) {
|
||||
// registered_mce++;
|
||||
// }
|
||||
// /* Check if at least MCE is registered with one MME */
|
||||
// if (M3AP_REGISTER_MCE_CNF(msg_p).nb_mme > 0) {
|
||||
// registered_mce++;
|
||||
// }
|
||||
|
||||
// /* Check if all register MCE requests have been processed */
|
||||
// if (register_mce_pending == 0) {
|
||||
// if (registered_mce == mce_nb) {
|
||||
// /* If all MCE are registered, start L2L1 task */
|
||||
// // MessageDef *msg_init_p;
|
||||
// // msg_init_p = itti_alloc_new_message (TASK_ENB_APP, 0, INITIALIZE_MESSAGE);
|
||||
// // itti_send_msg_to_task (TASK_L2L1, INSTANCE_DEFAULT, msg_init_p);
|
||||
// } else {
|
||||
// LOG_W(MME_APP, " %d MCE not associated with a MME, retrying registration in %d seconds ...\n",
|
||||
// mce_nb - registered_mce, MCE_REGISTER_RETRY_DELAY);
|
||||
// /* Check if all register MCE requests have been processed */
|
||||
// if (register_mce_pending == 0) {
|
||||
// if (registered_mce == mce_nb) {
|
||||
// /* If all MCE are registered, start L2L1 task */
|
||||
// // MessageDef *msg_init_p;
|
||||
// // msg_init_p = itti_alloc_new_message (TASK_ENB_APP, 0, INITIALIZE_MESSAGE);
|
||||
// // itti_send_msg_to_task (TASK_L2L1, INSTANCE_DEFAULT, msg_init_p);
|
||||
// } else {
|
||||
// LOG_W(MME_APP, " %d MCE not associated with a MME, retrying registration in %d seconds ...\n",
|
||||
// mce_nb - registered_mce, MCE_REGISTER_RETRY_DELAY);
|
||||
|
||||
// /* Restart the MCE registration process in MCE_REGISTER_RETRY_DELAY seconds */
|
||||
// if (timer_setup (MCE_REGISTER_RETRY_DELAY, 0, TASK_MME_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT,
|
||||
// NULL, &mce_register_retry_timer_id) < 0) {
|
||||
// LOG_E(MME_APP, " Can not start MCE register retry timer, use \"sleep\" instead!\n");
|
||||
// sleep(MCE_REGISTER_RETRY_DELAY);
|
||||
// /* Restart the registration process */
|
||||
// registered_mce = 0;
|
||||
// register_mce_pending = MCE_app_register (RC.rrc[0]->node_type,mce_id_start, mce_id_end);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// } /* if (EPC_MODE_ENABLED) */
|
||||
// /* Restart the MCE registration process in MCE_REGISTER_RETRY_DELAY seconds */
|
||||
// if (timer_setup (MCE_REGISTER_RETRY_DELAY, 0, TASK_MME_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT,
|
||||
// NULL, &mce_register_retry_timer_id) < 0) {
|
||||
// LOG_E(MME_APP, " Can not start MCE register retry timer, use \"sleep\" instead!\n");
|
||||
// sleep(MCE_REGISTER_RETRY_DELAY);
|
||||
// /* Restart the registration process */
|
||||
// registered_mce = 0;
|
||||
// register_mce_pending = MCE_app_register (RC.rrc[0]->node_type,mce_id_start, mce_id_end);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// } /* if ((!IS_SOFTMODEM_NOS1)) */
|
||||
|
||||
break;
|
||||
|
||||
@@ -345,32 +345,35 @@ void *MME_app_task(void *args_p) {
|
||||
// break;
|
||||
|
||||
case M3AP_DEREGISTERED_MCE_IND: //M3AP_DEREGISTERED_MCE_IND debería
|
||||
if (EPC_MODE_ENABLED) {
|
||||
LOG_W(MME_APP, "[MCE %ld] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
M3AP_DEREGISTERED_MCE_IND(msg_p).nb_mme);
|
||||
/* TODO handle recovering of registration */
|
||||
if (!IS_SOFTMODEM_NOS1) {
|
||||
LOG_W(MME_APP,
|
||||
"[MCE %ld] Received %s: associated MME %d\n",
|
||||
instance,
|
||||
ITTI_MSG_NAME(msg_p),
|
||||
M3AP_DEREGISTERED_MCE_IND(msg_p).nb_mme);
|
||||
/* TODO handle recovering of registration */
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TIMER_HAS_EXPIRED:
|
||||
//if (EPC_MODE_ENABLED) {
|
||||
// LOG_I(MME_APP, " Received %s: timer_id %ld\n", ITTI_MSG_NAME (msg_p), TIMER_HAS_EXPIRED(msg_p).timer_id);
|
||||
// if ((!IS_SOFTMODEM_NOS1)) {
|
||||
// LOG_I(MME_APP, " Received %s: timer_id %ld\n", ITTI_MSG_NAME (msg_p), TIMER_HAS_EXPIRED(msg_p).timer_id);
|
||||
|
||||
// if (TIMER_HAS_EXPIRED (msg_p).timer_id == mce_register_retry_timer_id) {
|
||||
// /* Restart the registration process */
|
||||
// registered_mce = 0;
|
||||
// //register_mce_pending = MCE_app_register (RC.rrc[0]->node_type, mce_id_start, mce_id_end);
|
||||
// }
|
||||
// if (TIMER_HAS_EXPIRED (msg_p).timer_id == mce_register_retry_timer_id) {
|
||||
// /* Restart the registration process */
|
||||
// registered_mce = 0;
|
||||
// //register_mce_pending = MCE_app_register (RC.rrc[0]->node_type, mce_id_start, mce_id_end);
|
||||
// }
|
||||
|
||||
// //if (TIMER_HAS_EXPIRED (msg_p).timer_id == x2_mce_register_retry_timer_id) {
|
||||
// // /* Restart the registration process */
|
||||
// // x2_registered_mce = 0;
|
||||
// // x2_register_mce_pending = MCE_app_register_x2 (mce_id_start, mce_id_end);
|
||||
// //}
|
||||
//} /* if (EPC_MODE_ENABLED) */
|
||||
if(TIMER_HAS_EXPIRED(msg_p).timer_id == m3_mme_register_session_start_timer_id){
|
||||
MME_app_send_m3ap_session_start_req(0);
|
||||
// //if (TIMER_HAS_EXPIRED (msg_p).timer_id == x2_mce_register_retry_timer_id) {
|
||||
// // /* Restart the registration process */
|
||||
// // x2_registered_mce = 0;
|
||||
// // x2_register_mce_pending = MCE_app_register_x2 (mce_id_start, mce_id_end);
|
||||
// //}
|
||||
//} /* if ((!IS_SOFTMODEM_NOS1)) */
|
||||
if (TIMER_HAS_EXPIRED(msg_p).timer_id == m3_mme_register_session_start_timer_id) {
|
||||
MME_app_send_m3ap_session_start_req(0);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "queue.h"
|
||||
#include "tree.h"
|
||||
|
||||
ngap_gNB_internal_data_t ngap_gNB_internal_data;
|
||||
static ngap_gNB_internal_data_t ngap_gNB_internal_data;
|
||||
|
||||
RB_GENERATE(ngap_amf_map, ngap_gNB_amf_data_s, entry, ngap_gNB_compare_assoc_id);
|
||||
|
||||
|
||||
@@ -63,8 +63,6 @@
|
||||
#include "oaisim_mme_test_s1c.h"
|
||||
#endif
|
||||
|
||||
s1ap_eNB_config_t s1ap_config;
|
||||
|
||||
static int s1ap_eNB_generate_s1_setup_request(
|
||||
s1ap_eNB_instance_t *instance_p, s1ap_eNB_mme_data_t *s1ap_mme_data_p);
|
||||
|
||||
|
||||
@@ -46,15 +46,6 @@ typedef enum s1ap_timer_type_s {
|
||||
S1AP_TIMER_TYPE_MAX,
|
||||
} s1ap_timer_type_t;
|
||||
|
||||
typedef struct s1ap_eNB_config_s {
|
||||
// MME related params
|
||||
unsigned char mme_enabled; ///< MME enabled ?
|
||||
} s1ap_eNB_config_t;
|
||||
|
||||
extern s1ap_eNB_config_t s1ap_config;
|
||||
|
||||
#define EPC_MODE_ENABLED s1ap_config.mme_enabled
|
||||
|
||||
void *s1ap_eNB_process_itti_msg(void*);
|
||||
void s1ap_eNB_init(void);
|
||||
void *s1ap_eNB_task(void *arg);
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#include "s1ap_eNB_defs.h"
|
||||
#include "s1ap_eNB.h"
|
||||
|
||||
s1ap_eNB_internal_data_t s1ap_eNB_internal_data;
|
||||
static s1ap_eNB_internal_data_t s1ap_eNB_internal_data;
|
||||
|
||||
RB_GENERATE(s1ap_mme_map, s1ap_eNB_mme_data_s, entry, s1ap_eNB_compare_assoc_id);
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ class gtpEndPoints {
|
||||
}
|
||||
};
|
||||
|
||||
gtpEndPoints globGtp;
|
||||
static gtpEndPoints globGtp;
|
||||
|
||||
// note TEid 0 is reserved for specific usage: echo req/resp, error and supported extensions
|
||||
static teid_t gtpv1uNewTeid(void) {
|
||||
|
||||
Reference in New Issue
Block a user