diff options
author | Dave Barach <dave@barachs.net> | 2018-08-08 09:09:05 -0400 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-10-24 15:21:31 +0000 |
commit | 71615399e194847d7833b744caedab9b841733e5 (patch) | |
tree | 08462c00b7036506abf696b08f05e363b2939bcf /src/vlibmemory/memory_api.c | |
parent | 70f28fc4b83fee72a1e2a17f5f898af83b4fb39c (diff) |
Keep RPC traffic off the shared-memory API queue
Change-Id: Ib5c346641463768cf33eaf8cb5fab5b63171398d
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vlibmemory/memory_api.c')
-rw-r--r-- | src/vlibmemory/memory_api.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/vlibmemory/memory_api.c b/src/vlibmemory/memory_api.c index a444ec785a7..aa0e25b72e5 100644 --- a/src/vlibmemory/memory_api.c +++ b/src/vlibmemory/memory_api.c @@ -704,6 +704,26 @@ vl_mem_api_handle_msg_main (vlib_main_t * vm, vlib_node_runtime_t * node) } int +vl_mem_api_handle_rpc (vlib_main_t * vm, vlib_node_runtime_t * node) +{ + api_main_t *am = &api_main; + int i; + uword *rpc_requests, mp; + + clib_spinlock_lock_if_init (&vm->pending_rpc_lock); + rpc_requests = vm->pending_rpc_requests; + + for (i = 0; i < vec_len (rpc_requests); i++) + { + mp = rpc_requests[i]; + vl_msg_api_handler_with_vm_node (am, (void *) mp, vm, node); + } + vec_reset_length (vm->pending_rpc_requests); + clib_spinlock_unlock_if_init (&vm->pending_rpc_lock); + return 0; +} + +int vl_mem_api_handle_msg_private (vlib_main_t * vm, vlib_node_runtime_t * node, u32 reg_index) { |