aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-03-01 17:12:02 -0800
committerDave Barach <openvpp@barachs.net>2019-03-02 23:40:53 +0000
commita0dbf9e02871a1a4e985f52d23908f9427a2d83a (patch)
tree252e1d9cd73c479d6b0eee59e9eb51bcc6a68952 /src
parent92311f63de1da5934403a08be57b6286e6cddb67 (diff)
session: notify app of segment removal
Change-Id: I3774f7ffd14be73e9bbbf4cdd6d3b22f24fee730 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vnet/session/segment_manager.c13
1 files changed, 12 insertions, 1 deletions
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);