Commit fb465455 authored by frtabu's avatar frtabu

Fix corrupted LOGs in L1L2simulator, introducing two new components NFAPI_VNF...

Fix corrupted LOGs in L1L2simulator, introducing two new components NFAPI_VNF and NFAPI_pnf. Integrate Fujitsu fix for up to 50 UEs. Apply astyle to all modified files in the branch
parent f3dc8d44
......@@ -303,8 +303,8 @@ void log_getconfig(log_t *g_log) {
logparams_dump[i].numelt = 0;
}
config_get( logparams_debug,(sizeof(log_maskmap)/sizeof(mapping)) - 1 ,CONFIG_STRING_LOG_PREFIX);
config_get( logparams_dump,(sizeof(log_maskmap)/sizeof(mapping)) - 1 ,CONFIG_STRING_LOG_PREFIX);
config_get( logparams_debug,(sizeof(log_maskmap)/sizeof(mapping)) - 1,CONFIG_STRING_LOG_PREFIX);
config_get( logparams_dump,(sizeof(log_maskmap)/sizeof(mapping)) - 1,CONFIG_STRING_LOG_PREFIX);
config_check_unknown_cmdlineopt(CONFIG_STRING_LOG_PREFIX);
/* set the debug mask according to the debug parameters values */
......@@ -385,7 +385,6 @@ int logInit (void) {
register_log_component("OCG","",OCG);
register_log_component("PERF","",PERF);
register_log_component("OIP","",OIP);
register_log_component("CLI","",CLI);
register_log_component("MSC","log",MSC);
register_log_component("OCM","log",OCM);
register_log_component("HW","",HW);
......@@ -408,6 +407,8 @@ int logInit (void) {
register_log_component("X2AP","",X2AP);
register_log_component("LOADER","log",LOADER);
register_log_component("ASN","log",ASN);
register_log_component("NFAPI_PNF","log",NFAPI_PNF);
register_log_component("NFAPI_VNF","log",NFAPI_VNF);
for (int i=0 ; log_level_names[i].name != NULL ; i++)
g_log->level2string[i] = toupper(log_level_names[i].name[0]); // uppercased first letter of level name
......@@ -438,7 +439,7 @@ char *log_getthreadname(char *threadname, int bufsize) {
static int log_header(char *log_buffer, int buffsize, int comp, int level,const char *format) {
char threadname[PR_SET_NAME];
return snprintf(log_buffer, buffsize , "%s%s[%s]%c %s %s%s",
return snprintf(log_buffer, buffsize, "%s%s[%s]%c %s %s%s",
log_level_highlight_end[level],
( (g_log->flag & FLAG_NOCOLOR)?"":log_level_highlight_start[level]),
g_log->log_component[comp].name,
......@@ -452,11 +453,17 @@ void logRecord_mt(const char *file, const char *func, int line, int comp, int le
char log_buffer[MAX_LOG_TOTAL];
va_list args;
va_start(args, format);
log_header(log_buffer,MAX_LOG_TOTAL ,comp, level,format);
log_header(log_buffer,MAX_LOG_TOTAL,comp, level,format);
g_log->log_component[comp].vprint(g_log->log_component[comp].stream,log_buffer, args);
va_end(args);
}
void vlogRecord_mt(const char *file, const char *func, int line, int comp, int level, const char *format, va_list args ) {
char log_buffer[MAX_LOG_TOTAL];
log_header(log_buffer,MAX_LOG_TOTAL,comp, level,format);
g_log->log_component[comp].vprint(g_log->log_component[comp].stream,log_buffer, args);
}
void log_dump(int component, void *buffer, int buffsize,int datatype, const char *format, ... ) {
va_list args;
char *wbuf;
......@@ -474,7 +481,7 @@ void log_dump(int component, void *buffer, int buffsize,int datatype, const char
if (wbuf != NULL) {
va_start(args, format);
int pos=log_header(wbuf,MAX_LOG_TOTAL ,component, OAILOG_INFO,"");
int pos=log_header(wbuf,MAX_LOG_TOTAL,component, OAILOG_INFO,"");
int pos2=vsprintf(wbuf+pos,format, args);
pos=pos+pos2;
va_end(args);
......
......@@ -198,7 +198,6 @@ typedef enum {
NAS,
PERF,
OIP,
CLI,
MSC,
OCM,
UDP_,
......@@ -218,6 +217,8 @@ typedef enum {
X2AP,
LOADER,
ASN,
NFAPI_VNF,
NFAPI_PNF,
MAX_LOG_PREDEF_COMPONENTS,
}
comp_name_t;
......@@ -286,6 +287,7 @@ extern "C" {
int logInit (void);
int isLogInitDone (void);
void logRecord_mt(const char *file, const char *func, int line,int comp, int level, const char *format, ...) __attribute__ ((format (printf, 6, 7)));
void vlogRecord_mt(const char *file, const char *func, int line, int comp, int level, const char *format, va_list args );
void log_dump(int component, void *buffer, int buffsize,int datatype, const char *format, ... );
int set_log(int component, int level);
void set_glog(int level);
......@@ -365,9 +367,9 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
# define LOG_I(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_INFO ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ;} else { T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x)) ;}} while (0)
# define LOG_D(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_DEBUG ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_DEBUG, x) ;} else { T(T_LEGACY_ ## c ## _DEBUG, T_PRINTF(x)) ;}} while (0)
# define LOG_T(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_TRACE ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_TRACE, x) ;} else { T(T_LEGACY_ ## c ## _TRACE, T_PRINTF(x)) ;}} while (0)
# define VLOG(c,l, f, args) do { if (T_stdout) { if( g_log->log_component[c].level >= l ) vlogRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, l, f, args) ;} } while (0)
/* macro used to dump a buffer or a message as in openair2/RRC/LTE/RRC_eNB.c, replaces LOG_F macro */
# define LOG_DUMPMSG(c, f, b, s, x...) do { if(g_log->dump_mask & f) log_dump(c, b, s, LOG_DUMP_CHAR, x) ;} while (0) /* */
# define nfapi_log(FILE, FNC, LN, COMP, LVL, F...) do { if (T_stdout) { logRecord_mt(__FILE__, __FUNCTION__, __LINE__,COMP, LVL, F) ;}} while (0) /* */
/* bitmask dependant macros, to isolate debugging code */
# define LOG_DEBUGFLAG(D) (g_log->debug_mask & D)
......
......@@ -800,6 +800,47 @@ ID = LEGACY_SIM_TRACE
GROUP = ALL:LEGACY_SIM:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
ID = LEGACY_NFAPI_VNF_INFO
DESC = NFAPI_VNF legacy logs - info level
GROUP = ALL:LEGACY_NFAPI_VNF:LEGACY_GROUP_INFO:LEGACY
FORMAT = string,log
ID = LEGACY_NFAPI_VNF_ERROR
DESC = NFAPI_VNF legacy logs - error level
GROUP = ALL:LEGACY_NFAPI_VNF:LEGACY_GROUP_ERROR:LEGACY
FORMAT = string,log
ID = LEGACY_NFAPI_VNF_WARNING
DESC = NFAPI_VNF legacy logs - warning level
GROUP = ALL:LEGACY_NFAPI_VNF:LEGACY_GROUP_WARNING:LEGACY
FORMAT = string,log
ID = LEGACY_NFAPI_VNF_DEBUG
DESC = NFAPI_VNF legacy logs - debug level
GROUP = ALL:LEGACY_NFAPI_VNF:LEGACY_GROUP_DEBUG:LEGACY
FORMAT = string,log
ID = LEGACY_NFAPI_VNF_TRACE
DESC = NFAPI_VNF legacy logs - trace level
GROUP = ALL:LEGACY_NFAPI_VNF:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
ID = LEGACY_NFAPI_PNF_INFO
DESC = NFAPI_PNF legacy logs - info level
GROUP = ALL:LEGACY_NFAPI_PNF:LEGACY_GROUP_INFO:LEGACY
FORMAT = string,log
ID = LEGACY_NFAPI_PNF_ERROR
DESC = NFAPI_PNF legacy logs - error level
GROUP = ALL:LEGACY_NFAPI_PNF:LEGACY_GROUP_ERROR:LEGACY
FORMAT = string,log
ID = LEGACY_NFAPI_PNF_WARNING
DESC = NFAPI_PNF legacy logs - warning level
GROUP = ALL:LEGACY_NFAPI_PNF:LEGACY_GROUP_WARNING:LEGACY
FORMAT = string,log
ID = LEGACY_NFAPI_PNF_DEBUG
DESC = NFAPI_PNF legacy logs - debug level
GROUP = ALL:LEGACY_NFAPI_PNF:LEGACY_GROUP_DEBUG:LEGACY
FORMAT = string,log
ID = LEGACY_NFAPI_PNF_TRACE
DESC = NFAPI_PNF legacy logs - trace level
GROUP = ALL:LEGACY_NFAPI_PNF:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
# this is a bad hack but I won't fix (function util_print_hex_octets
# in openairinterface5g/openair2/LAYER2/PDCP_v10.1.0/pdcp_util.c
# does funky things with the LOG_x macros but we work on the C pre-processor
......@@ -845,27 +886,7 @@ ID = LEGACY_componentP_TRACE
GROUP = ALL:LEGACY_componentP:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
#needed?
ID = LEGACY_CLI_INFO
DESC = CLI legacy logs - info level
GROUP = ALL:LEGACY_CLI:LEGACY_GROUP_INFO:LEGACY
FORMAT = string,log
ID = LEGACY_CLI_ERROR
DESC = CLI legacy logs - error level
GROUP = ALL:LEGACY_CLI:LEGACY_GROUP_ERROR:LEGACY
FORMAT = string,log
ID = LEGACY_CLI_WARNING
DESC = CLI legacy logs - warning level
GROUP = ALL:LEGACY_CLI:LEGACY_GROUP_WARNING:LEGACY
FORMAT = string,log
ID = LEGACY_CLI_DEBUG
DESC = CLI legacy logs - debug level
GROUP = ALL:LEGACY_CLI:LEGACY_GROUP_DEBUG:LEGACY
FORMAT = string,log
ID = LEGACY_CLI_TRACE
DESC = CLI legacy logs - trace level
GROUP = ALL:LEGACY_CLI:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
#################
#### UE LOGS ####
......
This diff is collapsed.
......@@ -606,7 +606,7 @@ void vnf_deallocate(void *ptr) {
void vnf_trace(nfapi_trace_level_t nfapi_level, const char *message, ...) {
va_list args;
va_start(args, message);
nfapi_log("FILE>", "FUNC", 999, PHY, nfapitooai_level(nfapi_level), message, args);
VLOG( NFAPI_VNF, nfapitooai_level(nfapi_level), message, args);
va_end(args);
}
......
......@@ -147,6 +147,7 @@ int netlink_init_tun(void) {
nas_msg_rx.msg_iov = &nas_iov_rx;
nas_msg_rx.msg_iovlen = 1;
} /* for */
return 1;
}
......
......@@ -34,7 +34,7 @@
#define EMU_PROTO_H_
void init_bypass (void);
void bypass_init ( unsigned int (*tx_handlerP) (unsigned char,char*, unsigned int*, unsigned int*),unsigned int (*rx_handlerP) (unsigned char,char*,unsigned int));
void bypass_init ( unsigned int (*tx_handlerP) (unsigned char,char *, unsigned int *, unsigned int *),unsigned int (*rx_handlerP) (unsigned char,char *,unsigned int));
int bypass_rx_data(unsigned int frame, unsigned int last_slot,
unsigned int next_slot, uint8_t is_master);
void bypass_signal_mac_phy(unsigned int frame, unsigned int last_slot,
......@@ -43,7 +43,7 @@ void bypass_tx_data (emu_transport_info_t Type, unsigned int frame, unsigned int
void emulation_tx_rx(void);
unsigned int emul_tx_handler(unsigned char Mode,char *Tx_buffer,unsigned int* Nbytes,unsigned int *Nb_flows);
unsigned int emul_tx_handler(unsigned char Mode,char *Tx_buffer,unsigned int *Nbytes,unsigned int *Nb_flows);
unsigned int emul_rx_handler(unsigned char Mode,char *rx_buffer, unsigned int Nbytes);
unsigned int emul_rx_data(void);
......
......@@ -80,8 +80,7 @@ int config_check_band_frequencies( int ind,
int16_t band,
uint32_t downlink_frequency,
int32_t uplink_frequency_offset,
uint32_t frame_type)
{
uint32_t frame_type) {
int errors = 0;
if (band > 0) {
......@@ -90,21 +89,18 @@ int config_check_band_frequencies( int ind,
for (band_index = 0; band_index < sizeof (eutra_bands) / sizeof (eutra_bands[0]); band_index++) {
if (band == eutra_bands[band_index].band) {
uint32_t uplink_frequency = downlink_frequency + uplink_frequency_offset;
AssertError (eutra_bands[band_index].dl_min < downlink_frequency, errors ++,
"enb %d downlink frequency %u too low (%u) for band %d!",
ind, downlink_frequency, eutra_bands[band_index].dl_min, band);
AssertError (downlink_frequency < eutra_bands[band_index].dl_max, errors ++,
"enb %d downlink frequency %u too high (%u) for band %d!",
ind, downlink_frequency, eutra_bands[band_index].dl_max, band);
AssertError (eutra_bands[band_index].ul_min < uplink_frequency, errors ++,
"enb %d uplink frequency %u too low (%u) for band %d!",
ind, uplink_frequency, eutra_bands[band_index].ul_min, band);
AssertError (uplink_frequency < eutra_bands[band_index].ul_max, errors ++,
"enb %d uplink frequency %u too high (%u) for band %d!",
ind, uplink_frequency, eutra_bands[band_index].ul_max, band);
AssertError (eutra_bands[band_index].frame_type == frame_type, errors ++,
"enb %d invalid frame type (%d/%d) for band %d!",
ind, eutra_bands[band_index].frame_type, frame_type, band);
......@@ -112,7 +108,6 @@ int config_check_band_frequencies( int ind,
}
}
return errors;
}
......@@ -87,28 +87,21 @@ static void configure_phy(module_id_t enb_id, const Enb_properties_array_t* enb_
*/
/*------------------------------------------------------------------------------*/
static void configure_rrc(uint32_t enb_id)
{
static void configure_rrc(uint32_t enb_id) {
MessageDef *msg_p = NULL;
// int CC_id;
msg_p = itti_alloc_new_message (TASK_ENB_APP, RRC_CONFIGURATION_REQ);
if (RC.rrc[enb_id]) {
RCconfig_RRC(msg_p,enb_id, RC.rrc[enb_id]);
LOG_I(ENB_APP,"Sending configuration message to RRC task\n");
itti_send_msg_to_task (TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
}
else AssertFatal(0,"RRC context for eNB %d not allocated\n",enb_id);
} else AssertFatal(0,"RRC context for eNB %d not allocated\n",enb_id);
}
/*------------------------------------------------------------------------------*/
static uint32_t eNB_app_register(uint32_t enb_id_start, uint32_t enb_id_end)//, const Enb_properties_array_t *enb_properties)
{
static uint32_t eNB_app_register(uint32_t enb_id_start, uint32_t enb_id_end) { //, const Enb_properties_array_t *enb_properties)
uint32_t enb_id;
MessageDef *msg_p;
uint32_t register_enb_pending = 0;
......@@ -117,17 +110,13 @@ static uint32_t eNB_app_register(uint32_t enb_id_start, uint32_t enb_id_end)//,
{
/* note: there is an implicit relationship between the data structure and the message name */
msg_p = itti_alloc_new_message (TASK_ENB_APP, S1AP_REGISTER_ENB_REQ);
RCconfig_S1(msg_p, enb_id);
if (enb_id == 0) RCconfig_gtpu();
LOG_I(ENB_APP,"default drx %d\n",((S1AP_REGISTER_ENB_REQ(msg_p)).default_drx));
LOG_I(ENB_APP,"[eNB %d] eNB_app_register for instance %d\n", enb_id, ENB_MODULE_ID_TO_INSTANCE(enb_id));
itti_send_msg_to_task (TASK_S1AP, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
register_enb_pending++;
}
}
......@@ -137,22 +126,16 @@ static uint32_t eNB_app_register(uint32_t enb_id_start, uint32_t enb_id_end)//,
/*------------------------------------------------------------------------------*/
static uint32_t eNB_app_register_x2(uint32_t enb_id_start, uint32_t enb_id_end)
{
static uint32_t eNB_app_register_x2(uint32_t enb_id_start, uint32_t enb_id_end) {
uint32_t enb_id;
MessageDef *msg_p;
uint32_t register_enb_x2_pending = 0;
for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) {
{
msg_p = itti_alloc_new_message (TASK_ENB_APP, X2AP_REGISTER_ENB_REQ);
RCconfig_X2(msg_p, enb_id);
itti_send_msg_to_task (TASK_X2AP, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
register_enb_x2_pending++;
}
}
......@@ -161,8 +144,7 @@ static uint32_t eNB_app_register_x2(uint32_t enb_id_start, uint32_t enb_id_end)
}
/*------------------------------------------------------------------------------*/
void *eNB_app_task(void *args_p)
{
void *eNB_app_task(void *args_p) {
uint32_t enb_nb = RC.nb_inst;
uint32_t enb_id_start = 0;
uint32_t enb_id_end = enb_id_start + enb_nb;
......@@ -178,15 +160,10 @@ void *eNB_app_task(void *args_p)
int result;
/* for no gcc warnings */
(void)instance;
itti_mark_task_ready (TASK_ENB_APP);
LOG_I(PHY, "%s() Task ready initialise structures\n", __FUNCTION__);
RCconfig_L1();
RCconfig_macrlc();
LOG_I(PHY, "%s() RC.nb_L1_inst:%d\n", __FUNCTION__, RC.nb_L1_inst);
if (RC.nb_L1_inst>0) AssertFatal(l1_north_init_eNB()==0,"could not initialize L1 north interface\n");
......@@ -194,14 +171,12 @@ void *eNB_app_task(void *args_p)
AssertFatal (enb_nb <= RC.nb_inst,
"Number of eNB is greater than eNB defined in configuration file (%d/%d)!",
enb_nb, RC.nb_inst);
LOG_I(ENB_APP,"Allocating eNB_RRC_INST for %d instances\n",RC.nb_inst);
RC.rrc = (eNB_RRC_INST **)malloc(RC.nb_inst*sizeof(eNB_RRC_INST *));
LOG_I(PHY, "%s() RC.nb_inst:%d RC.rrc:%p\n", __FUNCTION__, RC.nb_inst, RC.rrc);
for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) {
RC.rrc[enb_id] = (eNB_RRC_INST*)malloc(sizeof(eNB_RRC_INST));
RC.rrc[enb_id] = (eNB_RRC_INST *)malloc(sizeof(eNB_RRC_INST));
LOG_I(PHY, "%s() Creating RRC instance RC.rrc[%d]:%p (%d of %d)\n", __FUNCTION__, enb_id, RC.rrc[enb_id], enb_id+1, enb_id_end);
memset((void *)RC.rrc[enb_id],0,sizeof(eNB_RRC_INST));
configure_rrc(enb_id);
......@@ -220,7 +195,6 @@ void *eNB_app_task(void *args_p)
do {
// Wait for a message
itti_receive_msg (TASK_ENB_APP, &msg_p);
instance = ITTI_MSG_INSTANCE (msg_p);
switch (ITTI_MSG_ID(msg_p)) {
......@@ -241,7 +215,6 @@ void *eNB_app_task(void *args_p)
if (EPC_MODE_ENABLED) {
LOG_I(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
S1AP_REGISTER_ENB_CNF(msg_p).nb_mme);
DevAssert(register_enb_pending > 0);
register_enb_pending--;
......@@ -255,10 +228,8 @@ void *eNB_app_task(void *args_p)
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, 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);
......@@ -267,7 +238,6 @@ void *eNB_app_task(void *args_p)
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;
......@@ -283,9 +253,9 @@ void *eNB_app_task(void *args_p)
if (EPC_MODE_ENABLED) {
LOG_W(ENB_APP, "[eNB %d] 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:
......@@ -304,19 +274,18 @@ void *eNB_app_task(void *args_p)
x2_register_enb_pending = eNB_app_register_x2 (enb_id_start, enb_id_end);
}
} /* if (EPC_MODE_ENABLED) */
break;
case X2AP_DEREGISTERED_ENB_IND:
LOG_W(ENB_APP, "[eNB %d] Received %s: associated eNB %d\n", instance, ITTI_MSG_NAME (msg_p),
X2AP_DEREGISTERED_ENB_IND(msg_p).nb_x2);
/* TODO handle recovering of registration */
break;
case X2AP_REGISTER_ENB_CNF:
LOG_I(ENB_APP, "[eNB %d] Received %s: associated eNB %d\n", instance, ITTI_MSG_NAME (msg_p),
X2AP_REGISTER_ENB_CNF(msg_p).nb_x2);
DevAssert(x2_register_enb_pending > 0);
x2_register_enb_pending--;
......@@ -329,19 +298,17 @@ void *eNB_app_task(void *args_p)
if (x2_register_enb_pending == 0) {
if (x2_registered_enb == enb_nb) {
/* If all eNB are registered, start RRC HO task */
}else {
} else {
uint32_t x2_not_associated = enb_nb - x2_registered_enb;
LOG_W(ENB_APP, " %d eNB %s not associated with the target\n",
x2_not_associated, x2_not_associated > 1 ? "are" : "is");
// timer to retry
/* Restart the eNB registration process in ENB_REGISTER_RETRY_DELAY seconds */
if (timer_setup (X2AP_ENB_REGISTER_RETRY_DELAY, 0, TASK_ENB_APP,
INSTANCE_DEFAULT, TIMER_ONE_SHOT, NULL,
&x2_enb_register_retry_timer_id) < 0) {
LOG_E(ENB_APP, " Can not start eNB X2AP register: retry timer, use \"sleep\" instead!\n");
sleep(X2AP_ENB_REGISTER_RETRY_DELAY);
/* Restart the registration process */
x2_registered_enb = 0;
......@@ -364,12 +331,10 @@ void *eNB_app_task(void *args_p)
return NULL;
}
void handle_reconfiguration(module_id_t mod_id)
{
void handle_reconfiguration(module_id_t mod_id) {
struct timespec start, end;
clock_gettime(CLOCK_MONOTONIC, &start);
flexran_agent_info_t *flexran = RC.flexran[mod_id];
LOG_I(ENB_APP, "lte-softmodem soft-restart requested\n");
if (ENB_WAIT == flexran->node_ctrl_state) {
......@@ -392,8 +357,10 @@ void handle_reconfiguration(module_id_t mod_id)
LOG_I(ENB_APP, " * eNB %d: Waiting for FlexRAN RTController command *\n", mod_id);
pthread_mutex_lock(&flexran->mutex_node_ctrl);
flexran->node_ctrl_state = ENB_WAIT;
while (ENB_NORMAL_OPERATION != flexran->node_ctrl_state)
pthread_cond_wait(&flexran->cond_node_ctrl, &flexran->mutex_node_ctrl);
pthread_mutex_unlock(&flexran->mutex_node_ctrl);
}
......@@ -405,11 +372,13 @@ void handle_reconfiguration(module_id_t mod_id)
clock_gettime(CLOCK_MONOTONIC, &end);
end.tv_sec -= start.tv_sec;
if (end.tv_nsec >= start.tv_nsec) {
end.tv_nsec -= start.tv_nsec;
} else {
end.tv_sec -= 1;
end.tv_nsec = end.tv_nsec - start.tv_nsec + 1000000000;
}
LOG_I(ENB_APP, "lte-softmodem restart succeeded in %ld.%ld s\n", end.tv_sec, end.tv_nsec / 1000000);
}
This diff is collapsed.
......@@ -45,14 +45,12 @@
#include "common/ran_context.h"
extern FILL_UL_INFO_MUTEX_t fill_ul_mutex;
extern uint8_t nfapi_mode;
extern void openair_rrc_top_init_ue( int eMBMS_active, char* uecap_xer, uint8_t cba_group_active, uint8_t HO_active);
extern void openair_rrc_top_init_ue( int eMBMS_active, char *uecap_xer, uint8_t cba_group_active, uint8_t HO_active);
void dl_phy_sync_success(module_id_t module_idP, frame_t frameP, unsigned char eNB_index, uint8_t first_sync) //init as MR
{
void dl_phy_sync_success(module_id_t module_idP, frame_t frameP, unsigned char eNB_index, uint8_t first_sync) { //init as MR
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)) {
//layer2_init_UE(module_idP);
openair_rrc_ue_init(module_idP, eNB_index);
......@@ -63,34 +61,26 @@ void dl_phy_sync_success(module_id_t module_idP, frame_t frameP, unsigned char e
void
mac_UE_out_of_sync_ind(module_id_t module_idP, frame_t frameP,
uint16_t eNB_index)
{
uint16_t eNB_index) {
// Mac_rlc_xface->mac_out_of_sync_ind(Mod_id, frameP, eNB_index);
}
int
mac_top_init_ue(int eMBMS_active, char *uecap_xer,
uint8_t cba_group_active, uint8_t HO_active)
{
uint8_t cba_group_active, uint8_t HO_active) {
int i;
LOG_I(MAC, "[MAIN] Init function start:Nb_UE_INST=%d\n", NB_UE_INST);
if (NB_UE_INST > 0) {
UE_mac_inst =
(UE_MAC_INST *) malloc16(NB_UE_INST * sizeof(UE_MAC_INST));
AssertFatal(UE_mac_inst != NULL,
"[MAIN] Can't ALLOCATE %zu Bytes for %d UE_MAC_INST with size %zu \n",
NB_UE_INST * sizeof(UE_MAC_INST), NB_UE_INST,
sizeof(UE_MAC_INST));
LOG_D(MAC, "[MAIN] ALLOCATE %zu Bytes for %d UE_MAC_INST @ %p\n",
NB_UE_INST * sizeof(UE_MAC_INST), NB_UE_INST, UE_mac_inst);
bzero(UE_mac_inst, NB_UE_INST * sizeof(UE_MAC_INST));
for (i = 0; i < NB_UE_INST; i++) {
......@@ -101,7 +91,7 @@ mac_top_init_ue(int eMBMS_active, char *uecap_xer,
}
// mutex below are used for multiple UE's L2 FAPI simulation.
if (nfapi_mode == 3){
if (nfapi_mode == 3) {
pthread_mutex_init(&fill_ul_mutex.rx_mutex,NULL);
pthread_mutex_init(&fill_ul_mutex.crc_mutex,NULL);
pthread_mutex_init(&fill_ul_mutex.sr_mutex,NULL);
......@@ -113,18 +103,11 @@ mac_top_init_ue(int eMBMS_active, char *uecap_xer,
LOG_I(MAC, "[MAIN] calling RRC\n");
openair_rrc_top_init_ue(eMBMS_active, uecap_xer, cba_group_active,
HO_active);
LOG_I(MAC, "[MAIN][INIT] Init function finished\n");
return (0);
}
int rlcmac_init_global_param_ue(void)
{
int rlcmac_init_global_param_ue(void) {
LOG_I(MAC, "[MAIN] CALLING RLC_MODULE_INIT...\n");
if (rlc_module_init() != 0) {
......@@ -132,20 +115,16 @@ int rlcmac_init_global_param_ue(void)
}
pdcp_layer_init();
LOG_I(MAC, "[MAIN] Init Global Param Done\n");
return 0;
}
int
l2_init_ue(int eMBMS_active, char *uecap_xer, uint8_t cba_group_active,
uint8_t HO_active)
{
uint8_t HO_active) {
LOG_I(MAC, "[MAIN] MAC_INIT_GLOBAL_PARAM IN...\n");
// NB_NODE=2;
// NB_INST=2;
rlcmac_init_global_param_ue();
LOG_I(MAC, "[MAIN] init UE MAC functions \n");
mac_top_init_ue(eMBMS_active, uecap_xer, cba_group_active, HO_active);
......
......@@ -179,13 +179,14 @@ boolean_t pdcp_data_req(
if (pdcp_pdu_p != NULL) {
memcpy(&pdcp_pdu_p->data[0], sdu_buffer_pP, sdu_buffer_sizeP);
if( LOG_DEBUGFLAG(DEBUG_PDCP) ) {
rlc_util_print_hex_octets(PDCP,
(unsigned char *)&pdcp_pdu_p->data[0],
sdu_buffer_sizeP);
LOG_UI(PDCP, "Before rlc_data_req 1, srb_flagP: %d, rb_idP: %d \n", srb_flagP, rb_idP);
}
rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_YES, rb_idP, muiP, confirmP, sdu_buffer_sizeP, pdcp_pdu_p
,NULL, NULL
);
......@@ -442,7 +443,6 @@ pdcp_data_ind(
uint8_t oo_flag=0;
MessageDef *message_p = NULL;
uint8_t *gtpu_buffer_p = NULL;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_IN);
LOG_DUMPMSG(PDCP,DEBUG_PDCP,(char *)sdu_buffer_pP->data,sdu_buffer_sizeP,
"[MSG] PDCP UL %s PDU on rb_id %d\n", (srb_flagP)? "CONTROL" : "DATA", rb_idP);
......@@ -473,7 +473,7 @@ pdcp_data_ind(
LOG_D(PDCP, "Data indication notification for PDCP entity from UE %x to eNB %u "
"and radio bearer ID %d rlc sdu size %d ctxt_pP->enb_flag %d\n",
ctxt_pP->rnti,
ctxt_pP->module_id ,
ctxt_pP->module_id,
rb_idP,
sdu_buffer_sizeP,
ctxt_pP->enb_flag);
......@@ -723,7 +723,6 @@ pdcp_data_ind(
itti_send_msg_to_task(TASK_GTPV1_U, INSTANCE_DEFAULT, message_p);
packet_forwarded = TRUE;
}
} else {
packet_forwarded = FALSE;
}
......@@ -762,6 +761,7 @@ pdcp_data_ind(
// set ((pdcp_data_ind_header_t *) new_sdu_p->data)->inst for IP layer here
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
((pdcp_data_ind_header_t *) new_sdu_p->data)->rb_id = rb_id;
if (EPC_MODE_ENABLED) {
/* for the UE compiled in S1 mode, we need 1 here
* for the UE compiled in noS1 mode, we need 0
......@@ -769,16 +769,18 @@ pdcp_data_ind(
*/
if (nfapi_mode == 3) {
#ifdef UESIM_EXPANSION
if (UE_NAS_USE_TUN) {
((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = ctxt_pP->module_id;
((pdcp_data_ind_header_t *) new_sdu_p->data)->inst = ctxt_pP->module_id;
} else {
((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = 0;
((pdcp_data_ind_header_t *) new_sdu_p->data)->inst = 0;
}
#else
((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = ctxt_pP->module_id;
((pdcp_data_ind_header_t *) new_sdu_p->data)->inst = ctxt_pP->module_id;
#endif
} else {
((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = 1;
((pdcp_data_ind_header_t *) new_sdu_p->data)->inst = 1;
}
}
} else {
......@@ -822,12 +824,13 @@ pdcp_data_ind(
Pdcp_stats_rx_bytes_tmp_w[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]+=(sdu_buffer_sizeP - payload_offset);
Pdcp_stats_rx_sn[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]=sequence_number;
if (oo_flag == 1 ){
if (oo_flag == 1 ) {
Pdcp_stats_rx_outoforder[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]++;
} else {
LOG_E(PDCP, PROTOCOL_PDCP_CTXT_FMT" PDCP_DATA_IND SDU DROPPED, OUT OF ORDER \n",
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p));
}
Pdcp_stats_rx_aiat[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]+= (pdcp_enb[ctxt_pP->module_id].sfn - Pdcp_stats_rx_iat[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]);
Pdcp_stats_rx_aiat_tmp_w[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]+=(pdcp_enb[ctxt_pP->module_id].sfn - Pdcp_stats_rx_iat[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]);
Pdcp_stats_rx_iat[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]=pdcp_enb[ctxt_pP->module_id].sfn;
......@@ -1129,7 +1132,6 @@ rrc_pdcp_config_asn1_req (
int i,j;
LTE_MBMS_SessionInfoList_r9_t *mbms_SessionInfoList_r9_p = NULL;
LTE_MBMS_SessionInfo_r9_t *MBMS_SessionInfo_p = NULL;
LOG_T(PDCP, PROTOCOL_CTXT_FMT" %s() SRB2ADD %p DRB2ADD %p DRB2RELEASE %p\n",
PROTOCOL_CTXT_ARGS(ctxt_pP),
__FUNCTION__,
......@@ -1419,7 +1421,6 @@ rrc_pdcp_config_asn1_req (
}
}
if (pmch_InfoList_r9_pP != NULL) {
for (i=0; i<pmch_InfoList_r9_pP->list.count; i++) {
mbms_SessionInfoList_r9_p = &(pmch_InfoList_r9_pP->list.array[i]->mbms_SessionInfoList_r9);
......@@ -1893,6 +1894,7 @@ uint64_t pdcp_module_init( uint64_t pdcp_optmask ) {
netlink_init();
}
}
return pdcp_params.optmask ;
}
......@@ -1937,7 +1939,6 @@ void pdcp_layer_init(void)
int i,j;
mbms_session_id_t session_id;
mbms_service_id_t service_id;
/*
* Initialize SDU list
*/
......@@ -1946,7 +1947,6 @@ void pdcp_layer_init(void)
AssertFatal(pdcp_coll_p != NULL, "UNRECOVERABLE error, PDCP hashtable_create failed");
for (instance = 0; instance < MAX_MOBILES_PER_ENB; instance++) {
for (service_id = 0; service_id < LTE_maxServiceCount; service_id++) {
for (session_id = 0; session_id < LTE_maxSessionPerPMCH; session_id++) {
memset(&pdcp_mbms_array_ue[instance][service_id][session_id], 0, sizeof(pdcp_mbms_t));
......
......@@ -35,8 +35,8 @@
# define __PDCP_H__
//-----------------------------------------------------------------------------
#ifndef NON_ACCESS_STRATUM
#include "UTIL/MEM/mem_block.h"
#include "UTIL/LISTS/list.h"
#include "UTIL/MEM/mem_block.h"
#include "UTIL/LISTS/list.h"
#endif //NON_ACCESS_STRATUM
//-----------------------------------------------------------------------------
#include "RRC/LTE/rrc_defs.h"
......@@ -47,8 +47,8 @@
#include "LTE_SRB-ToAddMod.h"
#include "LTE_SRB-ToAddModList.h"
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
#include "LTE_MBMS-SessionInfoList-r9.h"
#include "LTE_PMCH-InfoList-r9.h"
#include "LTE_MBMS-SessionInfoList-r9.h"
#include "LTE_PMCH-InfoList-r9.h"
#endif
#define PDCP_USE_NETLINK_BIT (1<< 11)
......@@ -108,7 +108,7 @@ uint32_t Pdcp_stats_rx_aiat_tmp_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_iat[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_outoforder[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX];
void pdcp_update_perioidical_stats(const protocol_ctxt_t* const ctxt_pP);
void pdcp_update_perioidical_stats(const protocol_ctxt_t *const ctxt_pP);
/*Packet Probing for agent PDCP*/
......@@ -237,19 +237,19 @@ typedef struct pdcp_mbms_s {
* @ingroup _pdcp
*/
boolean_t pdcp_data_req(
protocol_ctxt_t* ctxt_pP,
protocol_ctxt_t *ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_id,
const mui_t muiP,
const confirm_t confirmP, \
const sdu_size_t sdu_buffer_size,
unsigned char* const sdu_buffer,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t mode
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,const uint32_t * const sourceL2Id
,const uint32_t * const destinationL2Id
,const uint32_t *const sourceL2Id
,const uint32_t *const destinationL2Id
#endif
);
);
/*! \fn boolean_t pdcp_data_ind(const protocol_ctxt_t* const, srb_flag_t, MBMS_flag_t, rb_id_t, sdu_size_t, mem_block_t*, boolean_t)
* \brief This functions handles data transfer indications coming from RLC
......@@ -265,12 +265,12 @@ boolean_t pdcp_data_req(
* @ingroup _pdcp
*/
boolean_t pdcp_data_ind(
const protocol_ctxt_t* const ctxt_pP,
const protocol_ctxt_t *const ctxt_pP,
const srb_flag_t srb_flagP,
const MBMS_flag_t MBMS_flagP,
const rb_id_t rb_id,
const sdu_size_t sdu_buffer_size,
mem_block_t* const sdu_buffer);
mem_block_t *const sdu_buffer);
/*! \fn void rrc_pdcp_config_req(const protocol_ctxt_t* const ,uint32_t,rb_id_t,uint8_t)
* \brief This functions initializes relevant PDCP entity
......@@ -283,7 +283,7 @@ boolean_t pdcp_data_ind(
* @ingroup _pdcp
*/
void rrc_pdcp_config_req (
const protocol_ctxt_t* const ctxt_pP,
const protocol_ctxt_t *const ctxt_pP,
const srb_flag_t srb_flagP,
const uint32_t actionP,
const rb_id_t rb_idP,
......@@ -304,7 +304,7 @@ void rrc_pdcp_config_req (
* \return A status about the processing, OK or error code.
*/
boolean_t rrc_pdcp_config_asn1_req (
const protocol_ctxt_t* const ctxt_pP,
const protocol_ctxt_t *const ctxt_pP,
LTE_SRB_ToAddModList_t *const srb2add_list,
LTE_DRB_ToAddModList_t *const drb2add_list,
LTE_DRB_ToReleaseList_t *const drb2release_list,
......@@ -316,7 +316,7 @@ boolean_t rrc_pdcp_config_asn1_req (
,LTE_PMCH_InfoList_r9_t *pmch_InfoList_r9
#endif
,rb_id_t *const defaultDRB
);
);
/*! \fn boolean_t pdcp_config_req_asn1 (const protocol_ctxt_t* const ctxt_pP, srb_flag_t srb_flagP, uint32_t action, rb_id_t rb_id, uint8_t rb_sn, uint8_t rb_report, uint16_t header_compression_profile, uint8_t security_mode)
* \brief Function for RRC to configure a Radio Bearer.
......@@ -339,7 +339,7 @@ boolean_t rrc_pdcp_config_asn1_req (
* \return A status about the processing, OK or error code.
*/
boolean_t pdcp_config_req_asn1 (
const protocol_ctxt_t* const ctxt_pP,
const protocol_ctxt_t *const ctxt_pP,
pdcp_t *const pdcp_pP,
const srb_flag_t srb_flagP,
const rlc_mode_t rlc_mode,
......@@ -360,7 +360,7 @@ boolean_t pdcp_config_req_asn1 (
* \param[in] ctxt_pP Running context.
* \return A status about the processing, OK or error code.
*/
void pdcp_add_UE(const protocol_ctxt_t* const ctxt_pP);
void pdcp_add_UE(const protocol_ctxt_t *const ctxt_pP);
/*! \fn boolean_t pdcp_remove_UE(const protocol_ctxt_t* const ctxt_pP)
* \brief Function for RRC to remove UE from PDCP module hashtable
......@@ -368,7 +368,7 @@ void pdcp_add_UE(const protocol_ctxt_t* const ctxt_pP);
* \return A status about the processing, OK or error code.
*/
boolean_t pdcp_remove_UE(
const protocol_ctxt_t* const ctxt_pP);
const protocol_ctxt_t *const ctxt_pP);
/*! \fn void rrc_pdcp_config_release( const protocol_ctxt_t* const, rb_id_t)
* \brief This functions is unused
......@@ -388,7 +388,7 @@ boolean_t pdcp_remove_UE(
* @ingroup _pdcp
*/
void pdcp_run (
const protocol_ctxt_t* const ctxt_pP);
const protocol_ctxt_t *const ctxt_pP);
uint64_t pdcp_module_init (uint64_t pdcp_optmask);
void pdcp_module_cleanup (void);
void pdcp_layer_init (void);
......@@ -396,10 +396,10 @@ void pdcp_layer_cleanup (void);
#define PDCP2NW_DRIVER_FIFO 21
#define NW_DRIVER2PDCP_FIFO 22
int pdcp_fifo_flush_sdus ( const protocol_ctxt_t* const ctxt_pP);
int pdcp_fifo_read_input_sdus_remaining_bytes ( const protocol_ctxt_t* const ctxt_pP);
int pdcp_fifo_read_input_sdus ( const protocol_ctxt_t* const ctxt_pP);
void pdcp_fifo_read_input_sdus_from_otg ( const protocol_ctxt_t* const ctxt_pP);
int pdcp_fifo_flush_sdus ( const protocol_ctxt_t *const ctxt_pP);
int pdcp_fifo_read_input_sdus_remaining_bytes ( const protocol_ctxt_t *const ctxt_pP);
int pdcp_fifo_read_input_sdus ( const protocol_ctxt_t *const ctxt_pP);
void pdcp_fifo_read_input_sdus_from_otg ( const protocol_ctxt_t *const ctxt_pP);
//-----------------------------------------------------------------------------
......@@ -506,8 +506,8 @@ rnti_t pdcp_UE_UE_module_id_to_rnti[MAX_MOBILES_PER_ENB];
rnti_t pdcp_eNB_UE_instance_to_rnti[MAX_MOBILES_PER_ENB]; // for noS1 mode
unsigned int pdcp_eNB_UE_instance_to_rnti_index;
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
pdcp_mbms_t pdcp_mbms_array_ue[MAX_MOBILES_PER_ENB][LTE_maxServiceCount][LTE_maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
pdcp_mbms_t pdcp_mbms_array_eNB[NUMBER_OF_eNB_MAX][LTE_maxServiceCount][LTE_maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
pdcp_mbms_t pdcp_mbms_array_ue[MAX_MOBILES_PER_ENB][LTE_maxServiceCount][LTE_maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
pdcp_mbms_t pdcp_mbms_array_eNB[NUMBER_OF_eNB_MAX][LTE_maxServiceCount][LTE_maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
#endif
sdu_size_t pdcp_output_sdu_bytes_to_write;
sdu_size_t pdcp_output_header_bytes_to_write;
......
......@@ -259,14 +259,12 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
}
} else if (pc5s_header->traffic_type == TRAFFIC_PC5S_SIGNALLING) { //if containing PC5-S message -> send to other UE
LOG_D(PDCP,"Received PC5-S message ... send to the other UE\n");
LOG_D(PDCP,"Received PC5-S message, traffic_type: %d)\n", pc5s_header->traffic_type);
LOG_D(PDCP,"Received PC5-S message, rbid: %d)\n", pc5s_header->rb_id);
LOG_D(PDCP,"Received PC5-S message, data_size: %d)\n", pc5s_header->data_size);
LOG_D(PDCP,"Received PC5-S message, inst: %d)\n", pc5s_header->inst);
LOG_D(PDCP,"Received PC5-S message,sourceL2Id: 0x%08x\n)\n", pc5s_header->sourceL2Id);
LOG_D(PDCP,"Received PC5-S message,destinationL1Id: 0x%08x\n)\n", pc5s_header->destinationL2Id);
#ifdef OAI_EMU
// overwrite function input parameters, because only one netlink socket for all instances
......@@ -430,7 +428,6 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
}
}
while ((len > 0) && (rlc_data_req_flag !=0)) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ, 1 );
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ_BUFFER, 1 );
......@@ -495,7 +492,6 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
//#warning "TO DO CORRCT VALUES FOR ue mod id, enb mod id"
ctxt.frame = ctxt_cpy.frame;
ctxt.enb_flag = ctxt_cpy.enb_flag;
LOG_D(PDCP, "[PDCP][NETLINK] pdcp_read_header_g.rb_id = %d, source L2Id = 0x%08x, destination L2Id = 0x%08x \n", pdcp_read_header_g.rb_id, pdcp_read_header_g.sourceL2Id,
pdcp_read_header_g.destinationL2Id);
......@@ -621,7 +617,6 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
if (h_rc == HASH_TABLE_OK) {
rab_id = pdcp_p->rb_id;
LOG_D(PDCP, "[FRAME %5u][UE][NETLINK][IP->PDCP] INST %d: Received socket with length %d (nlmsg_len = %zu) on Rab %d \n",
ctxt.frame,
pdcp_read_header_g.inst,
......@@ -636,7 +631,6 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
ctxt.module_id,
ctxt.rnti,
rab_id);
MSC_LOG_RX_MESSAGE(
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE,
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_IP_ENB:MSC_IP_UE,
......
......@@ -43,7 +43,7 @@
/* Bugfix for version of GCC = 4.4.3 (Ubuntu 10.04) */
#if GCC_VERSION <= 40403
# include <sys/socket.h>
#include <sys/socket.h>
#endif
#include <linux/netlink.h>
......@@ -93,13 +93,11 @@ pdcp_netlink_init(
)
//-----------------------------------------------------------------------------
{
int i;
int nb_inst_enb;
int nb_inst_ue;
pthread_attr_t attr;
struct sched_param sched_param;
reset_meas(&ip_pdcp_stats_tmp);
nb_inst_enb = 1;
nb_inst_ue = 1;
......@@ -108,8 +106,8 @@ pdcp_netlink_init(
nb_inst_enb = 0;
LOG_I(PDCP, "[NETLINK] Creating 0 queues for eNB Netlink -> PDCP communication\n");
} else {
/* #warning " LG: When there will be handover in, there will problems because dim is based on local nums of ues" */
pdcp_netlink_queue_enb = calloc(nb_inst_enb, sizeof(struct lfds611_queue_state*));
/* #warning " LG: When there will be handover in, there will problems because dim is based on local nums of ues" */
pdcp_netlink_queue_enb = calloc(nb_inst_enb, sizeof(struct lfds611_queue_state *));
pdcp_netlink_nb_element_enb = malloc(nb_inst_enb * sizeof(uint32_t));
LOG_I(PDCP, "[NETLINK] Creating %d queues for eNB Netlink -> PDCP communication\n", nb_inst_enb);
......@@ -123,11 +121,9 @@ pdcp_netlink_init(
}
}
if (nb_inst_ue > 0) {
pdcp_netlink_queue_ue = calloc(nb_inst_ue, sizeof(struct lfds611_queue_state*));
pdcp_netlink_queue_ue = calloc(nb_inst_ue, sizeof(struct lfds611_queue_state *));
pdcp_netlink_nb_element_ue = malloc(nb_inst_ue * sizeof(uint32_t));
LOG_I(PDCP, "[NETLINK] Creating %d queues for UE Netlink -> PDCP communication\n", nb_inst_ue);
for (i = 0; i < nb_inst_ue; i++) {
......@@ -148,7 +144,6 @@ pdcp_netlink_init(
}
sched_param.sched_priority = 10;
pthread_attr_setschedpolicy(&attr, SCHED_RR);
pthread_attr_setschedparam(&attr, &sched_param);
......@@ -171,21 +166,21 @@ pdcp_netlink_init(
//-----------------------------------------------------------------------------
int
pdcp_netlink_dequeue_element(
const protocol_ctxt_t* const ctxt_pP,
struct pdcp_netlink_element_s** data_ppP
const protocol_ctxt_t *const ctxt_pP,
struct pdcp_netlink_element_s **data_ppP
)
//-----------------------------------------------------------------------------
{
int ret = 0;
if (ctxt_pP->enb_flag) {
ret = lfds611_queue_dequeue(pdcp_netlink_queue_enb[ctxt_pP->module_id], (void**)data_ppP);
ret = lfds611_queue_dequeue(pdcp_netlink_queue_enb[ctxt_pP->module_id], (void **)data_ppP);
if (ret != 0) {
LOG_D(PDCP,"[NETLINK]De-queueing packet for eNB instance %d\n", ctxt_pP->module_id);
}
} else {
ret = lfds611_queue_dequeue(pdcp_netlink_queue_ue[ctxt_pP->module_id], (void**)data_ppP);
ret = lfds611_queue_dequeue(pdcp_netlink_queue_ue[ctxt_pP->module_id], (void **)data_ppP);
if (ret != 0) {
LOG_D(PDCP, "[NETLINK]De-queueing packet for UE instance %d\n", ctxt_pP->module_id);
......@@ -209,8 +204,8 @@ void *pdcp_netlink_thread_fct(void *arg)
memset(nl_rx_buf, 0, NL_MAX_PAYLOAD);
LOG_I(PDCP, "[NETLINK_THREAD] binding to fd %d\n",nas_sock_fd);
MSC_START_USE();
while (1) {
while (1) {
len = recvmsg(nas_sock_fd, &nas_msg_rx, 0);
if (len == 0) {
......@@ -267,7 +262,6 @@ void *pdcp_netlink_thread_fct(void *arg)
}
LOG_I(PDCP,"[NETLINK_THREAD] IP->PDCP : En-queueing packet for eNB module id %d\n", module_id);
/* Enqueue the element in the right queue */
lfds611_queue_guaranteed_enqueue(pdcp_netlink_queue_enb[module_id], new_data_p);
stop_meas(&ip_pdcp_stats_tmp);
......@@ -280,7 +274,6 @@ void *pdcp_netlink_thread_fct(void *arg)
}
LOG_I(PDCP,"[NETLINK_THREAD] IP->PDCP : En-queueing packet for UE module id %d\n", module_id);
/* Enqueue the element in the right queue */
lfds611_queue_guaranteed_enqueue(pdcp_netlink_queue_ue[module_id], new_data_p);
stop_meas(&ip_pdcp_stats_tmp);
......
......@@ -375,7 +375,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
//DevCheck(sdu_sizeP > 0, sdu_sizeP, 0, 0);
if(sdu_sizeP <= 0) {
LOG_E(RLC, "sdu_sizeP %d, file %s, line %d\n", sdu_sizeP, __FILE__ ,__LINE__);
LOG_E(RLC, "sdu_sizeP %d, file %s, line %d\n", sdu_sizeP, __FILE__,__LINE__);
return RLC_OP_STATUS_BAD_PARAMETER;
}
......@@ -564,8 +564,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
}
#else
}
else { /* MBMS_flag != 0 */
} else { /* MBMS_flag != 0 */
free_mem_block(sdu_pP, __func__);
LOG_E(RLC, "MBMS_flag != 0 while Rel10/Rel14 is not defined...\n");
//handle_event(ERROR,"FILE %s FONCTION rlc_data_req() LINE %s : parameter module_id out of bounds :%d\n", __FILE__, __LINE__, module_idP);
......@@ -616,7 +615,7 @@ void rlc_data_conf (const protocol_ctxt_t *const ctxt_pP,
//-----------------------------------------------------------------------------
if (srb_flagP) {
if (rlc_rrc_data_conf != NULL) {
rlc_rrc_data_conf (ctxt_pP, rb_idP , muiP, statusP);
rlc_rrc_data_conf (ctxt_pP, rb_idP, muiP, statusP);
}
}
}
......
......@@ -68,7 +68,7 @@
#if ENABLE_RAL
# include "collection/hashtable/obj_hashtable.h"
#include "collection/hashtable/obj_hashtable.h"
#endif
......@@ -244,14 +244,14 @@ typedef struct eNB_RRC_UE_NB_IoT_s {
* message previously sent by the eNB (e.g. RRCConnectionSetup -- RRCConnectionSetupComplete)
* this because it could happen that more messages are transmitted at the same time
*/
LTE_SRB_ToAddModList_NB_r13_t* SRB_configList;//for SRB1 and SRB1bis
LTE_SRB_ToAddModList_NB_r13_t* SRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
LTE_DRB_ToAddModList_NB_r13_t* DRB_configList; //for all the DRBs
LTE_DRB_ToAddModList_NB_r13_t* DRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER]; //for the configured DRBs of a xid
LTE_SRB_ToAddModList_NB_r13_t *SRB_configList;//for SRB1 and SRB1bis
LTE_SRB_ToAddModList_NB_r13_t *SRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
LTE_DRB_ToAddModList_NB_r13_t *DRB_configList; //for all the DRBs
LTE_DRB_ToAddModList_NB_r13_t *DRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER]; //for the configured DRBs of a xid
uint8_t DRB_active[2];//in LTE was 8 --> at most 2 for NB-IoT
struct LTE_PhysicalConfigDedicated_NB_r13* physicalConfigDedicated_NB_IoT;
LTE_MAC_MainConfig_NB_r13_t* mac_MainConfig_NB_IoT;
struct LTE_PhysicalConfigDedicated_NB_r13 *physicalConfigDedicated_NB_IoT;
LTE_MAC_MainConfig_NB_r13_t *mac_MainConfig_NB_IoT;
//No SPS(semi-persistent scheduling) in NB-IoT
//No Measurement report in NB-IoT
......@@ -360,12 +360,12 @@ typedef struct {
uint8_t sizeof_SIB16_NB_IoT;
//TS 36.331 V14.2.1
// uint8_t *SIB15_NB;
// uint8_t sizeof_SIB15_NB;
// uint8_t *SIB20_NB;
// uint8_t sizeof_SIB20_NB;
// uint8_t *SIB22_NB;
// uint8_t sizeof_SIB22_NB;
// uint8_t *SIB15_NB;
// uint8_t sizeof_SIB15_NB;
// uint8_t *SIB20_NB;
// uint8_t sizeof_SIB20_NB;
// uint8_t *SIB22_NB;
// uint8_t sizeof_SIB22_NB;
//implicit parameters needed
int Ncp; //cyclic prefix for DL
......@@ -453,7 +453,7 @@ typedef struct eNB_RRC_INST_NB_IoT_s {
typedef struct OAI_UECapability_NB_IoT_s {
uint8_t sdu[MAX_UE_CAPABILITY_SIZE_NB_IoT];
uint8_t sdu_size;
////NB-IoT------
////NB-IoT------
LTE_UE_Capability_NB_r13_t UE_Capability_NB_IoT; //replace the UE_EUTRA_Capability of LTE
} OAI_UECapability_NB_IoT_t;
......@@ -499,7 +499,7 @@ typedef struct UE_RRC_INST_NB_IoT_s {
SystemInformationBlockType10_t *sib10[NB_CNX_UE];
SystemInformationBlockType11_t *sib11[NB_CNX_UE];
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
uint8_t MBMS_flag;
uint8_t *MCCH_MESSAGE[NB_CNX_UE];
uint8_t sizeof_MCCH_MESSAGE[NB_CNX_UE];
......@@ -507,11 +507,11 @@ typedef struct UE_RRC_INST_NB_IoT_s {
MBSFNAreaConfiguration_r9_t *mcch_message[NB_CNX_UE];
SystemInformationBlockType12_r9_t *sib12[NB_CNX_UE];
SystemInformationBlockType13_r9_t *sib13[NB_CNX_UE];
#endif
#ifdef CBA
#endif
#ifdef CBA
uint8_t num_active_cba_groups;
uint16_t cba_rnti[NUM_MAX_CBA_GROUP];
#endif
#endif
uint8_t num_srb;
struct SRB_ToAddMod *SRB1_config[NB_CNX_UE];
struct SRB_ToAddMod *SRB2_config[NB_CNX_UE];
......@@ -537,14 +537,14 @@ typedef struct UE_RRC_INST_NB_IoT_s {
float rsrq_db[7];
float rsrp_db_filtered[7];
float rsrq_db_filtered[7];
#if ENABLE_RAL
#if ENABLE_RAL
obj_hash_table_t *ral_meas_thresholds;
ral_transaction_id_t scan_transaction_id;
#endif
#if defined(ENABLE_SECURITY)
#endif
#if defined(ENABLE_SECURITY)
// KeNB as computed from parameters within USIM card //
uint8_t kenb[32];
#endif
#endif
// Used integrity/ciphering algorithms //
CipheringAlgorithm_r12_t ciphering_algorithm;
......
......@@ -179,7 +179,6 @@ 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) {
switch (UE_rrc_inst[ue_mod_idP].RrcState) {
case RRC_STATE_INACTIVE:
......@@ -197,8 +196,7 @@ static int rrc_set_sub_state( module_id_t ue_mod_idP, Rrc_Sub_State_t subState )
"Invalid sub state %d for state %d!\n", subState, UE_rrc_inst[ue_mod_idP].RrcState);
break;
}
}
}
if (UE_rrc_inst[ue_mod_idP].RrcSubState != subState) {
UE_rrc_inst[ue_mod_idP].RrcSubState = subState;
......@@ -595,17 +593,14 @@ static void rrc_ue_generate_RRCConnectionSetupComplete( const protocol_ctxt_t *c
const char *nas_msg;
int nas_msg_length;
if (EPC_MODE_ENABLED) {
nas_msg = (char *) UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.data;
nas_msg_length = UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.length;
} else {
nas_msg = nas_attach_req_imsi;
nas_msg_length = sizeof(nas_attach_req_imsi);
}
size = do_RRCConnectionSetupComplete(ctxt_pP->module_id, buffer, Transaction_id, nas_msg_length, nas_msg);
LOG_I(RRC,"[UE %d][RAPROC] Frame %d : Logical Channel UL-DCCH (SRB1), Generating RRCConnectionSetupComplete (bytes%d, eNB %d)\n",
ctxt_pP->module_id,ctxt_pP->frame, size, eNB_index);
......@@ -810,6 +805,7 @@ rrc_ue_establish_drb(
(void)ip_addr_offset4;
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);
/*
rrc_pdcp_config_req (ue_mod_idP+NB_eNB_INST, frameP, 0, CONFIG_ACTION_ADD,
(eNB_index * NB_RB_MAX) + *DRB_config->logicalChannelIdentity, UNDEF_SECURITY_MODE);
......@@ -845,6 +841,7 @@ rrc_ue_establish_drb(
# endif
}
return(0);
}
......@@ -1908,7 +1905,6 @@ rrc_ue_process_rrcConnectionReconfiguration(
}
*/
/* Check if there is dedicated NAS information to forward to NAS */
if (rrcConnectionReconfiguration_r8->dedicatedInfoNASList != NULL) {
int list_count;
......@@ -1972,7 +1968,6 @@ rrc_ue_process_rrcConnectionReconfiguration(
itti_send_msg_to_task (TASK_RAL_UE, ctxt_pP->instance, message_ral_p);
}
#endif
} // c1 present
} // critical extensions present
}
......@@ -2241,7 +2236,6 @@ rrc_ue_decode_dcch(
UE_rrc_inst[ctxt_pP->module_id].Info[target_eNB_index].State = RRC_RECONFIGURED;
LOG_I(RRC, "[UE %d] State = RRC_RECONFIGURED during HO (eNB %d)\n",
ctxt_pP->module_id, target_eNB_index);
#if ENABLE_RAL
{
MessageDef *message_ral_p = NULL;
......@@ -2286,7 +2280,6 @@ rrc_ue_decode_dcch(
LOG_I(RRC, "Sending RRC_RAL_CONNECTION_RECONFIGURATION_HO_IND to mRAL\n");
itti_send_msg_to_task (TASK_RAL_UE, ctxt_pP->instance, message_ral_p);
}
#endif
} else {
rrc_ue_generate_RRCConnectionReconfigurationComplete(
......@@ -3497,8 +3490,7 @@ int decode_SI( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index ) {
#endif
LOG_D( RRC, "[UE] (*si)->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count %d\n",
(*si)->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count );
}
else {
} else {
LOG_D( RRC, "[UE] Unknown criticalExtension version (not Rel8)\n" );
return -1;
}
......@@ -3561,8 +3553,6 @@ int decode_SI( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index ) {
rrc_ue_generate_RRCConnectionRequest( ctxt_pP, eNB_index );
}
if (UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].State == RRC_IDLE) {
LOG_I( RRC, "[UE %d] Received SIB1/SIB2/SIB3 Switching to RRC_SI_RECEIVED\n", ctxt_pP->module_id );
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].State = RRC_SI_RECEIVED;
......@@ -3825,7 +3815,7 @@ int decode_SI( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index ) {
sib1->schedulingInfoList.list.count);
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SI , VCD_FUNCTION_OUT);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SI, VCD_FUNCTION_OUT);
return 0;
}
......@@ -4093,7 +4083,7 @@ uint8_t check_trigger_meas_event(
uint8_t eNB_offset;
// uint8_t currentCellIndex = frame_parms->Nid_cell;
uint8_t tmp_offset;
LOG_I(RRC,"[UE %d] ofn(%ld) ocn(%ld) hys(%ld) ofs(%ld) ocs(%ld) a3_offset(%ld) ttt(%ld) rssi %3.1f\n",
LOG_D(RRC,"[UE %d] ofn(%ld) ocn(%ld) hys(%ld) ofs(%ld) ocs(%ld) a3_offset(%ld) ttt(%ld) rssi %3.1f\n",
ue_mod_idP,
ofn,ocn,hys,ofs,ocs,a3_offset,ttt,
10*log10(get_RSSI(ue_mod_idP,0))-get_rx_total_gain_dB(ue_mod_idP,0));
......@@ -5024,7 +5014,7 @@ rrc_control_socket_init() {
// error("ERROR: Failed on opening socket");
optval = 1;
setsockopt(ctrl_sock_fd, SOL_SOCKET, SO_REUSEADDR,
(const void *)&optval , sizeof(int));
(const void *)&optval, sizeof(int));
//build the server's address
bzero((char *) &rrc_ctrl_socket_addr, sizeof(rrc_ctrl_socket_addr));
rrc_ctrl_socket_addr.sin_family = AF_INET;
......
This diff is collapsed.
......@@ -41,20 +41,18 @@ extern RAN_CONTEXT_t RC;
int
rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(
const protocol_ctxt_t* const ctxt_pP,
const gtpv1u_enb_create_tunnel_resp_t * const create_tunnel_resp_pP,
const protocol_ctxt_t *const ctxt_pP,
const gtpv1u_enb_create_tunnel_resp_t *const create_tunnel_resp_pP,
uint8_t *inde_list
)
{
) {
rnti_t rnti;
int i;
struct rrc_eNB_ue_context_s* ue_context_p = NULL;
struct rrc_eNB_ue_context_s *ue_context_p = NULL;
if (create_tunnel_resp_pP) {
LOG_D(RRC, PROTOCOL_RRC_CTXT_UE_FMT" RX CREATE_TUNNEL_RESP num tunnels %u \n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
create_tunnel_resp_pP->num_tunnels);
rnti = create_tunnel_resp_pP->rnti;
ue_context_p = rrc_eNB_get_ue_context(
RC.rrc[ctxt_pP->module_id],
......@@ -64,7 +62,6 @@ rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(
ue_context_p->ue_context.enb_gtp_teid[inde_list[i]] = create_tunnel_resp_pP->enb_S1u_teid[i];
ue_context_p->ue_context.enb_gtp_addrs[inde_list[i]] = create_tunnel_resp_pP->enb_addr;
ue_context_p->ue_context.enb_gtp_ebi[inde_list[i]] = create_tunnel_resp_pP->eps_bearer_id[i];
LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP tunnel (%u, %u) bearer UE context index %u, msg index %u, id %u, gtp addr len %d \n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
create_tunnel_resp_pP->enb_S1u_teid[i],
......@@ -74,6 +71,7 @@ rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(
create_tunnel_resp_pP->eps_bearer_id[i],
create_tunnel_resp_pP->enb_addr.length);
}
MSC_LOG_RX_MESSAGE(
MSC_RRC_ENB,
MSC_GTPU_ENB,
......
......@@ -38,8 +38,8 @@
*\return 0 when successful, -1 if the UE index can not be retrieved. */
int
rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(
const protocol_ctxt_t* const ctxt_pP,
const gtpv1u_enb_create_tunnel_resp_t * const create_tunnel_resp_pP,
const protocol_ctxt_t *const ctxt_pP,
const gtpv1u_enb_create_tunnel_resp_t *const create_tunnel_resp_pP,
uint8_t *inde_list
);
......
This diff is collapsed.
......@@ -49,36 +49,36 @@ typedef struct rrc_ue_s1ap_ids_s {
int
rrc_eNB_S1AP_compare_ue_ids(
struct rrc_ue_s1ap_ids_s* c1_pP,
struct rrc_ue_s1ap_ids_s* c2_pP
struct rrc_ue_s1ap_ids_s *c1_pP,
struct rrc_ue_s1ap_ids_s *c2_pP
);
struct rrc_rnti_tree_s;
RB_PROTOTYPE(rrc_rnti_tree_s, rrc_ue_s1ap_ids_s, entries, rrc_eNB_S1AP_compare_ue_ids);
struct rrc_ue_s1ap_ids_s*
struct rrc_ue_s1ap_ids_s *
rrc_eNB_S1AP_get_ue_ids(
eNB_RRC_INST* const rrc_instance_pP,
eNB_RRC_INST *const rrc_instance_pP,
const uint16_t ue_initial_id,
const uint32_t eNB_ue_s1ap_id
);
void
rrc_eNB_S1AP_remove_ue_ids(
eNB_RRC_INST* const rrc_instance_pP,
struct rrc_ue_s1ap_ids_s* const ue_ids_pP
eNB_RRC_INST *const rrc_instance_pP,
struct rrc_ue_s1ap_ids_s *const ue_ids_pP
);
void
rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_t* const ue_context_pP,
rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t *const ctxt_pP,
rrc_eNB_ue_context_t *const ue_context_pP,
const uint8_t ho_state
);
int
rrc_eNB_modify_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_t* const ue_context_pP,
rrc_eNB_modify_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t *const ctxt_pP,
rrc_eNB_ue_context_t *const ue_context_pP,
const uint8_t ho_state
);
......@@ -89,8 +89,8 @@ rrc_eNB_modify_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* cons
*/
void
rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_t* const ue_context_pP
const protocol_ctxt_t *const ctxt_pP,
rrc_eNB_ue_context_t *const ue_context_pP
);
/*! \fn void rrc_eNB_send_S1AP_UPLINK_NAS(const protocol_ctxt_t * const ctxt_pP, eNB_RRC_UE_t * const ue_context_pP, UL_DCCH_Message_t * const ul_dcch_msg)
......@@ -101,9 +101,9 @@ rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP(
*/
void
rrc_eNB_send_S1AP_UPLINK_NAS(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_t* const ue_context_pP,
LTE_UL_DCCH_Message_t* const ul_dcch_msg
const protocol_ctxt_t *const ctxt_pP,
rrc_eNB_ue_context_t *const ue_context_pP,
LTE_UL_DCCH_Message_t *const ul_dcch_msg
);
/*! \fn void rrc_eNB_send_S1AP_UE_CAPABILITIES_IND(const protocol_ctxt_t * const ctxt_pP, eNB_RRC_UE_t * const ue_context_pP, UL_DCCH_Message_t *ul_dcch_msg)
......@@ -113,9 +113,9 @@ rrc_eNB_send_S1AP_UPLINK_NAS(
*\param ul_dcch_msg The message receive by RRC holding the NAS message.
*/
void rrc_eNB_send_S1AP_UE_CAPABILITIES_IND(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_t* const ue_context_pP,
LTE_UL_DCCH_Message_t* ul_dcch_msg
const protocol_ctxt_t *const ctxt_pP,
rrc_eNB_ue_context_t *const ue_context_pP,
LTE_UL_DCCH_Message_t *ul_dcch_msg
);
/*! \fn rrc_eNB_send_S1AP_NAS_FIRST_REQ(const protocol_ctxt_t* const ctxt_pP,eNB_RRC_UE_t *const ue_context_pP, RRCConnectionSetupComplete_r8_IEs_t *rrcConnectionSetupComplete)
......@@ -127,9 +127,9 @@ void rrc_eNB_send_S1AP_UE_CAPABILITIES_IND(
*/
void
rrc_eNB_send_S1AP_NAS_FIRST_REQ(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_t* const ue_context_pP,
LTE_RRCConnectionSetupComplete_r8_IEs_t* rrcConnectionSetupComplete
const protocol_ctxt_t *const ctxt_pP,
rrc_eNB_ue_context_t *const ue_context_pP,
LTE_RRCConnectionSetupComplete_r8_IEs_t *rrcConnectionSetupComplete
);
......@@ -143,7 +143,7 @@ the UE-associated S1-logical connection over the S1 interface. .
*/
void rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ (
const module_id_t enb_mod_idP,
const rrc_eNB_ue_context_t* const ue_context_pP,
const rrc_eNB_ue_context_t *const ue_context_pP,
const s1ap_Cause_t causeP,
const long cause_valueP
);
......@@ -186,7 +186,7 @@ int rrc_eNB_process_S1AP_E_RAB_SETUP_REQ(MessageDef *msg_p, const char *msg_name
*\param xid transaction identifier
*\return 0 when successful, -1 if the UE index can not be retrieved.
*/
int rrc_eNB_send_S1AP_E_RAB_SETUP_RESP(const protocol_ctxt_t* const ctxt_pP, rrc_eNB_ue_context_t* const ue_context_pP, uint8_t xid );
int rrc_eNB_send_S1AP_E_RAB_SETUP_RESP(const protocol_ctxt_t *const ctxt_pP, rrc_eNB_ue_context_t *const ue_context_pP, uint8_t xid );
/*! \fn rrc_eNB_process_S1AP_E_RAB_MODIFY_REQ(MessageDef *msg_p, const char *msg_name, instance_t instance);
*\brief process a S1AP dedicated E_RAB modify request message received from S1AP.
......@@ -204,7 +204,7 @@ int rrc_eNB_process_S1AP_E_RAB_MODIFY_REQ(MessageDef *msg_p, const char *msg_nam
*\param xid transaction identifier
*\return 0 when successful, -1 if the UE index can not be retrieved.
*/
int rrc_eNB_send_S1AP_E_RAB_MODIFY_RESP(const protocol_ctxt_t* const ctxt_pP, rrc_eNB_ue_context_t* const ue_context_pP, uint8_t xid );
int rrc_eNB_send_S1AP_E_RAB_MODIFY_RESP(const protocol_ctxt_t *const ctxt_pP, rrc_eNB_ue_context_t *const ue_context_pP, uint8_t xid );
/*! \fn rrc_eNB_process_S1AP_UE_CTXT_MODIFICATION_REQ(MessageDef *msg_p, const char *msg_name, instance_t instance)
*\brief process a S1AP_UE_CTXT_MODIFICATION_REQ message received from S1AP.
......@@ -244,8 +244,8 @@ int rrc_eNB_process_PAGING_IND(MessageDef *msg_p, const char *msg_name, instance
void
rrc_pdcp_config_security(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_t* const ue_context_pP,
const protocol_ctxt_t *const ctxt_pP,
rrc_eNB_ue_context_t *const ue_context_pP,
const uint8_t send_security_mode_command
);
/*! \fn rrc_eNB_process_S1AP_E_RAB_RELEASE_COMMAND(MessageDef *msg_p, const char *msg_name, instance_t instance);
......@@ -264,10 +264,10 @@ int rrc_eNB_process_S1AP_E_RAB_RELEASE_COMMAND(MessageDef *msg_p, const char *ms
*\param xid transaction identifier
*\return 0 when successful, -1 if the UE index can not be retrieved.
*/
int rrc_eNB_send_S1AP_E_RAB_RELEASE_RESPONSE(const protocol_ctxt_t* const ctxt_pP, rrc_eNB_ue_context_t* const ue_context_pP, uint8_t xid );
int rrc_eNB_send_S1AP_E_RAB_RELEASE_RESPONSE(const protocol_ctxt_t *const ctxt_pP, rrc_eNB_ue_context_t *const ue_context_pP, uint8_t xid );
int rrc_eNB_send_PATH_SWITCH_REQ(const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_t* const ue_context_pP);
int rrc_eNB_send_PATH_SWITCH_REQ(const protocol_ctxt_t *const ctxt_pP,
rrc_eNB_ue_context_t *const ue_context_pP);
int rrc_eNB_process_S1AP_PATH_SWITCH_REQ_ACK (MessageDef *msg_p, const char *msg_name, instance_t instance);
#endif /* RRC_ENB_S1AP_H_ */
This diff is collapsed.
......@@ -133,8 +133,7 @@ The following diagram is based on graphviz (http://www.graphviz.org/), you need
* \enddot
*/
enum
{
enum {
STATE_START_OCG, /*!< \brief initiate OCG */
STATE_GET_OPT, /*!< \brief get options of OCG command */
STATE_DETECT_FILE, /*!< \brief detect the configuration file in folder USER_XML_FOLDER */
......@@ -569,7 +568,7 @@ typedef struct {
} Layer;
typedef struct {
char * level;
char *level;
char *verbosity;
int interval;
} Log_Emu;
......@@ -596,8 +595,8 @@ typedef struct {
Log_Emu log_emu;
Packet_Trace packet_trace;
Seed seed;
char * curve;
char * background_stats;
char *curve;
char *background_stats;
// CLI tags are in Info
//char g_log_level[20];
} Emulation_Config;
......@@ -675,7 +674,7 @@ typedef struct {
unsigned char cba_group_active;
unsigned char cba_backoff;
unsigned char handover_active;
char * otg_traffic;
char *otg_traffic;
unsigned char otg_bg_traffic_enabled;
unsigned char omg_model_rn;
unsigned char omg_model_enb;
......@@ -703,7 +702,7 @@ typedef struct {
node_function_t node_function[MAX_NUM_CCs];
node_timing_t node_timing[MAX_NUM_CCs];
unsigned char frame_type[MAX_NUM_CCs]; //! LTE frame type (TDD=1, FDD=0). \note this should be converted to \ref lte_frame_type_t (header file reorganization needed)
char * frame_type_name[MAX_NUM_CCs];
char *frame_type_name[MAX_NUM_CCs];
unsigned char tdd_config[MAX_NUM_CCs];
unsigned char tdd_config_S[MAX_NUM_CCs];
unsigned char extended_prefix_flag[MAX_NUM_CCs];
......
......@@ -82,23 +82,18 @@ static int _emm_msg_encode_header(const emm_msg_header_t *header,
** Others: None **
** **
***************************************************************************/
int emm_msg_decode(EMM_msg *msg, uint8_t *buffer, uint32_t len)
{
int emm_msg_decode(EMM_msg *msg, uint8_t *buffer, uint32_t len) {
LOG_FUNC_IN;
int header_result;
int decode_result;
uint8_t *buffer_log = buffer;
uint32_t len_log = len;
int down_link;
# if ((defined(NAS_BUILT_IN_EPC) && defined(NAS_MME)))
down_link = 0;
# else
down_link = 1;
# endif
/* First decode the EMM message header */
header_result = _emm_msg_decode_header(&msg->header, buffer, len);
......@@ -110,7 +105,6 @@ int emm_msg_decode(EMM_msg *msg, uint8_t *buffer, uint32_t len)
buffer += header_result;
len -= header_result;
LOG_TRACE(INFO, "EMM-MSG - Message Type 0x%02x", msg->header.message_type);
switch(msg->header.message_type) {
......@@ -281,24 +275,17 @@ int emm_msg_decode(EMM_msg *msg, uint8_t *buffer, uint32_t len)
** Others: None **
** **
***************************************************************************/
int emm_msg_encode(EMM_msg *msg, uint8_t *buffer, uint32_t len)
{
int emm_msg_encode(EMM_msg *msg, uint8_t *buffer, uint32_t len) {
LOG_FUNC_IN;
int header_result;
int encode_result;
uint8_t *buffer_log = buffer;
int down_link;
# if ((defined(NAS_BUILT_IN_EPC) && defined(NAS_MME)))
down_link = 1;
# else
down_link = 0;
# endif
/* First encode the EMM message header */
header_result = _emm_msg_encode_header(&msg->header, buffer, len);
......@@ -492,8 +479,7 @@ int emm_msg_encode(EMM_msg *msg, uint8_t *buffer, uint32_t len)
** **
***************************************************************************/
static int _emm_msg_decode_header(emm_msg_header_t *header,
const uint8_t *buffer, uint32_t len)
{
const uint8_t *buffer, uint32_t len) {
int size = 0;
/* Check the buffer length */
......@@ -535,8 +521,7 @@ static int _emm_msg_decode_header(emm_msg_header_t *header,
** **
***************************************************************************/
static int _emm_msg_encode_header(const emm_msg_header_t *header,
uint8_t *buffer, uint32_t len)
{
uint8_t *buffer, uint32_t len) {
int size = 0;
/* Check the buffer length */
......@@ -555,7 +540,6 @@ static int _emm_msg_encode_header(const emm_msg_header_t *header,
ENCODE_U8(buffer + size, *(uint8_t *)(header), size);
/* Encode the message type */
ENCODE_U8(buffer + size, header->message_type, size);
return (size);
}
......@@ -58,13 +58,13 @@ Description Implements the API used by the NAS layer running in the UE
/****************** E X P O R T E D F U N C T I O N S ******************/
/****************************************************************************/
int user_api_initialize(user_api_id_t *user_api_id, const char* host, const char* port, const char* devname, const char* devparams);
int user_api_initialize(user_api_id_t *user_api_id, const char *host, const char *port, const char *devname, const char *devparams);
int user_api_emm_callback(user_api_id_t *user_api_id, Stat_t stat, tac_t tac, ci_t ci, AcT_t AcT, const char* data, size_t size);
int user_api_emm_callback(user_api_id_t *user_api_id, Stat_t stat, tac_t tac, ci_t ci, AcT_t AcT, const char *data, size_t size);
int user_api_esm_callback(user_api_id_t *user_api_id, int cid, network_pdn_state_t state);
int user_api_get_fd(user_api_id_t *user_api_id);
const void* user_api_get_data(user_at_commands_t *commands, int index);
const void *user_api_get_data(user_at_commands_t *commands, int index);
int user_api_read_data(user_api_id_t *user_api_id);
int user_api_set_data(user_api_id_t *user_api_id, char *message);
......@@ -72,6 +72,6 @@ int user_api_send_data(user_api_id_t *user_api_id, int length);
void user_api_close(user_api_id_t *user_api_id);
int user_api_decode_data(user_api_id_t *user_api_id, user_at_commands_t *commands, int length);
int user_api_encode_data(user_api_id_t *user_api_id, const void* data, int add_success_code);
int user_api_encode_data(user_api_id_t *user_api_id, const void *data, int add_success_code);
#endif /* __USER_API_H__ */
......@@ -58,7 +58,7 @@ Description Defines the EPS Mobility Management procedure call manager,
* EPS Mobility Management sublayer
*/
typedef int (*emm_indication_callback_t) (user_api_id_t *user_api_id, Stat_t, tac_t, ci_t, AcT_t,
const char*, size_t);
const char *, size_t);
/****************************************************************************/
/******************** G L O B A L V A R I A B L E S ********************/
......
......@@ -103,18 +103,13 @@ static int _esm_ebr_context_check_precedence(const network_tft_t *,
int esm_ebr_context_create(
esm_data_t *esm_data, int ueid,
int pid, int ebi, int is_default,
const network_qos_t *qos, const network_tft_t *tft)
{
const network_qos_t *qos, const network_tft_t *tft) {
int bid = 0;
esm_data_context_t *esm_ctx = NULL;
esm_pdn_t *pdn = NULL;
LOG_FUNC_IN;
esm_ctx = esm_data;
bid = ESM_DATA_EPS_BEARER_MAX;
LOG_TRACE(INFO, "ESM-PROC - Create new %s EPS bearer context (ebi=%d) "
"for PDN connection (pid=%d)",
(is_default)? "default" : "dedicated", ebi, pid);
......@@ -162,7 +157,7 @@ int esm_ebr_context_create(
esm_bearer_t *ebr = (esm_bearer_t *)malloc(sizeof(esm_bearer_t));
if (ebr != NULL) {
memset(ebr, 0 , sizeof(esm_bearer_t));
memset(ebr, 0, sizeof(esm_bearer_t));
/* Increment the total number of active EPS bearers */
esm_ctx->n_ebrs += 1;
/* Increment the number of EPS bearer for this PDN connection */
......@@ -214,6 +209,7 @@ int esm_ebr_context_create(
switch (pdn->type) {
case NET_PDN_TYPE_IPV4V6:
//ipv6_addr[0] = pdn->ip_addr[4];
/* TODO? */
......@@ -224,9 +220,7 @@ int esm_ebr_context_create(
((pdn->ip_addr[1] << 16) & 0x00FF0000) |
((pdn->ip_addr[2] << 8) & 0x0000FF00) |
( pdn->ip_addr[3] & 0x000000FF);
in_addr.s_addr = htonl(in_addr.s_addr);
tmp = inet_ntoa(in_addr);
//AssertFatal(tmp ,
// "error in PDN IPv4 address %x",
......@@ -274,7 +268,7 @@ int esm_ebr_context_create(
strcpy(broadcast, ipv4_addr);
}
if(nfapi_mode ==3){
if(nfapi_mode ==3) {
// this is for L2 FAPI simulator.
// change for multiple UE's like 256UEs.
// if it's made too many tables , OS may crush so we use one table.
......@@ -292,7 +286,6 @@ int esm_ebr_context_create(
ipv4_addr, 201,
UE_NAS_USE_TUN?"oaitun_ue":"oip",
inst_nic + 1, 201);
inst_pdcp_list[inst_nic] = ueid;
#else
res = sprintf(command_line,
......@@ -321,9 +314,11 @@ int esm_ebr_context_create(
UE_NAS_USE_TUN?"oaitun_ue":"oip",
ueid + 1, ueid + 201);
}
if ( res<0 ) {
LOG_TRACE(WARNING, "ESM-PROC - Failed to system command string");
}
LOG_TRACE(INFO, "ESM-PROC - executing %s ",
command_line);
......@@ -384,16 +379,13 @@ int esm_ebr_context_create(
** **
***************************************************************************/
int esm_ebr_context_release(nas_user_t *user,
int ebi, int *pid, int *bid)
{
int ebi, int *pid, int *bid) {
int found = FALSE;
esm_pdn_t *pdn = NULL;
esm_data_context_t *esm_ctx;
esm_ebr_data_t *esm_ebr_data = user->esm_ebr_data;
user_api_id_t *user_api_id = user->user_api_id;
LOG_FUNC_IN;
esm_ctx = user->esm_data;
if (ebi != ESM_EBI_UNASSIGNED) {
......@@ -498,7 +490,6 @@ int esm_ebr_context_release(nas_user_t *user,
*/
for (i = 1; pdn->n_bearers > 0; i++) {
if (pdn->bearer[i]) {
LOG_TRACE(WARNING, "ESM-PROC - Release EPS bearer context "
"(ebi=%d)", pdn->bearer[i]->ebi);
......@@ -510,10 +501,8 @@ int esm_ebr_context_release(nas_user_t *user,
/* Set the EPS bearer context state to INACTIVE */
esm_ebr_set_status(user_api_id, esm_ebr_data, pdn->bearer[i]->ebi,
ESM_EBR_INACTIVE, TRUE);
/* Release EPS bearer data */
esm_ebr_release(esm_ebr_data, pdn->bearer[i]->ebi);
// esm_ebr_release()
/* Release dedicated EPS bearer data */
free(pdn->bearer[i]);
......@@ -535,7 +524,6 @@ int esm_ebr_context_release(nas_user_t *user,
}
}
/* 3GPP TS 24.301, section 6.4.4.6
* If the UE locally deactivated all EPS bearer contexts, the UE
* shall perform a local detach and enter state EMM-DEREGISTERED.
......@@ -584,10 +572,8 @@ int esm_ebr_context_release(nas_user_t *user,
** Others: None **
** **
***************************************************************************/
int esm_ebr_context_get_pid(esm_data_t *esm_data, int ebi)
{
int esm_ebr_context_get_pid(esm_data_t *esm_data, int ebi) {
LOG_FUNC_IN;
int pid;
for (pid = 0; pid < ESM_DATA_PDN_MAX; pid++) {
......@@ -635,10 +621,8 @@ int esm_ebr_context_get_pid(esm_data_t *esm_data, int ebi)
***************************************************************************/
int esm_ebr_context_check_tft(esm_data_t *esm_data, int pid, int ebi,
const network_tft_t *tft,
esm_ebr_context_tft_t operation)
{
esm_ebr_context_tft_t operation) {
LOG_FUNC_IN;
int rc = RETURNerror;
int i;
......@@ -704,8 +688,7 @@ int esm_ebr_context_check_tft(esm_data_t *esm_data, int pid, int ebi,
** **
***************************************************************************/
static int _esm_ebr_context_check_identifiers(const network_tft_t *tft1,
const network_tft_t *tft2)
{
const network_tft_t *tft2) {
int i;
int j;
......@@ -746,8 +729,7 @@ static int _esm_ebr_context_check_identifiers(const network_tft_t *tft1,
** **
***************************************************************************/
static int _esm_ebr_context_check_precedence(const network_tft_t *tft1,
const network_tft_t *tft2)
{
const network_tft_t *tft2) {
int i;
int j;
......
......@@ -51,7 +51,6 @@ int create_tasks(uint32_t enb_nb) {
}
}
if (EPC_MODE_ENABLED) {
if (enb_nb > 0) {
if (itti_create_task (TASK_X2AP, x2ap_task, NULL) < 0) {
......@@ -83,7 +82,6 @@ int create_tasks(uint32_t enb_nb) {
}
} /* if (EPC_MODE_ENABLED) */
if (enb_nb > 0) {
LOG_I(RRC,"Creating RRC eNB Task\n");
......
......@@ -40,6 +40,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 defined(NAS_BUILT_IN_UE)
......@@ -55,6 +56,7 @@ int create_tasks_ue(uint32_t ue_nb) {
return -1;
}
}
# endif
} /* EPC_MODE_ENABLED */
......
This diff is collapsed.
This diff is collapsed.
......@@ -98,7 +98,9 @@ void get_common_options(void) {
unsigned int is_nos1exec(char *exepath) {
if ( strcmp( basename(exepath), "lte-softmodem-nos1") == 0)
return 1;
if ( strcmp( basename(exepath), "lte-uesoftmodem-nos1") == 0)
return 1;
return 0;
}
......@@ -608,9 +608,12 @@ int main( int argc, char **argv ) {
logInit();
printf("Reading in command-line options\n");
get_options ();
if (is_nos1exec(argv[0]) )
set_softmodem_optmask(SOFTMODEM_NOS1_BIT);
EPC_MODE_ENABLED = !IS_SOFTMODEM_NOS1;
if (CONFIG_ISFLAGSET(CONFIG_ABORT) ) {
fprintf(stderr,"Getting configuration failed\n");
exit(-1);
......@@ -628,8 +631,7 @@ int main( int argc, char **argv ) {
}
cpuf=get_cpu_freq_GHz();
printf("ITTI init, useMME: %i\n" ,EPC_MODE_ENABLED);
printf("ITTI init, useMME: %i\n",EPC_MODE_ENABLED);
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info);
// initialize mscgen log after ITTI
......@@ -638,7 +640,6 @@ int main( int argc, char **argv ) {
}
MSC_INIT(MSC_E_UTRAN, THREAD_MAX+TASK_MAX);
init_opt();
// to make a graceful exit when ctrl-c is pressed
signal(SIGSEGV, signal_handler);
......@@ -654,6 +655,7 @@ int main( int argc, char **argv ) {
fill_modeled_runtime_table(runtime_phy_rx,runtime_phy_tx);
pdcp_module_init( ( IS_SOFTMODEM_NOS1 && !(IS_SOFTMODEM_NOKRNMOD))? (PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT);
#
if (RC.nb_inst > 0) {
// don't create if node doesn't connect to RRC/S1/GTP
if (create_tasks(1) < 0) {
......@@ -666,6 +668,7 @@ int main( int argc, char **argv ) {
printf("No ITTI, Initializing L1\n");
RCconfig_L1();
}
/* Start the agent. If it is turned off in the configuration, it won't start */
RCconfig_flexran();
......@@ -745,8 +748,7 @@ int main( int argc, char **argv ) {
LOG_I(ENB_APP,"NFAPI MODE:%s\n", nfapi_mode_str);
if (nfapi_mode==2) {// VNF
if (nfapi_mode==2) {// VNF
#if defined(PRE_SCD_THREAD)
init_ru_vnf(); // ru pointer is necessary for pre_scd.
#endif
......@@ -767,7 +769,6 @@ if (nfapi_mode==2) {// VNF
printf("wait_eNBs()\n");
wait_eNBs();
printf("About to Init RU threads RC.nb_RU:%d\n", RC.nb_RU);
// RU thread and some L1 procedure aren't necessary in VNF or L2 FAPI simulator.
......@@ -776,7 +777,8 @@ if (nfapi_mode==2) {// VNF
if (RC.nb_RU >0 && nfapi_mode != 2) {
printf("Initializing RU threads\n");
init_RU(get_softmodem_params()->rf_config_file);
for (ru_id=0;ru_id<RC.nb_RU;ru_id++) {
for (ru_id=0; ru_id<RC.nb_RU; ru_id++) {
RC.ru[ru_id]->rf_map.card=0;
RC.ru[ru_id]->rf_map.chain=CC_id+(get_softmodem_params()->chain_offset);
}
......
This diff is collapsed.
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