From c89c76737dfcf2aea2515f84a6ec5175c9f1e237 Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Fri, 19 Jul 2019 17:40:18 -0400 Subject: api: Disable tracing of memclnt_keepalive messages A waste of binary API trace space; an otherwise idle control-plane will eventually fill the api trace buffer with them. Type: fix Ticket: VPP-1725 Change-Id: Id8338ea4070cd76481595005986efc558f0694e6 Signed-off-by: Dave Barach (cherry picked from commit 996a757ff93233379bf0a464dce6d99f5d622ca4) --- src/vlibmemory/memory_api.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/vlibmemory/memory_api.c b/src/vlibmemory/memory_api.c index 123aa22f07f..b87aa76b2d0 100644 --- a/src/vlibmemory/memory_api.c +++ b/src/vlibmemory/memory_api.c @@ -420,11 +420,16 @@ vl_api_memclnt_keepalive_t_handler (vl_api_memclnt_keepalive_t * mp) vl_msg_api_send_shmem (shmem_hdr->vl_input_queue, (u8 *) & rmp); } +/* + * To avoid filling the API trace buffer with boring messages, + * don't trace memclnt_keepalive[_reply] msgs + */ + #define foreach_vlib_api_msg \ -_(MEMCLNT_CREATE, memclnt_create) \ -_(MEMCLNT_DELETE, memclnt_delete) \ -_(MEMCLNT_KEEPALIVE, memclnt_keepalive) \ -_(MEMCLNT_KEEPALIVE_REPLY, memclnt_keepalive_reply) \ +_(MEMCLNT_CREATE, memclnt_create, 1) \ +_(MEMCLNT_DELETE, memclnt_delete, 1) \ +_(MEMCLNT_KEEPALIVE, memclnt_keepalive, 0) \ +_(MEMCLNT_KEEPALIVE_REPLY, memclnt_keepalive_reply, 0) /* * memory_api_init @@ -444,7 +449,7 @@ vl_mem_api_init (const char *region_name) if ((rv = vl_map_shmem (region_name, 1 /* is_vlib */ )) < 0) return rv; -#define _(N,n) do { \ +#define _(N,n,t) do { \ c->id = VL_API_##N; \ c->name = #n; \ c->handler = vl_api_##n##_t_handler; \ @@ -452,7 +457,7 @@ vl_mem_api_init (const char *region_name) c->endian = vl_api_##n##_t_endian; \ c->print = vl_api_##n##_t_print; \ c->size = sizeof(vl_api_##n##_t); \ - c->traced = 1; /* trace, so these msgs print */ \ + c->traced = t; /* trace, so these msgs print */ \ c->replay = 0; /* don't replay client create/delete msgs */ \ c->message_bounce = 0; /* don't bounce this message */ \ vl_msg_api_config(c);} while (0); -- cgit 1.2.3-korg