summaryrefslogtreecommitdiffstats
path: root/src/vlibmemory/socket_api.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2020-07-17 17:16:34 -0400
committerDamjan Marion <dmarion@me.com>2020-07-19 13:06:06 +0000
commit38ca6e62d725ab81d304fb1af4ec8aae2fd78ba6 (patch)
tree9a05b8ba3d19b167e4cf613c9911eb5abcf55a2c /src/vlibmemory/socket_api.c
parent2e64b5a934a6e014c161e6f73aa461db1e4c7449 (diff)
api: call api reaper callbacks for socket clients
Add a callback to clear the per-client packet trace buffer cache. Save the packet trace dump pg setup script. Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I252be911b5f937ece0da5dca152263ece3d52963
Diffstat (limited to 'src/vlibmemory/socket_api.c')
-rw-r--r--src/vlibmemory/socket_api.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vlibmemory/socket_api.c b/src/vlibmemory/socket_api.c
index 6238746525a..566305ff7fc 100644
--- a/src/vlibmemory/socket_api.c
+++ b/src/vlibmemory/socket_api.c
@@ -170,6 +170,8 @@ vl_socket_free_registration_index (u32 pool_index)
{
int i;
vl_api_registration_t *rp;
+ void vl_api_call_reaper_functions (u32 client_index);
+
if (pool_is_free_index (socket_main.registration_pool, pool_index))
{
clib_warning ("main pool index %d already free", pool_index);
@@ -177,6 +179,8 @@ vl_socket_free_registration_index (u32 pool_index)
}
rp = pool_elt_at_index (socket_main.registration_pool, pool_index);
+ vl_api_call_reaper_functions (pool_index);
+
ASSERT (rp->registration_type != REGISTRATION_TYPE_FREE);
for (i = 0; i < vec_len (rp->additional_fds_to_close); i++)
if (close (rp->additional_fds_to_close[i]) < 0)