aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-09-28 23:40:28 -0700
committerDamjan Marion <dmarion@me.com>2020-09-30 10:11:21 +0000
commit2a7c0b6fc027e86727c08d98b66e19ad8768c82b (patch)
treecf037f459b5620fcf4151d272b3fad3d5fa82a19 /src/vnet/session/session.c
parent5aa34d54de1e3dcdab1b74207ef8a24cc67a0f5d (diff)
svm session: use new clib mem apis for segments
"sh memory map" now reports shared memory segments mapped by session layer for applications. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I7debdcd06c7728abfb5cf817a1ccc37de495472c
Diffstat (limited to 'src/vnet/session/session.c')
-rw-r--r--src/vnet/session/session.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index d27d1bbab23..5065f7834b1 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -1496,8 +1496,9 @@ session_vpp_event_queues_allocate (session_main_t * smm)
eqs->ssvm_size = eqs_size;
eqs->i_am_master = 1;
eqs->my_pid = vpp_pid;
- eqs->name = format (0, "%s%c", "evt-qs-segment", 0);
- eqs->requested_va = smm->session_baseva;
+ eqs->name = format (0, "%s%c", "session: evt-qs-segment", 0);
+ /* clib_mem_vm_map_shared consumes first page before requested_va */
+ eqs->requested_va = smm->session_baseva + clib_mem_get_page_size ();
if (ssvm_master_init (eqs, SSVM_SEGMENT_MEMFD))
{
@@ -1661,6 +1662,7 @@ session_manager_main_enable (vlib_main_t * vm)
session_main_t *smm = &session_main;
vlib_thread_main_t *vtm = vlib_get_thread_main ();
u32 num_threads, preallocated_sessions_per_worker;
+ uword margin = 8 << 12;
session_worker_t *wrk;
int i;
@@ -1691,7 +1693,7 @@ session_manager_main_enable (vlib_main_t * vm)
session_vpp_event_queues_allocate (smm);
/* Initialize fifo segment main baseva and timeout */
- sm_args->baseva = smm->session_baseva + smm->evt_qs_segment_size;
+ sm_args->baseva = smm->session_baseva + smm->evt_qs_segment_size + margin;
sm_args->size = smm->session_va_space_size;
segment_manager_main_init (sm_args);