Skip to content

Commit 9b1d341

Browse files
committed
igsc: enable traffic dump in trace mode only
Print traffic dump only if log mode is trace. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
1 parent ac0acdf commit 9b1d341

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/igsc_lib.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static int status_tee2fu(TEESTATUS status)
8282
}
8383
}
8484

85-
static void gsc_trace_hex_dump(const char *title, const void *buf, size_t len)
85+
static void __gsc_trace_hex_dump(const char *title, const void *buf, size_t len)
8686
{
8787
#define pbufsz (16 * 3)
8888
char pbuf[pbufsz];
@@ -107,6 +107,12 @@ static void gsc_trace_hex_dump(const char *title, const void *buf, size_t len)
107107
}
108108
}
109109

110+
static inline void gsc_trace_hex_dump(const char* title, const void* buf, size_t len)
111+
{
112+
if (igsc_get_log_level() >= IGSC_LOG_LEVEL_TRACE)
113+
__gsc_trace_hex_dump(title, buf, len);
114+
}
115+
110116
mockable_static
111117
void driver_working_buffer_free(struct igsc_lib_ctx *lib_ctx)
112118
{

0 commit comments

Comments
 (0)