From a0dbf9e02871a1a4e985f52d23908f9427a2d83a Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Fri, 1 Mar 2019 17:12:02 -0800 Subject: session: notify app of segment removal Change-Id: I3774f7ffd14be73e9bbbf4cdd6d3b22f24fee730 Signed-off-by: Florin Coras --- src/vnet/session/segment_manager.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/vnet') diff --git a/src/vnet/session/segment_manager.c b/src/vnet/session/segment_manager.c index 63af299e9a8..0ec14f791ff 100644 --- a/src/vnet/session/segment_manager.c +++ b/src/vnet/session/segment_manager.c @@ -77,7 +77,18 @@ segment_manager_del_segment (segment_manager_t * sm, segment_manager_main_t *smm = &segment_manager_main; if (ssvm_type (&fs->ssvm) != SSVM_SEGMENT_PRIVATE) - clib_valloc_free (&smm->va_allocator, fs->ssvm.requested_va); + { + clib_valloc_free (&smm->va_allocator, fs->ssvm.requested_va); + + if (sm->app_wrk_index != SEGMENT_MANAGER_INVALID_APP_INDEX) + { + app_worker_t *app_wrk; + u64 segment_handle; + app_wrk = app_worker_get (sm->app_wrk_index); + segment_handle = segment_manager_segment_handle (sm, fs); + app_worker_del_segment_notify (app_wrk, segment_handle); + } + } ssvm_delete (&fs->ssvm); -- cgit 1.2.3-korg