aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlibmemory/memory_api.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2021-03-26 13:45:37 +0100
committerDamjan Marion <damarion@cisco.com>2021-03-26 16:33:42 +0100
commitf553a2cbbb8cca84ebf033335ebd2cd26dc19d69 (patch)
tree3705c2c0121769dff96a122cef13886d5f0e5205 /src/vlibmemory/memory_api.h
parent6ffb7c61899eb782416cbd2f117042a583f189f7 (diff)
vlib: introduce vlib_get_elog_main()
Type: improvement Change-Id: I73383eb15186021cd6527d112da8443a0082f129 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlibmemory/memory_api.h')
-rw-r--r--src/vlibmemory/memory_api.h27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/vlibmemory/memory_api.h b/src/vlibmemory/memory_api.h
index f6580067d46..843bf8935b2 100644
--- a/src/vlibmemory/memory_api.h
+++ b/src/vlibmemory/memory_api.h
@@ -67,17 +67,22 @@ vl_msg_api_handle_is_valid (u32 handle, u32 restarts)
return ((restarts & VL_API_EPOCH_MASK) == epoch);
}
-#define VL_MEM_API_LOG_Q_LEN(fmt,qlen) \
-if (TRACE_VLIB_MEMORY_QUEUE) \
- do { \
- ELOG_TYPE_DECLARE (e) = { \
- .format = fmt, \
- .format_args = "i4", \
- }; \
- struct { u32 len; } *ed; \
- ed = ELOG_DATA (&vm->elog_main, e); \
- ed->len = qlen; \
- } while (0)
+#define VL_MEM_API_LOG_Q_LEN(fmt, qlen) \
+ if (TRACE_VLIB_MEMORY_QUEUE) \
+ do \
+ { \
+ ELOG_TYPE_DECLARE (e) = { \
+ .format = fmt, \
+ .format_args = "i4", \
+ }; \
+ struct \
+ { \
+ u32 len; \
+ } * ed; \
+ ed = ELOG_DATA (&vlib_global_main.elog_main, e); \
+ ed->len = qlen; \
+ } \
+ while (0)
#endif /* SRC_VLIBMEMORY_MEMORY_API_H_ */