add flag for unused function arguments in common folder CMakeLists

(not enforced because of fmtlog external dependency)
This commit is contained in:
francescomani
2026-03-27 18:06:33 +01:00
parent 2483b68ee4
commit 683d855d97
51 changed files with 203 additions and 162 deletions
+6 -6
View File
@@ -133,7 +133,7 @@ int config_setdefault_int64(configmodule_interface_t *cfg, paramdef_t *cfgoption
return status;
}
int config_setdefault_intlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix)
int config_setdefault_intlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions)
{
int status = 0;
@@ -193,7 +193,7 @@ int config_setdefault_stringlist(configmodule_interface_t *cfg, paramdef_t *cfgo
return status;
}
int config_setdefault_double(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix)
int config_setdefault_double(configmodule_interface_t *cfg, paramdef_t *cfgoptions)
{
int status = 0;
config_check_valptr(cfg, cfgoptions, sizeof(*cfgoptions->dblptr), 1);
@@ -229,7 +229,7 @@ int config_assign_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions
return 0;
}
int config_setdefault_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix)
int config_setdefault_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions)
{
int status = 0;
@@ -333,13 +333,13 @@ int config_common_getdefault(configmodule_interface_t *cfg, paramdef_t *cfgoptio
case TYPE_UINTARRAY:
case TYPE_INTARRAY:
return config_setdefault_intlist(cfg, cfgoption, prefix);
return config_setdefault_intlist(cfg, cfgoption);
case TYPE_DOUBLE:
return config_setdefault_double(cfg, cfgoption, prefix);
return config_setdefault_double(cfg, cfgoption);
case TYPE_IPV4ADDR:
return config_setdefault_ipv4addr(cfg, cfgoption, prefix);
return config_setdefault_ipv4addr(cfg, cfgoption);
case TYPE_LIST:
// No default value for list type
+3 -3
View File
@@ -20,11 +20,11 @@ void config_check_valptr(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
/* functions to set a parameter to its default value */
int config_setdefault_int(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix);
int config_setdefault_int64(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix);
int config_setdefault_intlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix);
int config_setdefault_intlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions);
int config_setdefault_string(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix);
int config_setdefault_stringlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix);
int config_setdefault_double(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix);
int config_setdefault_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions, const char *prefix);
int config_setdefault_double(configmodule_interface_t *cfg, paramdef_t *cfgoptions);
int config_setdefault_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions);
void *config_allocate_new(configmodule_interface_t *cfg, int sz, bool autoFree);
void config_assign_int(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *fullname, int val);
int config_common_getdefault(configmodule_interface_t *cfg, paramdef_t *cfgoption, const char *prefix);
+7 -3
View File
@@ -123,6 +123,10 @@ int config_cmdlineonly_getlist(configmodule_interface_t *cfg,
int numparams,
const char *prefix)
{
UNUSED(cfg);
UNUSED(params);
UNUSED(numparams);
UNUSED(prefix);
ParamList->numelt = 0;
return 0;
}
@@ -162,15 +166,15 @@ int config_cmdlineonly_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions
case TYPE_UINTARRAY:
case TYPE_INTARRAY:
defval = config_setdefault_intlist(cfg, &cfgoptions[i], prefix);
defval = config_setdefault_intlist(cfg, &cfgoptions[i]);
break;
case TYPE_DOUBLE:
defval = config_setdefault_double(cfg, &cfgoptions[i], prefix);
defval = config_setdefault_double(cfg, &cfgoptions[i]);
break;
case TYPE_IPV4ADDR:
defval = config_setdefault_ipv4addr(cfg, &cfgoptions[i], prefix);
defval = config_setdefault_ipv4addr(cfg, &cfgoptions[i]);
break;
default:
+3
View File
@@ -177,6 +177,7 @@ void print_intvalueerror(paramdef_t *param, char *fname, int *okval, int numokva
int config_check_intval(configmodule_interface_t *cfg, paramdef_t *param)
{
UNUSED(cfg);
if ( param == NULL ) {
fprintf(stderr,"[CONFIG] config_check_intval: NULL param argument\n");
return -1;
@@ -212,6 +213,7 @@ int config_check_modify_integer(configmodule_interface_t *cfg, paramdef_t *param
int config_check_intrange(configmodule_interface_t *cfg, paramdef_t *param)
{
UNUSED(cfg);
if( *(param->iptr) >= param->chkPptr->s2.okintrange[0] && *(param->iptr) <= param->chkPptr->s2.okintrange[1] ) {
return 0;
}
@@ -234,6 +236,7 @@ void print_strvalueerror(paramdef_t *param, char *fname, char **okval, int numok
int config_check_strval(configmodule_interface_t *cfg, paramdef_t *param)
{
UNUSED(cfg);
if ( param == NULL ) {
fprintf(stderr,"[CONFIG] config_check_strval: NULL param argument\n");
return -1;
+1
View File
@@ -158,6 +158,7 @@ extern "C" int config_yaml_init(configmodule_interface_t *cfg)
extern "C" void config_yaml_end(configmodule_interface_t *cfg)
{
UNUSED(cfg);
delete config_yaml::config;
}
+5 -9
View File
@@ -519,13 +519,7 @@ void logTerm(void)
}
#include <sys/syscall.h>
static inline int log_header(log_component_t *c,
char *log_buffer,
int buffsize,
const char *file,
const char *func,
int line,
int level)
static inline int log_header(log_component_t *c, char *log_buffer, int buffsize, const char *func, int line, int level)
{
int flag = g_log->flag;
@@ -666,7 +660,7 @@ void log_dump(int component,
if (wbuf != NULL) {
va_start(args, format);
int pos=log_header(c, wbuf,MAX_LOG_TOTAL,"noFile","noFunc",0, OAILOG_INFO);
int pos = log_header(c, wbuf, MAX_LOG_TOTAL, "noFunc", 0, OAILOG_INFO);
pos+=vsprintf(wbuf+pos,format, args);
va_end(args);
@@ -875,6 +869,8 @@ void flush_mem_to_file(void)
static void log_output_memory(log_component_t *c, const char *file, const char *func, int line, int comp, int level, const char* format,va_list args)
{
UNUSED(comp);
UNUSED(file);
//logRecord_mt(file,func,line, pthread_self(), comp, level, format, ##args)
int len = 0;
/* The main difference with the version above is the use of this local log_buffer.
@@ -887,7 +883,7 @@ static void log_output_memory(log_component_t *c, const char *file, const char *
// make sure that for log trace the extra info is only printed once, reset when the level changes
if (level < OAILOG_TRACE) {
int n = log_header(c, log_buffer+len, sizeof(log_buffer), file, func, line, level);
int n = log_header(c, log_buffer+len, sizeof(log_buffer), func, line, level);
if (n > 0) {
len += n;
if (len > sizeof(log_buffer)) {
+1
View File
@@ -89,6 +89,7 @@ static int get_message(int s)
static void *T_receive_thread(void *_)
{
UNUSED(_);
int err = 0;
while (!err) err = get_message(T_socket);
+4
View File
@@ -27,6 +27,10 @@
*/
void exit_function(const char *file, const char *function, const int line, const char *s, const int assert)
{
UNUSED(file);
UNUSED(function);
UNUSED(line);
UNUSED(s);
if (assert) {
abort();
} else {
+1 -1
View File
@@ -428,7 +428,7 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database,
for (i = 0; i < 8; i++)
timeline_set_subline_background_color(g, timeline_plot, i,
new_color(g, i==0 || i==4 ? "#aaf" : "#eee"));
timeview = new_view_time(3600, 10, g, timeline_plot);
timeview = new_view_time(10, g, timeline_plot);
/* DL tick logging */
timelog = new_timelog(h, database, "ENB_PHY_DL_TICK");
subview = new_subview_time(timeview, 0, new_color(g, "#77c"), 3600*1000);
+1
View File
@@ -7,6 +7,7 @@
#include "utils.h"
#include "../T_defs.h"
#include "common/platform_types.h"
#ifdef T_SEND_TIME
#include <time.h>
#endif
+3 -2
View File
@@ -41,6 +41,7 @@ int eval_eq(struct filter *f, event e)
int eval_int(struct filter *f, event e)
{
UNUSED(e);
return f->v.v;
}
@@ -152,9 +153,9 @@ filter *filter_evarg(void *database, char *event_name, char *varname)
return ret;
}
filter *filter_evfun(void *database, int (*fun)(void *priv, int v),
void *priv, filter *x)
filter *filter_evfun(void *database, int (*fun)(void *priv, int v), void *priv, filter *x)
{
UNUSED(database);
struct filter *ret = calloc(1, sizeof(struct filter));
if (ret == NULL) abort();
ret->eval = eval_evfun;
+1 -4
View File
@@ -13,11 +13,8 @@ filter *filter_and(filter *a, filter *b);
filter *filter_eq(filter *a, filter *b);
filter *filter_int(int v);
filter *filter_evarg(void *database, char *event_name, char *varname);
filter *filter_evfun(void *database, int (*fun)(void *priv, int v),
void *priv, filter *x);
filter *filter_evfun(void *database, int (*fun)(void *priv, int v), void *priv, filter *x);
int filter_eval(filter *f, event e);
void free_filter(filter *f);
#endif /* _FILTER_H_ */
+5 -4
View File
@@ -52,8 +52,7 @@ event_handler *new_handler(void *database)
return ret;
}
unsigned long register_handler_function(event_handler *_h, int event_id,
void (*f)(void *, event), void *p)
unsigned long register_handler_function(event_handler *_h, int event_id, void (*f)(void *, event), void *p)
{
struct _event_handler *h = _h;
unsigned long ret = h->next_id;
@@ -78,9 +77,11 @@ unsigned long register_handler_function(event_handler *_h, int event_id,
return ret;
}
void remove_handler_function(event_handler *h, int event_id,
unsigned long handler_id)
void remove_handler_function(event_handler *h, int event_id, unsigned long handler_id)
{
UNUSED(h);
UNUSED(event_id);
UNUSED(handler_id);
printf("%s:%d: TODO\n", __FILE__, __LINE__);
abort();
}
+2 -5
View File
@@ -11,10 +11,7 @@ typedef void event_handler;
event_handler *new_handler(void *database);
void handle_event(event_handler *h, event e);
unsigned long register_handler_function(event_handler *_h, int event_id,
void (*f)(void *, event), void *p);
void remove_handler_function(event_handler *h, int event_id,
unsigned long handler_id);
unsigned long register_handler_function(event_handler *_h, int event_id, void (*f)(void *, event), void *p);
void remove_handler_function(event_handler *h, int event_id, unsigned long handler_id);
#endif /* _HANDLER_H_ */
+12 -13
View File
@@ -323,7 +323,7 @@ void dl(void *_d, event e)
}
trace_lte(e.sending_time, d, DIRECTION_DOWNLINK,
e.e[d->dl_rnti].i != 0xffff ? C_RNTI : SI_RNTI, e.e[d->dl_rnti].i,
e.e[d->dl_rnti].i != 0xffff ? C_RNTI : SI_RNTI_T, e.e[d->dl_rnti].i,
e.e[d->dl_frame].i, e.e[d->dl_subframe].i,
e.e[d->dl_data].b, e.e[d->dl_data].bsize,
NO_PREAMBLE, NO_SR_RNTI);
@@ -406,7 +406,7 @@ void sr(void *_d, event e)
void trace_nr(struct timespec sending_time, ev_data *d, int direction,
int rnti_type, int rnti, int frame, int slot, int harq_pid, void *buf,
int bufsize, int preamble)
int bufsize)
{
ssize_t ret;
int i;
@@ -475,7 +475,7 @@ void nr_ul(void *_d, event e)
NR_C_RNTI, e.e[d->nr_ul_rnti].i,
e.e[d->nr_ul_frame].i, e.e[d->nr_ul_slot].i,
e.e[d->nr_ul_harq_pid].i, e.e[d->nr_ul_data].b,
e.e[d->nr_ul_data].bsize, NO_PREAMBLE);
e.e[d->nr_ul_data].bsize);
}
void nr_dl(void *_d, event e)
@@ -494,7 +494,7 @@ void nr_dl(void *_d, event e)
e.e[d->nr_dl_rnti].i != 0xffff ? NR_C_RNTI : NR_SI_RNTI,
e.e[d->nr_dl_rnti].i, e.e[d->nr_dl_frame].i, e.e[d->nr_dl_slot].i,
e.e[d->nr_dl_harq_pid].i, e.e[d->nr_dl_data].b,
e.e[d->nr_dl_data].bsize, NO_PREAMBLE);
e.e[d->nr_dl_data].bsize);
}
void nr_dl_retx(void *_d, event e)
@@ -505,7 +505,7 @@ void nr_dl_retx(void *_d, event e)
NR_C_RNTI, e.e[d->nr_dl_retx_rnti].i,
e.e[d->nr_dl_retx_frame].i, e.e[d->nr_dl_retx_slot].i,
e.e[d->nr_dl_retx_harq_pid].i, e.e[d->nr_dl_retx_data].b,
e.e[d->nr_dl_retx_data].bsize, NO_PREAMBLE);
e.e[d->nr_dl_retx_data].bsize);
}
void nr_mib(void *_d, event e)
@@ -520,7 +520,7 @@ void nr_mib(void *_d, event e)
trace_nr(e.sending_time, d, NR_DIRECTION_DOWNLINK, NR_NO_RNTI, 0,
e.e[d->nr_mib_frame].i, e.e[d->nr_mib_slot].i, 0 /* harq pid */,
e.e[d->nr_mib_data].b, e.e[d->nr_mib_data].bsize, NO_PREAMBLE);
e.e[d->nr_mib_data].b, e.e[d->nr_mib_data].bsize);
}
void nr_ue_mib(void *_d, event e)
@@ -535,7 +535,7 @@ void nr_ue_mib(void *_d, event e)
trace_nr(e.sending_time, d, NR_DIRECTION_DOWNLINK, NR_NO_RNTI, 0,
e.e[d->nr_ue_mib_frame].i, e.e[d->nr_ue_mib_slot].i, 0 /* harq pid */,
e.e[d->nr_ue_mib_data].b, e.e[d->nr_ue_mib_data].bsize, NO_PREAMBLE);
e.e[d->nr_ue_mib_data].b, e.e[d->nr_ue_mib_data].bsize);
}
void nr_rar(void *_d, event e)
@@ -545,7 +545,7 @@ void nr_rar(void *_d, event e)
trace_nr(e.sending_time, d, NR_DIRECTION_DOWNLINK,
NR_RA_RNTI, e.e[d->nr_rar_rnti].i,
e.e[d->nr_rar_frame].i, e.e[d->nr_rar_slot].i, 0 /* harq pid */,
e.e[d->nr_rar_data].b, e.e[d->nr_rar_data].bsize, NO_PREAMBLE);
e.e[d->nr_rar_data].b, e.e[d->nr_rar_data].bsize);
}
void nr_ue_ul(void *_d, event e)
@@ -556,7 +556,7 @@ void nr_ue_ul(void *_d, event e)
NR_C_RNTI, e.e[d->nr_ue_ul_rnti].i,
e.e[d->nr_ue_ul_frame].i, e.e[d->nr_ue_ul_slot].i,
e.e[d->nr_ue_ul_harq_pid].i, e.e[d->nr_ue_ul_data].b,
e.e[d->nr_ue_ul_data].bsize, NO_PREAMBLE);
e.e[d->nr_ue_ul_data].bsize);
}
void nr_ue_dl(void *_d, event e)
@@ -575,7 +575,7 @@ void nr_ue_dl(void *_d, event e)
e.e[d->nr_ue_dl_rnti].i != 0xffff ? NR_C_RNTI : NR_SI_RNTI,
e.e[d->nr_ue_dl_rnti].i, e.e[d->nr_ue_dl_frame].i,
e.e[d->nr_ue_dl_slot].i, e.e[d->nr_ue_dl_harq_pid].i,
e.e[d->nr_ue_dl_data].b, e.e[d->nr_ue_dl_data].bsize, NO_PREAMBLE);
e.e[d->nr_ue_dl_data].b, e.e[d->nr_ue_dl_data].bsize);
}
void nr_ue_rar(void *_d, event e)
@@ -584,8 +584,7 @@ void nr_ue_rar(void *_d, event e)
trace_nr(e.sending_time, d, DIRECTION_DOWNLINK,
RA_RNTI, e.e[d->nr_ue_rar_rnti].i,
e.e[d->nr_ue_rar_frame].i, e.e[d->nr_ue_rar_slot].i, 0,
e.e[d->nr_ue_rar_data].b, e.e[d->nr_ue_rar_data].bsize,
NO_PREAMBLE);
e.e[d->nr_ue_rar_data].b, e.e[d->nr_ue_rar_data].bsize);
}
/****************************************************************************/
@@ -961,7 +960,7 @@ static int sock = -1;
void force_stop(int x)
{
printf("\ngently quit...\n");
printf("\ngently quit(%d)...\n", x);
close(sock);
sock = -1;
run = 0;
+3 -3
View File
@@ -27,12 +27,12 @@
/* rntiType */
#define NO_RNTI 0
#define P_RNTI 1
#define P_RNTI_T 1
#define RA_RNTI 2
#define C_RNTI 3
#define SI_RNTI 4
#define SI_RNTI_T 4
#define SPS_RNTI 5
#define M_RNTI 6
#define M_RNTI_T 6
#define SL_BCH_RNTI 7
#define SL_RNTI 8
#define SC_RNTI 9
+2 -1
View File
@@ -11,6 +11,7 @@
#include "utils.h"
#include "../T_defs.h"
#include "configuration.h"
#include "common/platform_types.h"
void usage(void)
{
@@ -39,7 +40,7 @@ static int socket = -1;
void force_stop(int x)
{
printf("\ngently quit...\n");
printf("\ngently quit (%d)...\n", x);
close(socket);
socket = -1;
run = 0;
+3 -10
View File
@@ -249,7 +249,7 @@ static int socket_fd = -1;
void force_stop(int x)
{
logi("gently quit...");
logi("gently quit %d", x);
close(socket_fd);
socket_fd = -1;
run = 0;
@@ -785,12 +785,7 @@ uint8_t should_insert(EventBuffer &buf)
return 0;
}
int insert_event(clickhouse_config_t *ch,
void *database,
int event_id,
const char *event_data,
int data_length,
std::chrono::high_resolution_clock::time_point t_start)
int insert_event(clickhouse_config_t *ch, int event_id, const char *event_data, int data_length)
{
auto t_fn_start = std::chrono::high_resolution_clock::now();
@@ -1270,14 +1265,12 @@ int main(int n, char **v)
if (fullread(socket_fd, v + vpos, length) == -1)
goto read_error;
auto t_start = std::chrono::high_resolution_clock::now();
if (type == -1) {
append_received_config_chunk(v + vpos, length);
} else if (type == -2) {
verify_config();
} else if (type >= 0 && type < number_of_events && is_on[type]) {
if (insert_event(&ch_config, database, type, v + vpos, length, t_start) != 0) {
if (insert_event(&ch_config, type, v + vpos, length) != 0) {
loge("Failed to insert event type {}", type);
}
}
+1 -1
View File
@@ -417,7 +417,7 @@ static void ue_main_gui(ue_gui *e, gui *g, event_handler *h, void *database,
for (i = 0; i < 8; i++)
timeline_set_subline_background_color(g, timeline_plot, i,
new_color(g, i==0 || i==4 ? "#aaf" : "#eee"));
timeview = new_view_time(3600, 10, g, timeline_plot);
timeview = new_view_time(10, g, timeline_plot);
/* DL tick logging */
timelog = new_timelog(h, database, "UE_PHY_DL_TICK");
subview = new_subview_time(timeview, 0, new_color(g, "#77c"), 3600*1000);
+1 -1
View File
@@ -100,7 +100,7 @@ static void vcd_main_gui(gui *g, event_handler *h, void *database)
for (i = 0; i < nb_functions; i++)
timeline_set_subline_background_color(g, w, i,
new_color(g, i & 1 ? "#ddd" : "#eee"));
timeview = new_view_time(3600, 10, g, w);
timeview = new_view_time(10, g, w);
i = 0;
for (j = 0; j < n; j++) {
if (strncmp(ids[j], "VCD_FUNCTION_", 13) != 0) continue;
+1
View File
@@ -70,6 +70,7 @@ static void *scrolltti_thread(void *_this)
static void clear(view *this)
{
/* TODO */
UNUSED(this);
}
static void insert(struct scrolltti *this, double value)
+1
View File
@@ -15,6 +15,7 @@ struct stdout {
static void clear(view *this)
{
/* do nothing */
UNUSED(this);
}
static void append(view *_this, char *s)
+5 -2
View File
@@ -71,6 +71,7 @@ static void *textlist_thread(void *_this)
static void clear(view *this)
{
/* TODO */
UNUSED(this);
}
static void append(view *_this, char *s)
@@ -120,9 +121,11 @@ static void scroll(void *private, gui *g,
if (pthread_mutex_unlock(&this->lock)) abort();
}
static void click(void *private, gui *g,
char *notification, widget *w, void *notification_data)
static void click(void *private, gui *g, char *notification, widget *w, void *notification_data)
{
UNUSED(notification);
UNUSED(g);
UNUSED(w);
struct textlist *this = private;
int *d = notification_data;
int button = d[1];
+9 -6
View File
@@ -164,9 +164,10 @@ static void *ticktime_thread(void *_this)
return 0;
}
static void scroll(void *private, gui *g,
char *notification, widget *w, void *notification_data)
static void scroll(void *private, gui *g, char *notification, widget *w, void *notification_data)
{
UNUSED(g);
UNUSED(w);
struct ticktime *this = private;
int *d = notification_data;
int x = d[0];
@@ -225,9 +226,11 @@ end:
if (pthread_mutex_unlock(&this->lock)) abort();
}
static void click(void *private, gui *g,
char *notification, widget *w, void *notification_data)
static void click(void *private, gui *g, char *notification, widget *w, void *notification_data)
{
UNUSED(g);
UNUSED(w);
UNUSED(notification);
struct ticktime *this = private;
int *d = notification_data;
int button = *d;
@@ -365,9 +368,9 @@ struct clock_ticktime {
struct ticktime *parent;
};
static void clock_append(view *_this, struct timespec t,
int frame, int subframe)
static void clock_append(view *_this, struct timespec t, int frame, int subframe)
{
UNUSED(t);
struct clock_ticktime *this = (struct clock_ticktime *)_this;
struct ticktime *tt = this->parent;
int64_t diff;
+8 -6
View File
@@ -156,9 +156,10 @@ static void *time_thread(void *_this)
return 0;
}
static void scroll(void *private, gui *g,
char *notification, widget *w, void *notification_data)
static void scroll(void *private, gui *g, char *notification, widget *w, void *notification_data)
{
UNUSED(g);
UNUSED(w);
struct time *this = private;
int *d = notification_data;
int x = d[0];
@@ -217,9 +218,11 @@ end:
if (pthread_mutex_unlock(&this->lock)) abort();
}
static void click(void *private, gui *g,
char *notification, widget *w, void *notification_data)
static void click(void *private, gui *g, char *notification, widget *w, void *notification_data)
{
UNUSED(g);
UNUSED(w);
UNUSED(notification);
struct time *this = private;
int *d = notification_data;
int button = *d;
@@ -228,8 +231,7 @@ static void click(void *private, gui *g,
if (button == 1) this->autoscroll = 1;
}
view *new_view_time(int number_of_seconds, float refresh_rate,
gui *g, widget *w)
view *new_view_time(float refresh_rate, gui *g, widget *w)
{
struct time *ret = calloc(1, sizeof(struct time));
if (ret == NULL) abort();
+1
View File
@@ -94,6 +94,7 @@ static void *tti_thread(void *_this)
static void clear(view *this)
{
/* TODO */
UNUSED(this);
}
static void append(view *_this, int frame, int tick, double value)
+5 -8
View File
@@ -6,6 +6,7 @@
#define _VIEW_H_
#include "gui/gui.h"
#include "common/platform_types.h"
/* defines the public API of views */
@@ -19,14 +20,10 @@ enum xy_mode { XY_LOOP_MODE, XY_FORCED_MODE };
view *new_view_stdout(void);
view *new_view_textlist(int maxsize, float refresh_rate, gui *g, widget *w);
view *new_view_xy(int length, float refresh_rate, gui *g, widget *w,
int color, enum xy_mode mode);
view *new_view_tti(float refresh_rate, gui *g, widget *w, int color,
int ticks_per_frame);
view *new_view_scrolltti(float refresh_rate, gui *g, widget *w,
int color, widget *throughput_label, int ticks_per_frame);
view *new_view_time(int number_of_seconds, float refresh_rate,
gui *g, widget *w);
view *new_view_xy(int length, float refresh_rate, gui *g, widget *w, int color, enum xy_mode mode);
view *new_view_tti(float refresh_rate, gui *g, widget *w, int color, int ticks_per_frame);
view *new_view_scrolltti(float refresh_rate, gui *g, widget *w, int color, widget *throughput_label, int ticks_per_frame);
view *new_view_time(float refresh_rate, gui *g, widget *w);
view *new_subview_time(view *time, int line, int color, int size);
view *new_view_ticktime(float refresh_rate, gui *g, widget *w);
view *new_subview_ticktime(view *ticktime, int line, int color, int size);
+1
View File
@@ -42,6 +42,7 @@ static void *xy_thread(void *_this)
static void clear(view *this)
{
/* TODO */
UNUSED(this);
}
static void append_loop(view *_this, float *x, float *y, int length)
+4 -1
View File
@@ -45,7 +45,10 @@ char *hashtable_rc_code2string(hashtable_rc_t rcP)
* hash_free_int_func() is used when this hashtable is used to store int values as data (pointer = value).
*/
void hash_free_int_func(void *memoryP) {}
void hash_free_int_func(void *memoryP)
{
UNUSED(memoryP);
}
//-------------------------------------------------------------------------------------------------------------------------------
/*
+2 -6
View File
@@ -284,12 +284,8 @@ void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name,
// Legacy, pthread_create + thread_top_init() should be replaced by threadCreate
// threadCreate encapsulates the posix pthread api
void thread_top_init(char *thread_name,
int affinity,
uint64_t runtime,
uint64_t deadline,
uint64_t period) {
void thread_top_init(char *thread_name)
{
int policy, s, j;
struct sched_param sparam;
char cpu_affinity[1024];
+1 -5
View File
@@ -36,11 +36,7 @@ void threadCreate(pthread_t *t, void *(*func)(void *), void *param, char *name,
#define OAI_PRIORITY_RT ((sched_get_priority_min(SCHED_OAI)+sched_get_priority_max(SCHED_OAI))/2)
#define OAI_PRIORITY_RT_MAX sched_get_priority_max(SCHED_OAI)-2
void thread_top_init(char *thread_name,
int affinity,
uint64_t runtime,
uint64_t deadline,
uint64_t period);
void thread_top_init(char *thread_name);
/****************************************************
* Functions to check system at runtime.
+15 -11
View File
@@ -81,7 +81,6 @@ int get_phybsize(void) {
};
int add_telnetcmd(char *modulename,telnetshell_vardef_t *var, telnetshell_cmddef_t *cmd );
int setoutput(char *buff, int debug, telnet_printfunc_t prnt);
int wsetoutput(char *buff, int debug, telnet_printfunc_t prnt, ...);
int setparam(char *buff, int debug, telnet_printfunc_t prnt);
int wsetparam(char *buff, int debug, telnet_printfunc_t prnt, ...);
int history_cmd(char *buff, int debug, telnet_printfunc_t prnt);
@@ -245,12 +244,9 @@ void redirstd(char *newfname,telnet_printfunc_t prnt ) {
}
}
int wsetoutput(char *buffer, int debug, telnet_printfunc_t prnt, ...)
int setoutput(char *buff, int debug, telnet_printfunc_t prnt)
{
return 0;
}
int setoutput(char *buff, int debug, telnet_printfunc_t prnt) {
UNUSED(debug);
char cmds[TELNET_MAX_MSGLENGTH/TELNET_CMD_MAXSIZE][TELNET_CMD_MAXSIZE];
char *logfname;
char stdout_str[64];
@@ -288,10 +284,16 @@ int setoutput(char *buff, int debug, telnet_printfunc_t prnt) {
int wsetparam(char *buff, int debug, telnet_printfunc_t prnt, ...)
{
UNUSED(buff);
UNUSED(debug);
UNUSED(prnt);
return 0;
}
int setparam(char *buff, int debug, telnet_printfunc_t prnt) {
int setparam(char *buff, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
UNUSED(prnt);
char cmds[TELNET_MAX_MSGLENGTH/TELNET_CMD_MAXSIZE][TELNET_CMD_MAXSIZE];
memset(cmds,0,sizeof(cmds));
sscanf(buff,"%9s %9s %9s %9s %9s", cmds[0],cmds[1],cmds[2],cmds[3],cmds[4] );
@@ -322,7 +324,9 @@ int setparam(char *buff, int debug, telnet_printfunc_t prnt) {
return CMDSTATUS_NOTFOUND;
} /* setparam */
int history_cmd(char *buff, int debug, telnet_printfunc_t prnt) {
int history_cmd(char *buff, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
char cmds[TELNET_MAX_MSGLENGTH/TELNET_CMD_MAXSIZE][TELNET_CMD_MAXSIZE];
memset(cmds,0,sizeof(cmds));
sscanf(buff,"%9s %9s %9s %9s %9s", cmds[0],cmds[1],cmds[2],cmds[3],cmds[4] );
@@ -502,7 +506,7 @@ void telnet_pushcmd(telnetshell_cmddef_t *cmd, char *cmdbuff, telnet_printfunc_t
pushNotifiedFIFO(cmd->qptr, msg);
}
int process_command(char *buf, int iteration)
int process_command(char *buf)
{
int i,j,k;
char modulename[TELNET_CMD_MAXSIZE];
@@ -581,7 +585,7 @@ int process_command(char *buf, int iteration)
char tbuff[64];
client_printf(CSI "1J" CSI "1;10H " STDFMT "%s %i/%i\n",
get_time(tbuff,sizeof(tbuff)),lc,telnetparams.loopcount );
process_command(buf + strlen("loop") + 1, lc);
process_command(buf + strlen("loop") + 1);
errno=0;
int rs = read(telnetparams.new_socket,dummybuff,sizeof(dummybuff));
@@ -710,7 +714,7 @@ void run_telnetsrv(void) {
}
if (strlen(buf) > 2 ) {
status = process_command(buf, 0);
status = process_command(buf);
} else
status=CMDSTATUS_NOCMD;
@@ -28,6 +28,7 @@ static int get_single_ue_rnti(void)
int get_single_rnti(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
if (buf)
ERROR_MSG_RET("no parameter allowed\n");
@@ -42,6 +43,7 @@ int get_single_rnti(char *buf, int debug, telnet_printfunc_t prnt)
//void rrc_gNB_trigger_new_bearer(int rnti);
int add_bearer(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
int rnti = -1;
if (!buf) {
rnti = get_single_ue_rnti();
@@ -67,6 +69,7 @@ int add_bearer(char *buf, int debug, telnet_printfunc_t prnt)
//void rrc_gNB_trigger_release_bearer(int rnti);
int release_bearer(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
int rnti = -1;
if (!buf) {
rnti = get_single_ue_rnti();
+10
View File
@@ -47,6 +47,7 @@ static int get_single_ue_rnti_mac(void)
int get_single_rnti(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
if (buf)
ERROR_MSG_RET("no parameter allowed\n");
@@ -81,6 +82,7 @@ rrc_gNB_ue_context_t *get_single_rrc_ue(void)
int get_reestab_count(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
if (!RC.nrrrc)
ERROR_MSG_RET("no RRC present, cannot list counts\n");
rrc_gNB_ue_context_t *ue = NULL;
@@ -119,6 +121,7 @@ int fetch_rnti(char *buf, telnet_printfunc_t prnt)
int trigger_reestab(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
if (!RC.nrmac)
ERROR_MSG_RET("no MAC/RLC present, cannot trigger reestablishment\n");
int rnti = fetch_rnti(buf, prnt);
@@ -134,6 +137,7 @@ extern nr_rrc_du_container_t *get_du_for_ue(gNB_RRC_INST *rrc, uint32_t ue_id);
/** @brief Get connected DU by the UE ID */
int fetch_du_by_ue_id(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
if (!RC.nrrrc)
ERROR_MSG_RET("no RRC present, cannot list counts\n");
@@ -169,6 +173,7 @@ extern void nr_HO_F1_trigger_telnet(gNB_RRC_INST *rrc, uint32_t rrc_ue_id);
*/
int rrc_gNB_trigger_f1_ho(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
if (!RC.nrrrc)
ERROR_MSG_RET("no RRC present, cannot list counts\n");
rrc_gNB_ue_context_t *ue = NULL;
@@ -198,6 +203,7 @@ extern void nr_HO_N2_trigger_telnet(gNB_RRC_INST *rrc, uint32_t neighbour_pci, u
* @return 0 on success, -1 on failure */
int rrc_gNB_trigger_n2_ho(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
if (!RC.nrrrc)
ERROR_MSG_RET("no RRC present, cannot list counts\n");
@@ -238,6 +244,7 @@ int rrc_gNB_trigger_n2_ho(char *buf, int debug, telnet_printfunc_t prnt)
int force_ul_failure(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
if (!RC.nrmac)
ERROR_MSG_RET("no MAC/RLC present, force_ul_failure failed\n");
int rnti = fetch_rnti(buf, prnt);
@@ -263,6 +270,7 @@ int force_ue_release(char *buf, int debug, telnet_printfunc_t prnt)
static int get_current_bwp(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
int rnti = fetch_rnti(buf, prnt);
if (rnti < 0)
ERROR_MSG_RET("could not identify UE (no UE, no such RNTI, or multiple UEs)\n");
@@ -288,6 +296,7 @@ static int get_current_bwp(char *buf, int debug, telnet_printfunc_t prnt)
* @return 0 on success; negative value on error. */
static int trigger_ngap_pdu_session_release(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
if (buf == NULL) {
ERROR_MSG_RET("Missing input. Usage: trigger_pdu_session_release [ue_id=gNB_ue_ngap_id(int,opt)],pdusession_id(int)[,pdusession_id(int)...]\n");
}
@@ -360,6 +369,7 @@ static int trigger_ngap_pdu_session_release(char *buf, int debug, telnet_printfu
static int trigger_bwp_switch(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
char *sbwpId = strtok(buf, " ");
int bwpId = atoi(sbwpId);
char *srnti = strtok(NULL, " ");
+16
View File
@@ -52,6 +52,7 @@ static int get_default_ue_id(void)
*/
int get_sync_state(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
int ue_id = -1;
if (!buf) {
ERROR_MSG_RET("no UE ID provided to telnet command\n");
@@ -71,6 +72,9 @@ int get_sync_state(char *buf, int debug, telnet_printfunc_t prnt)
*/
int force_rlf(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
UNUSED(buf);
UNUSED(prnt);
NR_UE_RRC_INST_t *rrc = get_NR_UE_rrc_inst(0);
handle_rlf_detection(rrc);
return 0;
@@ -81,6 +85,9 @@ int force_rlf(char *buf, int debug, telnet_printfunc_t prnt)
*/
int force_RRC_IDLE(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
UNUSED(buf);
UNUSED(prnt);
NR_UE_RRC_INST_t *rrc = get_NR_UE_rrc_inst(0);
nr_rrc_going_to_IDLE(rrc, OTHER, NULL);
return 0;
@@ -89,6 +96,9 @@ int force_RRC_IDLE(char *buf, int debug, telnet_printfunc_t prnt)
/** @brief Trigger RA with Msg3 C-RNTI */
int force_crnti_ra(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
UNUSED(buf);
UNUSED(prnt);
NR_UE_MAC_INST_t *mac = get_mac_inst(0);
trigger_MAC_UE_RA(mac, NULL);
return 0;
@@ -96,6 +106,9 @@ int force_crnti_ra(char *buf, int debug, telnet_printfunc_t prnt)
static int force_deregistration(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
UNUSED(buf);
UNUSED(prnt);
MessageDef *msg = itti_alloc_new_message(TASK_NAS_NRUE, 0, NAS_DEREGISTRATION_REQ);
NAS_DEREGISTRATION_REQ(msg).cause = AS_DETACH;
itti_send_msg_to_task(TASK_NAS_NRUE, 0, msg);
@@ -105,6 +118,8 @@ static int force_deregistration(char *buf, int debug, telnet_printfunc_t prnt)
extern float get_prs_max_dl_toa(prs_meas_t *prs_meas);
static int get_dl_toa(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
UNUSED(buf);
// TODO multiple antennas, resources, gNBs?
int gNB_id = 0;
int rsc_id = 0;
@@ -124,6 +139,7 @@ static int get_dl_toa(char *buf, int debug, telnet_printfunc_t prnt)
static int add_pdu_session(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
int ue_id = -1;
int pdusession_id = -1;
@@ -46,11 +46,15 @@ void dump_uestats(int debug, telnet_printfunc_t prnt, uint8_t prntflag) {
}
void display_uestats(int debug, telnet_printfunc_t prnt, int ue) {
UNUSED(debug);
UNUSED(prnt);
UNUSED(ue);
for (int cc=0; cc<1 ; cc++) {
}
}
void display_phycounters(char *buf, int debug, telnet_printfunc_t prnt) {
UNUSED(buf);
prnt(" DLSCH kb DLSCH kb/s\n");
dump_uestats(debug, prnt,0);
}
@@ -206,6 +206,7 @@ int measurcmd_cpustats(char *buf, int debug, telnet_printfunc_t prnt) {
}
void measurcmd_async_help(telnet_printfunc_t prnt) {
UNUSED(prnt);
}
int measurcmd_async(char *buf, int debug, telnet_printfunc_t prnt) {
+9
View File
@@ -62,6 +62,7 @@ typedef struct ue_stat {
static int get_stats(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
if (buf)
ERROR_MSG_RET("no parameter allowed\n");
@@ -209,6 +210,7 @@ static int read_long(const char *buf, const char *end, const char *id, long *val
bool running = true; // in the beginning, the softmodem is started automatically
static int set_config(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
if (!buf)
ERROR_MSG_RET("need param: o1 config param1 val1 [param2 val2 ...]\n");
if (running)
@@ -271,6 +273,7 @@ static int set_config(char *buf, int debug, telnet_printfunc_t prnt)
static int set_bwconfig(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
if (running)
ERROR_MSG_RET("cannot set parameters while L1 is running\n");
if (!buf)
@@ -344,6 +347,8 @@ static int set_bwconfig(char *buf, int debug, telnet_printfunc_t prnt)
extern int stop_L1(module_id_t gnb_id);
static int stop_modem(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
UNUSED(buf);
if (!running)
ERROR_MSG_RET("cannot stop, nr-softmodem not running\n");
@@ -366,6 +371,8 @@ static int stop_modem(char *buf, int debug, telnet_printfunc_t prnt)
extern int start_L1L2(module_id_t gnb_id);
static int start_modem(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
UNUSED(buf);
if (running)
ERROR_MSG_RET("cannot start, nr-softmodem already running\n");
start_L1L2(0);
@@ -377,6 +384,8 @@ static int start_modem(char *buf, int debug, telnet_printfunc_t prnt)
extern void du_clear_all_ue_states();
static int remove_mac_ues(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
UNUSED(buf);
du_clear_all_ue_states();
prnt("OK\n");
return 0;
+8 -6
View File
@@ -36,6 +36,7 @@
void decode_procstat(char *record, int debug, telnet_printfunc_t prnt, webdatadef_t *tdata)
{
UNUSED(debug);
char prntline[160];
char *procfile_fields;
char *strtokptr;
@@ -169,10 +170,11 @@ char arecord[1024];
int nullprnt(char *fmt, ...)
{
UNUSED(fmt);
return 0;
}
void proccmd_get_threaddata(char *buf, int debug, telnet_printfunc_t fprnt, webdatadef_t *tdata)
void proccmd_get_threaddata(int debug, telnet_printfunc_t fprnt, webdatadef_t *tdata)
{
char aname[256];
@@ -222,9 +224,9 @@ char aname[256];
closedir(proc_dir);
} /* proccmd_get_threaddata */
void print_threads(char *buf, int debug, telnet_printfunc_t prnt)
void print_threads(int debug, telnet_printfunc_t prnt)
{
proccmd_get_threaddata(buf, debug, prnt, NULL);
proccmd_get_threaddata(debug, prnt, NULL);
}
#define FLAG_PRINT_DEBUG_DUMP(flag) \
@@ -349,7 +351,7 @@ int proccmd_websrv_getdata(char *cmdbuff, int debug, void *data, telnet_printfun
}
}
if (strcasestr(cmdbuff, "threadsched") != NULL) {
proccmd_get_threaddata(cmdbuff, debug, prnt, (webdatadef_t *)data);
proccmd_get_threaddata(debug, prnt, (webdatadef_t *)data);
}
} // show
@@ -373,7 +375,7 @@ int proccmd_show(char *buf, int debug, telnet_printfunc_t prnt)
if (debug > 0)
prnt(" proccmd_show received %s\n",buf);
if (strcasestr(buf,"thread") != NULL) {
print_threads(buf,debug,prnt);
print_threads(debug, prnt);
}
if (strcasestr(buf,"loglvl") != NULL) {
prnt("\n component level enabled output\n");
@@ -466,7 +468,7 @@ if (buf == NULL) {
prnt(" proccmd_thread: %i params = %i,%s,%i\n",res,bv1,sv1,bv2);
if(res != 3)
{
print_threads(buf, debug, prnt);
print_threads(debug, prnt);
return 0;
}
+3
View File
@@ -53,6 +53,7 @@ static int get_single_ue_id(void)
*/
int rrc_gNB_trigger_release(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
ue_id_t ue_id = -1;
if (!buf) {
@@ -91,6 +92,8 @@ int rrc_gNB_trigger_release(char *buf, int debug, telnet_printfunc_t prnt)
*/
int rrc_gNB_trigger_release_all(char *buf, int debug, telnet_printfunc_t prnt)
{
UNUSED(debug);
UNUSED(buf);
rrc_gNB_ue_context_t *ue_context_p = NULL;
gNB_RRC_INST *rrc = RC.nrrrc[0];
+1
View File
@@ -26,6 +26,7 @@ static int tick_functions_count;
*/
static void tick(void *unused)
{
UNUSED(unused);
for (int i = 0; i < tick_functions_count; i++)
tick_functions[i]();
}
+2 -3
View File
@@ -35,10 +35,9 @@ double get_cpu_freq_GHz(void)
void print_meas_now(time_stats_t *ts,
const char *name,
FILE *file_name)
void print_meas_now(time_stats_t *ts, const char *name, FILE *file_name)
{
UNUSED(name);
if (cpu_meas_enabled) {
//static double cpu_freq_GHz = 3.2;
+4 -4
View File
@@ -259,7 +259,7 @@ static void *L1_thread_tx(void *param) {
PHY_VARS_eNB *eNB = eNB_proc->eNB;
char thread_name[100];
sprintf(thread_name,"TXnp4_%d\n",&eNB->proc.L1_proc == proc ? 0 : 1);
thread_top_init(thread_name,1,470000,500000,500000);
thread_top_init(thread_name);
int ret;
//wait_sync("tx_thread");
@@ -342,7 +342,7 @@ static void *L1_thread( void *param ) {
}
}
#else
thread_top_init(thread_name,1,470000,500000,500000);
thread_top_init(thread_name);
#endif
LOG_I(PHY,"thread rxtx created id=%ld\n", syscall(__NR_gettid));
@@ -699,7 +699,7 @@ static void *eNB_thread_prach( void *param ) {
L1_proc_t *proc = &eNB->proc;
// set default return value
eNB_thread_prach_status = 0;
thread_top_init("eNB_thread_prach",1,500000,1000000,20000000);
thread_top_init("eNB_thread_prach");
//wait_sync("eNB_thread_prach");
@@ -732,7 +732,7 @@ static void *eNB_thread_prach_br( void *param ) {
L1_proc_t *proc = &eNB->proc;
// set default return value
eNB_thread_prach_status = 0;
thread_top_init("eNB_thread_prach_br",1,500000,1000000,20000000);
thread_top_init("eNB_thread_prach_br");
while (!oai_exit) {
if (wait_on_condition(&proc->mutex_prach_br,&proc->cond_prach_br,&proc->instance_cnt_prach_br,"eNB_prach_thread_br") < 0) break;
+9 -9
View File
@@ -778,7 +778,7 @@ static void *ru_thread_asynch_rxtx( void *param ) {
RU_t *ru = (RU_t *)param;
RU_proc_t *proc = &ru->proc;
int subframe=0, frame=0;
thread_top_init("ru_thread_asynch_rxtx",1,870000,1000000,1000000);
thread_top_init("ru_thread_asynch_rxtx");
// wait for top-level synchronization and do one acquisition to get timestamp for setting frame/subframe
wait_sync("ru_thread_asynch_rxtx");
// wait for top-level synchronization and do one acquisition to get timestamp for setting frame/subframe
@@ -869,7 +869,7 @@ void *ru_thread_prach( void *param ) {
RU_proc_t *proc = (RU_proc_t *)&ru->proc;
// set default return value
ru_thread_prach_status = 0;
thread_top_init("ru_thread_prach",1,500000,1000000,20000000);
thread_top_init("ru_thread_prach");
//wait_sync("ru_thread_prach");
while (*ru->ru_mask>0 && ru->function!=eNodeB_3GPP) {
@@ -919,7 +919,7 @@ void *ru_thread_prach_br( void *param ) {
RU_proc_t *proc = (RU_proc_t *)&ru->proc;
// set default return value
ru_thread_prach_status = 0;
thread_top_init("ru_thread_prach_br",1,500000,1000000,20000000);
thread_top_init("ru_thread_prach_br");
//wait_sync("ru_thread_prach_br");
while (!oai_exit) {
@@ -1411,7 +1411,7 @@ static void *ru_thread_tx( void *param ) {
L1_rxtx_proc_t *L1_proc;
cpu_set_t cpuset;
CPU_ZERO(&cpuset);
thread_top_init("ru_thread_tx",1,400000,500000,500000);
thread_top_init("ru_thread_tx");
//CPU_SET(5, &cpuset);
//pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
//wait_sync("ru_thread_tx");
@@ -1518,7 +1518,7 @@ static void *ru_thread( void *param ) {
dlsch_ue_select_tbl_in_use = 1;
#endif
// set default return value
thread_top_init("ru_thread",1,400000,500000,500000);
thread_top_init("ru_thread");
//CPU_SET(1, &cpuset);
//pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
pthread_setname_np( pthread_self(),"ru thread");
@@ -1799,7 +1799,7 @@ static void *ru_thread_synch(void *arg) {
int64_t peak_val, avg;
static int ru_thread_synch_status = 0;
int cnt=0;
thread_top_init("ru_thread_synch",0,5000000,10000000,10000000);
thread_top_init("ru_thread_synch");
wait_sync("ru_thread_synch");
// initialize variables for PSS detection
ru_sync_time_init(ru); //lte_sync_time_init(ru->frame_parms);
@@ -1873,7 +1873,7 @@ void *pre_scd_thread( void *param ) {
frame = 0;
subframe = 4;
thread_top_init("pre_scd_thread",0,870000,1000000,1000000);
thread_top_init("pre_scd_thread");
while (!oai_exit) {
if(oai_exit) {
@@ -1933,7 +1933,7 @@ static void *eNB_thread_phy_tx( void *param ) {
// set default return value
eNB_thread_phy_tx_status = 0;
int ret;
thread_top_init("eNB_thread_phy_tx",1,500000L,1000000L,20000000L);
thread_top_init("eNB_thread_phy_tx");
while (!oai_exit) {
if (oai_exit) break;
@@ -1988,7 +1988,7 @@ static void *rf_tx( void *param ) {
RU_proc_t *proc = &ru->proc;
// set default return value
rf_tx_status = 0;
thread_top_init("rf_tx",1,500000L,1000000L,20000000L);
thread_top_init("rf_tx");
while (!oai_exit) {
if (oai_exit) break;
+3 -3
View File
@@ -881,7 +881,7 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg) {
}
}
#else
thread_top_init("UE_phy_stub_thread_rxn_txnp4", 1, 870000L, 1000000L, 1000000L);
thread_top_init("UE_phy_stub_thread_rxn_txnp4");
#endif
// for multipule UE's L2-emulator
//module_id_t Mod_id = 0;
@@ -1235,7 +1235,7 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg) {
static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) {
#if 0 // TODO: doesn't currently compile, obviated by multi-ue proxy
thread_top_init("UE_phy_stub_thread_rxn_txnp4",1,870000L,1000000L,1000000L);
thread_top_init("UE_phy_stub_thread_rxn_txnp4");
// for multipule UE's L2-emulator
//module_id_t Mod_id = 0;
//int init_ra_UE = -1; // This counter is used to initiate the RA of each UE in different SFrames
@@ -2227,7 +2227,7 @@ int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue,
//02/02/2018
static void *timer_thread( void *param ) {
thread_top_init("timer_thread",1,870000L,1000000L,1000000L);
thread_top_init("timer_thread");
timer_subframe =9;
timer_frame =1023;
//phy_stub_ticking = (SF_ticking*)malloc(sizeof(SF_ticking));
+4 -13
View File
@@ -140,8 +140,9 @@ static bool pdcp_config_req_asn1(const protocol_ctxt_t *const ctxt_pP,
uint8_t *const kRRCint_pP,
uint8_t *const kUPenc_pP);
void *pdcp_stats_thread(void *param) {
void *pdcp_stats_thread(void *param)
{
UNUSED(param);
FILE *fd;
int old_byte_cnt[MAX_MOBILES_PER_ENB][NB_RB_MAX],old_byte_cnt_rx[MAX_MOBILES_PER_ENB][NB_RB_MAX];
for (int i=0;i<MAX_MOBILES_PER_ENB;i++)
@@ -554,9 +555,7 @@ bool pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
const MBMS_flag_t MBMS_flagP,
const rb_id_t rb_idP,
const sdu_size_t sdu_buffer_sizeP,
uint8_t *const sdu_buffer_pP,
const uint32_t *const srcID,
const uint32_t *const dstID)
uint8_t *const sdu_buffer_pP)
//-----------------------------------------------------------------------------
{
pdcp_t *pdcp_p = NULL;
@@ -1857,8 +1856,6 @@ static bool pdcp_config_req_asn1(const protocol_ctxt_t *const ctxt_pP,
pdcp_config_set_security(
ctxt_pP,
pdcp_pP,
rb_idP,
lc_idP,
security_modeP,
kRRCenc_pP,
kRRCint_pP,
@@ -1878,8 +1875,6 @@ static bool pdcp_config_req_asn1(const protocol_ctxt_t *const ctxt_pP,
pdcp_config_set_security(
ctxt_pP,
pdcp_pP,
rb_idP,
lc_idP,
security_modeP,
kRRCenc_pP,
kRRCint_pP,
@@ -1942,8 +1937,6 @@ static bool pdcp_config_req_asn1(const protocol_ctxt_t *const ctxt_pP,
pdcp_config_set_security(
ctxt_pP,
pdcp_pP,
rb_idP,
lc_idP,
security_modeP,
kRRCenc_pP,
kRRCint_pP,
@@ -1963,8 +1956,6 @@ void
pdcp_config_set_security(
const protocol_ctxt_t *const ctxt_pP,
pdcp_t *const pdcp_pP,
const rb_id_t rb_idP,
const uint16_t lc_idP,
const uint8_t security_modeP,
uint8_t *const kRRCenc,
uint8_t *const kRRCint,
+1 -5
View File
@@ -240,8 +240,6 @@ bool cu_f1u_data_req(protocol_ctxt_t *ctxt_pP,
* \param[in] rab_id Radio Bearer ID
* \param[in] sdu_buffer_size Size of incoming SDU in bytes
* \param[in] sdu_buffer Buffer carrying SDU
* \param[in] srcID
* \param[in] dstID
* \return TRUE on success, false otherwise
* \note None
* @ingroup _pdcp
@@ -251,9 +249,7 @@ bool pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
const MBMS_flag_t MBMS_flagP,
const rb_id_t rb_idP,
const sdu_size_t sdu_buffer_sizeP,
uint8_t *const sdu_buffer_pP,
const uint32_t *const srcID,
const uint32_t *const dstID);
uint8_t *const sdu_buffer_pP);
/*! \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
@@ -129,8 +129,11 @@ bool pdcp_serialize_control_pdu_for_pdcp_status_report(unsigned char* pdu_buffer
int pdcp_netlink_dequeue_element(const protocol_ctxt_t* const ctxt_pP,
struct pdcp_netlink_element_s **data_ppP);
void pdcp_config_set_security(const protocol_ctxt_t* const ctxt_pP, pdcp_t *pdcp_pP, rb_id_t rb_idP,
uint16_t lc_idP, uint8_t security_modeP, uint8_t *kRRCenc_pP, uint8_t *kRRCint_pP, uint8_t *kUPenc_pP);
void pdcp_config_set_security(const protocol_ctxt_t* const ctxt_pP,
pdcp_t *pdcp_pP,uint8_t security_modeP,
uint8_t *kRRCenc_pP,
uint8_t *kRRCint_pP,
uint8_t *kUPenc_pP);
int pdcp_apply_security(const protocol_ctxt_t* const ctxt_pP,
pdcp_t *pdcp_entity,
+1 -1
View File
@@ -398,7 +398,7 @@ rb_found:
exit(1);
}
memcpy(memblock, buf, size);
if (!pdcp_data_ind(&ctx, is_srb, is_mbms, rb_id, size, memblock, NULL, NULL)) {
if (!pdcp_data_ind(&ctx, is_srb, is_mbms, rb_id, size, memblock)) {
LOG_E(RLC, "ERROR: pdcp_data_ind failed (is_srb %d rb_id %d rnti %x)\n", is_srb, rb_id, ue->rnti);
/* what to do in case of failure? for the moment: nothing */
}
+1 -3
View File
@@ -88,8 +88,6 @@ static const float RSRQ_meas_mapping[35] = {-19, -18.5, -18, -17.5, -17, -16.5,
extern void pdcp_config_set_security(
const protocol_ctxt_t *const ctxt_pP,
pdcp_t *const pdcp_pP,
const rb_id_t rb_idP,
const uint16_t lc_idP,
const uint8_t security_modeP,
uint8_t *const kRRCenc,
uint8_t *const kRRCint,
@@ -1514,7 +1512,7 @@ rrc_ue_process_securityModeCommand(
derive_key_nas(UP_ENC_ALG, UE_rrc_inst[ctxt_pP->module_id].ciphering_algorithm, UE_rrc_inst[ctxt_pP->module_id].kenb, kUPenc);
if (securityMode != 0xff) {
pdcp_config_set_security(ctxt_pP, pdcp_p, 0, 0,
pdcp_config_set_security(ctxt_pP, pdcp_p,
UE_rrc_inst[ctxt_pP->module_id].ciphering_algorithm
| (UE_rrc_inst[ctxt_pP->module_id].integrity_algorithm << 4),
kRRCenc, kRRCint, kUPenc);
-2
View File
@@ -502,8 +502,6 @@ rrc_pdcp_config_security(
pdcp_config_set_security(
ctxt_pP,
pdcp_p,
DCCH,
DCCH+2,
(send_security_mode_command == true) ?
0 | (ue_context_pP->ue_context.integrity_algorithm << 4) :
(ue_context_pP->ue_context.ciphering_algorithm ) |