summaryrefslogtreecommitdiffstats
path: root/src/vlibmemory/memory_client.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-12-04 16:34:05 -0800
committerDave Barach <openvpp@barachs.net>2018-12-05 15:38:51 +0000
commiteaec2a6d9ab8b983aaee536be1a95846c07a9d7f (patch)
treefdea9758127769ab978e9fc5c737282a85ba821a /src/vlibmemory/memory_client.c
parent955bfbbb6968bdc99171bdebcda6dbe605af2004 (diff)
bapi: add options to have vpp cleanup client registration
A client can send a memclnt delete message and ask vpp to cleanup the shared memory queue. Obviously, in this case no delete reply is sent back to the client. Change-Id: I9c8375093f8607680ad498a6bed0690ba02a7c3b Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vlibmemory/memory_client.c')
-rw-r--r--src/vlibmemory/memory_client.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vlibmemory/memory_client.c b/src/vlibmemory/memory_client.c
index 79344a6af68..3add39a4328 100644
--- a/src/vlibmemory/memory_client.c
+++ b/src/vlibmemory/memory_client.c
@@ -271,7 +271,7 @@ vl_api_memclnt_delete_reply_t_handler (vl_api_memclnt_delete_reply_t * mp)
}
void
-vl_client_send_disconnect (void)
+vl_client_send_disconnect (u8 do_cleanup)
{
vl_api_memclnt_delete_t *mp;
vl_shmem_hdr_t *shmem_hdr;
@@ -286,6 +286,7 @@ vl_client_send_disconnect (void)
mp->_vl_msg_id = ntohs (VL_API_MEMCLNT_DELETE);
mp->index = am->my_client_index;
mp->handle = (uword) am->my_registration;
+ mp->do_cleanup = do_cleanup;
vl_msg_api_send_shmem (shmem_hdr->vl_input_queue, (u8 *) & mp);
}
@@ -299,7 +300,7 @@ vl_client_disconnect (void)
time_t begin;
vl_input_queue = am->vl_input_queue;
- vl_client_send_disconnect ();
+ vl_client_send_disconnect (0 /* wait for reply */ );
/*
* Have to be careful here, in case the client is disconnecting