import NFAPI work from David Price from Cisco (non-working commit, do not use it)
It has been chosen to not include the full history of commits from David. He included a binary version of wireshark, probably a modified one that understands NFAPI. Wireshark is released under the GPL license, we cannot include it in the repository. We could have done a next commit to remove this binary. But then it would still be present in the history of commits, which may not be allowed. And it would take space on disk. We could edit the history to remove wireshark entirely. But this operation is too complicated. There was also a pcap capture file, which has nothing to do in the history of commits and would take space on disk. There again, it's too difficult to edit the history to remove it. There was a file .gitignore that was also removed. The original history can be found on David's repository: https://gitlab.eurecom.fr/daveprice/openairinterface5g/ The branch is: nfapi-ru-rau-split. A copy of that branch has been included in the internal OAI repository, for those who have access to it. The branch is the same. The last commit ID is 9106438239e0bc626ff1fa1d97d911caadd0fbb9. You can compare the current commit with the commit 9106... to see what differs. The current commit has to be considered non-working. The commit following the current commit will fix problems with the work in the current commit. If you use git bisect, don't spend time analyzing the current commit.
This commit is contained in:
+346
-8
@@ -528,8 +528,340 @@ int logInit (void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void nfapi_log(char *file, char *func, int line, int comp, int level, const char* format, va_list args)
|
||||
{
|
||||
//logRecord_mt(file,func,line, pthread_self(), comp, level, format, ##args)
|
||||
int len = 0;
|
||||
log_component_t *c;
|
||||
char *log_start;
|
||||
char *log_end;
|
||||
/* The main difference with the version above is the use of this local log_buffer.
|
||||
* The other difference is the return value of snprintf which was not used
|
||||
* correctly. It was not a big problem because in practice MAX_LOG_TOTAL is
|
||||
* big enough so that the buffer is never full.
|
||||
*/
|
||||
char log_buffer[MAX_LOG_TOTAL];
|
||||
|
||||
/* for no gcc warnings */
|
||||
(void)log_start;
|
||||
(void)log_end;
|
||||
|
||||
c = &g_log->log_component[comp];
|
||||
|
||||
// do not apply filtering for LOG_F
|
||||
// only log messages which are enabled and are below the global log level and component's level threshold
|
||||
if ((level != LOG_FILE) && ((level > c->level) || (level > g_log->level))) {
|
||||
/* if ((level != LOG_FILE) &&
|
||||
((level > c->level) ||
|
||||
(level > g_log->level) ||
|
||||
( c->level > g_log->level))) {
|
||||
*/
|
||||
return;
|
||||
}
|
||||
|
||||
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_LOG_RECORD, VCD_FUNCTION_IN);
|
||||
|
||||
// adjust syslog level for TRACE messages
|
||||
if (g_log->syslog) {
|
||||
if (g_log->level > LOG_DEBUG) {
|
||||
g_log->level = LOG_DEBUG;
|
||||
}
|
||||
}
|
||||
|
||||
// make sure that for log trace the extra info is only printed once, reset when the level changes
|
||||
if ((level == LOG_FILE) || (c->flag == LOG_NONE) || (level == LOG_TRACE)) {
|
||||
log_start = log_buffer;
|
||||
len = vsnprintf(log_buffer, MAX_LOG_TOTAL, format, args);
|
||||
if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL;
|
||||
log_end = log_buffer + len;
|
||||
} else {
|
||||
if ( (g_log->flag & FLAG_COLOR) || (c->flag & FLAG_COLOR) ) {
|
||||
len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "%s",
|
||||
log_level_highlight_start[level]);
|
||||
if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL;
|
||||
}
|
||||
|
||||
log_start = log_buffer + len;
|
||||
|
||||
if ( (g_log->flag & FLAG_COMP) || (c->flag & FLAG_COMP) ) {
|
||||
len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "[%s]",
|
||||
g_log->log_component[comp].name);
|
||||
if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL;
|
||||
}
|
||||
|
||||
if ( (g_log->flag & FLAG_LEVEL) || (c->flag & FLAG_LEVEL) ) {
|
||||
len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "[%s]",
|
||||
g_log->level2string[level]);
|
||||
if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL;
|
||||
}
|
||||
|
||||
if ( (g_log->flag & FLAG_THREAD) || (c->flag & FLAG_THREAD) ) {
|
||||
# define THREAD_NAME_LEN 128
|
||||
char threadname[THREAD_NAME_LEN];
|
||||
if (pthread_getname_np(pthread_self(), threadname, THREAD_NAME_LEN) != 0)
|
||||
{
|
||||
perror("pthread_getname_np : ");
|
||||
} else {
|
||||
len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "[%s]", threadname);
|
||||
if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL;
|
||||
}
|
||||
# undef THREAD_NAME_LEN
|
||||
}
|
||||
|
||||
if ( (g_log->flag & FLAG_FUNCT) || (c->flag & FLAG_FUNCT) ) {
|
||||
len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "[%s] ",
|
||||
func);
|
||||
if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL;
|
||||
}
|
||||
|
||||
if ( (g_log->flag & FLAG_FILE_LINE) || (c->flag & FLAG_FILE_LINE) ) {
|
||||
len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "[%s:%d]",
|
||||
file, line);
|
||||
if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL;
|
||||
}
|
||||
|
||||
//len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "[%08lx]", thread_id);
|
||||
//if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL;
|
||||
|
||||
len += vsnprintf(&log_buffer[len], MAX_LOG_TOTAL - len, format, args);
|
||||
if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL;
|
||||
log_end = log_buffer + len;
|
||||
|
||||
if ( (g_log->flag & FLAG_COLOR) || (c->flag & FLAG_COLOR) ) {
|
||||
len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "%s",
|
||||
log_level_highlight_end[level]);
|
||||
if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL;
|
||||
}
|
||||
}
|
||||
|
||||
va_end(args);
|
||||
|
||||
// OAI printf compatibility
|
||||
if ((g_log->onlinelog == 1) && (level != LOG_FILE))
|
||||
#ifdef RTAI
|
||||
if (len > MAX_LOG_TOTAL) {
|
||||
rt_printk ("[OPENAIR] FIFO_PRINTF WROTE OUTSIDE ITS MEMORY BOUNDARY : ERRORS WILL OCCUR\n");
|
||||
}
|
||||
|
||||
if (len > 0) {
|
||||
rtf_put (FIFO_PRINTF_NO, log_buffer, len);
|
||||
}
|
||||
|
||||
#else
|
||||
fwrite(log_buffer, len, 1, stdout);
|
||||
#endif
|
||||
|
||||
#ifndef RTAI
|
||||
|
||||
if (g_log->syslog) {
|
||||
syslog(g_log->level, "%s", log_buffer);
|
||||
}
|
||||
|
||||
if (g_log->filelog) {
|
||||
if (write(gfd, log_buffer, len) < len) {
|
||||
// TODO assert ?
|
||||
}
|
||||
}
|
||||
|
||||
if ((g_log->log_component[comp].filelog) && (level == LOG_FILE)) {
|
||||
if (write(g_log->log_component[comp].fd, log_buffer, len) < len) {
|
||||
// TODO assert ?
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
// online print messges
|
||||
if ((g_log->log_component[comp].filelog) && (level == LOG_FILE)) {
|
||||
printf(log_buffer);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
|
||||
if (level <= LOG_DEBUG) {
|
||||
task_id_t origin_task_id = TASK_UNKNOWN;
|
||||
MessagesIds messages_id;
|
||||
MessageDef *message_p;
|
||||
size_t message_string_size;
|
||||
char *message_msg_p;
|
||||
|
||||
message_string_size = log_end - log_start;
|
||||
|
||||
#if !defined(DISABLE_ITTI_DETECT_SUB_TASK_ID)
|
||||
|
||||
/* Try to identify sub task ID from log information (comp, log_instance_type) */
|
||||
switch (comp) {
|
||||
case PHY:
|
||||
switch (log_instance_type) {
|
||||
case LOG_INSTANCE_ENB:
|
||||
origin_task_id = TASK_PHY_ENB;
|
||||
break;
|
||||
|
||||
case LOG_INSTANCE_UE:
|
||||
origin_task_id = TASK_PHY_UE;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case MAC:
|
||||
switch (log_instance_type) {
|
||||
case LOG_INSTANCE_ENB:
|
||||
origin_task_id = TASK_MAC_ENB;
|
||||
break;
|
||||
|
||||
case LOG_INSTANCE_UE:
|
||||
origin_task_id = TASK_MAC_UE;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case RLC:
|
||||
switch (log_instance_type) {
|
||||
case LOG_INSTANCE_ENB:
|
||||
origin_task_id = TASK_RLC_ENB;
|
||||
break;
|
||||
|
||||
case LOG_INSTANCE_UE:
|
||||
origin_task_id = TASK_RLC_UE;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case PDCP:
|
||||
switch (log_instance_type) {
|
||||
case LOG_INSTANCE_ENB:
|
||||
origin_task_id = TASK_PDCP_ENB;
|
||||
break;
|
||||
|
||||
case LOG_INSTANCE_UE:
|
||||
origin_task_id = TASK_PDCP_UE;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
switch (level) {
|
||||
case LOG_EMERG:
|
||||
case LOG_ALERT:
|
||||
case LOG_CRIT:
|
||||
case LOG_ERR:
|
||||
messages_id = ERROR_LOG;
|
||||
break;
|
||||
|
||||
case LOG_WARNING:
|
||||
messages_id = WARNING_LOG;
|
||||
break;
|
||||
|
||||
case LOG_NOTICE:
|
||||
messages_id = NOTICE_LOG;
|
||||
break;
|
||||
|
||||
case LOG_INFO:
|
||||
messages_id = INFO_LOG;
|
||||
break;
|
||||
|
||||
default:
|
||||
messages_id = DEBUG_LOG;
|
||||
break;
|
||||
}
|
||||
|
||||
message_p = itti_alloc_new_message_sized(origin_task_id, messages_id, message_string_size);
|
||||
|
||||
switch (level) {
|
||||
case LOG_EMERG:
|
||||
case LOG_ALERT:
|
||||
case LOG_CRIT:
|
||||
case LOG_ERR:
|
||||
message_msg_p = (char *) &message_p->ittiMsg.error_log;
|
||||
break;
|
||||
|
||||
case LOG_WARNING:
|
||||
message_msg_p = (char *) &message_p->ittiMsg.warning_log;
|
||||
break;
|
||||
|
||||
case LOG_NOTICE:
|
||||
message_msg_p = (char *) &message_p->ittiMsg.notice_log;
|
||||
break;
|
||||
|
||||
case LOG_INFO:
|
||||
message_msg_p = (char *) &message_p->ittiMsg.info_log;
|
||||
break;
|
||||
|
||||
default:
|
||||
message_msg_p = (char *) &message_p->ittiMsg.debug_log;
|
||||
break;
|
||||
}
|
||||
|
||||
memcpy(message_msg_p, log_start, message_string_size);
|
||||
|
||||
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
|
||||
}
|
||||
|
||||
#endif
|
||||
#if 0
|
||||
LOG_params log_params;
|
||||
int len;
|
||||
|
||||
len = vsnprintf(log_params.l_buff_info, MAX_LOG_INFO-1, format, args);
|
||||
|
||||
//2 first parameters must be passed as 'const' to the thread function
|
||||
log_params.file = strdup(file);
|
||||
log_params.func = strdup(func);
|
||||
log_params.line = line;
|
||||
log_params.comp = PHY;//comp;
|
||||
log_params.level = 6; // INFO - level;
|
||||
log_params.format = format;
|
||||
log_params.len = len;
|
||||
|
||||
if (pthread_mutex_lock(&log_lock) != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
log_list_tail++;
|
||||
log_list[log_list_tail - 1] = log_params;
|
||||
|
||||
if (log_list_tail >= 1000) {
|
||||
log_list_tail = 0;
|
||||
}
|
||||
|
||||
if (log_list_nb_elements < 1000) {
|
||||
log_list_nb_elements++;
|
||||
}
|
||||
|
||||
if(pthread_cond_signal(&log_notify) != 0) {
|
||||
pthread_mutex_unlock(&log_lock);
|
||||
return;
|
||||
}
|
||||
|
||||
if(pthread_mutex_unlock(&log_lock) != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
//log record: add to a list
|
||||
void logRecord(const char *file, const char *func, int line, int comp,
|
||||
void logRecord(const char *file, const char *func, int line, pthread_t thread_id, int comp,
|
||||
int level, const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
@@ -544,6 +876,7 @@ void logRecord(const char *file, const char *func, int line, int comp,
|
||||
log_params.file = strdup(file);
|
||||
log_params.func = strdup(func);
|
||||
log_params.line = line;
|
||||
log_params.thread_id = thread_id;
|
||||
log_params.comp = comp;
|
||||
log_params.level = level;
|
||||
log_params.format = format;
|
||||
@@ -582,7 +915,7 @@ void logRecord(const char *file, const char *func, int line, int comp,
|
||||
}
|
||||
|
||||
void logRecord_thread_safe(const char *file, const char *func,
|
||||
int line, int comp, int level,
|
||||
int line, pthread_t thread_id, int comp, int level,
|
||||
int len, const char *params_string)
|
||||
{
|
||||
log_component_t *c;
|
||||
@@ -634,6 +967,8 @@ void logRecord_thread_safe(const char *file, const char *func,
|
||||
func);
|
||||
}
|
||||
|
||||
//total_len += snprintf(&log_buffer[total_len], MAX_LOG_TOTAL - total_len, "[%08lx] ", thread_id);
|
||||
|
||||
if ((g_log->flag & FLAG_FILE_LINE) || (c->flag & FLAG_FILE_LINE) ) {
|
||||
total_len += snprintf(&log_buffer[total_len], MAX_LOG_TOTAL - total_len, "[%s:%d]",
|
||||
file, line);
|
||||
@@ -733,6 +1068,7 @@ void *log_thread_function(void *list)
|
||||
logRecord_thread_safe(log_params.file,
|
||||
log_params.func,
|
||||
log_params.line,
|
||||
log_params.thread_id,
|
||||
log_params.comp,
|
||||
log_params.level,
|
||||
log_params.len,
|
||||
@@ -1021,8 +1357,8 @@ void logRecord_mt(const char *file, const char *func, int line, int comp,
|
||||
#endif /* #if 0 */
|
||||
|
||||
//log record, format, and print: executed in the main thread (mt)
|
||||
void logRecord_mt(const char *file, const char *func, int line, int comp,
|
||||
int level, const char *format, ...)
|
||||
void logRecord_mt(const char *file, const char *func, int line,
|
||||
pthread_t thread_id, int comp, int level, const char *format, ...)
|
||||
{
|
||||
int len = 0;
|
||||
va_list args;
|
||||
@@ -1053,8 +1389,7 @@ void logRecord_mt(const char *file, const char *func, int line, int comp,
|
||||
return;
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_LOG_RECORD,
|
||||
VCD_FUNCTION_IN);
|
||||
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_LOG_RECORD, VCD_FUNCTION_IN);
|
||||
|
||||
va_start(args, format);
|
||||
|
||||
@@ -1117,13 +1452,16 @@ void logRecord_mt(const char *file, const char *func, int line, int comp,
|
||||
if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL;
|
||||
}
|
||||
|
||||
//len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "[%08lx]", thread_id);
|
||||
//if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL;
|
||||
|
||||
len += vsnprintf(&log_buffer[len], MAX_LOG_TOTAL - len, format, args);
|
||||
if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL;
|
||||
log_end = log_buffer + len;
|
||||
|
||||
if ( (g_log->flag & FLAG_COLOR) || (c->flag & FLAG_COLOR) ) {
|
||||
len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "%s",
|
||||
log_level_highlight_end[level]);
|
||||
log_level_highlight_end[level]);
|
||||
if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL;
|
||||
}
|
||||
}
|
||||
@@ -1142,7 +1480,7 @@ void logRecord_mt(const char *file, const char *func, int line, int comp,
|
||||
}
|
||||
|
||||
#else
|
||||
fwrite(log_buffer, len, 1, stdout);
|
||||
fwrite(log_buffer, len, 1, stdout);
|
||||
#endif
|
||||
|
||||
#ifndef RTAI
|
||||
|
||||
+21
-6
@@ -240,6 +240,7 @@ typedef struct LOG_params {
|
||||
const char *file;
|
||||
const char *func;
|
||||
int line;
|
||||
pthread_t thread_id;
|
||||
int comp;
|
||||
int level;
|
||||
const char *format;
|
||||
@@ -262,8 +263,8 @@ void log_set_instance_type (log_instance_type_t instance);
|
||||
# include "log_if.h"
|
||||
/*----------------------------------------------------------------------------*/
|
||||
int logInit (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 logRecord(const char *file, const char *func, int line,int comp, int level, const char *format, ...) __attribute__ ((format (printf, 6, 7)));
|
||||
void logRecord_mt(const char *file, const char *func, int line,pthread_t thread_id, int comp, int level, const char *format, ...) __attribute__ ((format (printf, 7, 8)));
|
||||
void logRecord(const char *file, const char *func, int line, pthread_t thread_id, int comp, int level, const char *format, ...) __attribute__ ((format (printf, 7, 8)));
|
||||
int set_comp_log(int component, int level, int verbosity, int interval);
|
||||
int set_log(int component, int level, int interval);
|
||||
void set_glog(int level, int verbosity);
|
||||
@@ -285,15 +286,15 @@ void *log_thread_function(void * list);
|
||||
#ifdef USER_MODE
|
||||
//#define logIt(component, level, format, args...) do {logRecord(__FILE__, __FUNCTION__, __LINE__, component, level, format, ##args);} while(0);
|
||||
#ifdef LOG_NO_THREAD
|
||||
#define logIt(component, level, format, args...) logRecord_mt(__FILE__, __FUNCTION__, __LINE__, component, level, format, ##args)
|
||||
#define logIt(component, level, format, args...) logRecord_mt(__FILE__, __FUNCTION__, __LINE__, pthread_self(), component, level, format, ##args)
|
||||
#else //default
|
||||
#define logIt(component, level, format, args...) logRecord(__FILE__, __FUNCTION__, __LINE__, component, level, format, ##args)
|
||||
#define logIt(component, level, format, args...) logRecord(__FILE__, __FUNCTION__, __LINE__, pthread_self(), component, level, format, ##args)
|
||||
#endif
|
||||
#else
|
||||
#ifdef LOG_NO_THREAD
|
||||
#define logIt(component, level, format, args...) logRecord_mt(NULL, __FUNCTION__, __LINE__, component, level, format, ##args)
|
||||
#define logIt(component, level, format, args...) logRecord_mt(NULL, __FUNCTION__, __LINE__, pthread_self(), component, level, format, ##args)
|
||||
#else // default
|
||||
#define logIt(component, level, format, args...) logRecord(NULL, __FUNCTION__, __LINE__, component, level, format, ##args)
|
||||
#define logIt(component, level, format, args...) logRecord(NULL, __FUNCTION__, __LINE__, pthread_self(), component, level, format, ##args)
|
||||
#endif
|
||||
#endif
|
||||
/* @}*/
|
||||
@@ -352,6 +353,19 @@ void *log_thread_function(void * list);
|
||||
# define LOG_N(c, x...) /* */
|
||||
# define LOG_F(c, x...) /* */
|
||||
# else /*DISABLE_LOG_X*/
|
||||
#if 0
|
||||
extern log_t *g_log;
|
||||
# define LOG_G(c, x...) do { if (g_log->log_component[c].level > g_log->level || LOG_EMERG > g_log->log_component[c].level || LOG_EMERG > g_log->level) logIt(c, LOG_EMERG, x); } while(0)
|
||||
# define LOG_A(c, x...) do { if (g_log->log_component[c].level > g_log->level || LOG_ALERT > g_log->log_component[c].level || LOG_ALERT > g_log->level) logIt(c, LOG_ALERT, x); } while(0)
|
||||
# define LOG_C(c, x...) do { if (g_log->log_component[c].level > g_log->level || LOG_CRIT > g_log->log_component[c].level || LOG_CRIT > g_log->level) logIt(c, LOG_CRIT, x); } while(0)
|
||||
# define LOG_E(c, x...) do { if (g_log->log_component[c].level > g_log->level || LOG_ERR > g_log->log_component[c].level || LOG_ERR > g_log->level) logIt(c, LOG_ERR, x); } while(0)
|
||||
# define LOG_W(c, x...) do { if (g_log->log_component[c].level > g_log->level || LOG_WARNING > g_log->log_component[c].level || LOG_WARNING > g_log->level) logIt(c, LOG_WARNING, x); } while(0)
|
||||
# define LOG_N(c, x...) do { if (g_log->log_component[c].level > g_log->level || LOG_NOTICE > g_log->log_component[c].level || LOG_NOTICE > g_log->level) logIt(c, LOG_NOTICE, x); } while(0)
|
||||
# define LOG_I(c, x...) do { if (g_log->log_component[c].level > g_log->level || LOG_INFO > g_log->log_component[c].level || LOG_INFO > g_log->level) logIt(c, LOG_INFO, x); } while(0)
|
||||
# define LOG_D(c, x...) do { if (g_log->log_component[c].level > g_log->level || LOG_DEBUG > g_log->log_component[c].level || LOG_DEBUG > g_log->level) logIt(c, LOG_DEBUG, x); } while(0)
|
||||
# define LOG_F(c, x...) do { if (g_log->log_component[c].level > g_log->level || LOG_FILE > g_log->log_component[c].level || LOG_FILE > g_log->level) logIt(c, LOG_FILE, x); } while(0)
|
||||
# define LOG_T(c, x...) do { if (g_log->log_component[c].level > g_log->level || LOG_TRACE > g_log->log_component[c].level || LOG_TRACE > g_log->level) logIt(c, LOG_TRACE, x); } while(0)
|
||||
#else
|
||||
# define LOG_G(c, x...) logIt(c, LOG_EMERG, x)
|
||||
# define LOG_A(c, x...) logIt(c, LOG_ALERT, x)
|
||||
# define LOG_C(c, x...) logIt(c, LOG_CRIT, x)
|
||||
@@ -362,6 +376,7 @@ void *log_thread_function(void * list);
|
||||
# define LOG_D(c, x...) logIt(c, LOG_DEBUG, x)
|
||||
# define LOG_F(c, x...) logIt(c, LOG_FILE, x) // log to a file, useful for the MSC chart generation
|
||||
# define LOG_T(c, x...) logIt(c, LOG_TRACE, x)
|
||||
# endif /* 0 */
|
||||
# endif /*DISABLE_LOG_X*/
|
||||
# endif /* T_TRACER */
|
||||
#else /* USER_MODE */
|
||||
|
||||
@@ -399,6 +399,17 @@ const char* eurecomFunctionsNames[] = {
|
||||
|
||||
"compress_if",
|
||||
"decompress_if",
|
||||
|
||||
"nfapi_subframe",
|
||||
"generate_pcfich",
|
||||
"generate_dci0",
|
||||
"generate_dlsch",
|
||||
"generate_phich",
|
||||
"pdcch_scrambling",
|
||||
"pdcch_modulation",
|
||||
"pdcch_interleaving",
|
||||
"pdcch_tx",
|
||||
|
||||
};
|
||||
|
||||
struct vcd_module_s vcd_modules[] = {
|
||||
|
||||
@@ -376,6 +376,16 @@ typedef enum {
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_COMPR_IF,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF,
|
||||
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_NFAPI,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_PCFICH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DCI0,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_PHICH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCCH_SCRAMBLING,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCCH_MODULATION,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCCH_INTERLEAVING,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCCH_TX,
|
||||
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_END
|
||||
} vcd_signal_dump_functions;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user