summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application_interface.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-01-15 01:08:33 -0800
committerDave Barach <openvpp@barachs.net>2018-01-25 23:53:35 +0000
commitb384b543313b6b47a277c903e9d4fcd4343054fa (patch)
tree1996e3a25eb3a32fe5bbc405d75f38dd041a5a40 /src/vnet/session/application_interface.c
parent4e578068fc3fe8ba176d211123ddd88962dab315 (diff)
session: add support for memfd segments
- update segment manager and session api to work with both flavors of ssvm segments - added generic ssvm slave/master init and del functions - cleanup/refactor tcp_echo - fixed uses of svm fifo pool as vector Change-Id: Ieee8b163faa407da6e77e657a2322de213a9d2a0 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/application_interface.c')
-rw-r--r--src/vnet/session/application_interface.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/vnet/session/application_interface.c b/src/vnet/session/application_interface.c
index ec317896f14..f2a13be6144 100644
--- a/src/vnet/session/application_interface.c
+++ b/src/vnet/session/application_interface.c
@@ -413,11 +413,11 @@ session_validate_namespace (u8 * namespace_id, u64 secret, u32 * app_ns_index)
clib_error_t *
vnet_application_attach (vnet_app_attach_args_t * a)
{
+ svm_fifo_segment_private_t *fs;
application_t *app = 0;
segment_manager_t *sm;
- u8 *seg_name;
- u64 secret;
u32 app_ns_index = 0;
+ u64 secret;
int rv;
app = application_lookup (a->api_client_index);
@@ -437,16 +437,15 @@ vnet_application_attach (vnet_app_attach_args_t * a)
a->app_event_queue_address = pointer_to_uword (app->event_queue);
sm = segment_manager_get (app->first_segment_manager);
- segment_manager_get_segment_info (sm->segment_indices[0],
- &seg_name, &a->segment_size);
+ fs = segment_manager_get_segment (sm->segment_indices[0]);
if (application_is_proxy (app))
application_setup_proxy (app);
- a->segment_name_length = vec_len (seg_name);
- a->segment_name = seg_name;
- ASSERT (vec_len (a->segment_name) <= 128);
+ ASSERT (vec_len (fs->ssvm.name) <= 128);
+ a->segment = &fs->ssvm;
a->app_index = app->index;
+
return 0;
}