From 36217e3ca8a1ca2e7a341b6b44ffc25e6497191c Mon Sep 17 00:00:00 2001 From: Filip Tehlar Date: Fri, 23 Jul 2021 08:51:10 +0000 Subject: api: API trace improvements Type: improvement * add support for JSON format in API trace * add ability to replay JSON API trace in both VPP and VAT2 * use CRC for backward compatibility check during JSON API replay * fix API trace CLI (and remove duplicits) * remove custom dump * remove vppapitrace.py * update docs accordingly Change-Id: I5294f68bebe6cbe738630f457f3a87720e06486b Signed-off-by: Filip Tehlar Signed-off-by: Ole Troan --- src/vlibmemory/memory_api.c | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) (limited to 'src/vlibmemory/memory_api.c') diff --git a/src/vlibmemory/memory_api.c b/src/vlibmemory/memory_api.c index 9db27ebd574..6c066a152f4 100644 --- a/src/vlibmemory/memory_api.c +++ b/src/vlibmemory/memory_api.c @@ -38,26 +38,6 @@ #include #undef vl_endianfun -static inline void * -vl_api_memclnt_create_t_print (vl_api_memclnt_create_t * a, void *handle) -{ - vl_print (handle, "vl_api_memclnt_create_t:\n"); - vl_print (handle, "name: %s\n", a->name); - vl_print (handle, "input_queue: 0x%wx\n", a->input_queue); - vl_print (handle, "context: %u\n", (unsigned) a->context); - vl_print (handle, "ctx_quota: %ld\n", (long) a->ctx_quota); - return handle; -} - -static inline void * -vl_api_memclnt_delete_t_print (vl_api_memclnt_delete_t * a, void *handle) -{ - vl_print (handle, "vl_api_memclnt_delete_t:\n"); - vl_print (handle, "index: %u\n", (unsigned) a->index); - vl_print (handle, "handle: 0x%wx\n", a->handle); - return handle; -} - volatile int **vl_api_queue_cursizes; static void @@ -417,11 +397,11 @@ vl_api_memclnt_keepalive_t_handler (vl_api_memclnt_keepalive_t * mp) * don't trace memclnt_keepalive[_reply] msgs */ -#define foreach_vlib_api_msg \ -_(MEMCLNT_CREATE, memclnt_create, 1) \ -_(MEMCLNT_DELETE, memclnt_delete, 1) \ -_(MEMCLNT_KEEPALIVE, memclnt_keepalive, 0) \ -_(MEMCLNT_KEEPALIVE_REPLY, memclnt_keepalive_reply, 0) +#define foreach_vlib_api_msg \ + _ (MEMCLNT_CREATE, memclnt_create, 0) \ + _ (MEMCLNT_DELETE, memclnt_delete, 0) \ + _ (MEMCLNT_KEEPALIVE, memclnt_keepalive, 0) \ + _ (MEMCLNT_KEEPALIVE_REPLY, memclnt_keepalive_reply, 0) /* * memory_api_init -- cgit 1.2.3-korg