session: add config for evt qs segment size

Change-Id: I286d0d53a9ef2d6e28cd301eae25fc119d491f22
Signed-off-by: Florin Coras <fcoras@cisco.com>
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 532a242..a94a0c4 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -1243,7 +1243,7 @@
   u32 evt_q_length = 2048, evt_size = sizeof (session_event_t);
   ssvm_private_t *eqs = &smm->evt_qs_segment;
   api_main_t *am = &api_main;
-  u64 eqs_size = 64 << 20;
+  uword eqs_size = 64 << 20;
   pid_t vpp_pid = getpid ();
   void *oldheap;
   int i;
@@ -1280,7 +1280,7 @@
       svm_msg_q_ring_cfg_t rc[SESSION_MQ_N_RINGS] = {
 	{evt_q_length, evt_size, 0}
 	,
-	{evt_q_length << 1, 256, 0}
+	{evt_q_length >> 1, 256, 0}
       };
       cfg->consumer_pid = 0;
       cfg->n_rings = 2;
@@ -1636,6 +1636,9 @@
 	;
       else if (unformat (input, "evt_qs_memfd_seg"))
 	smm->evt_qs_use_memfd_seg = 1;
+      else if (unformat (input, "evt_qs_seg_size %U", unformat_memory_size,
+			 &smm->evt_qs_segment_size))
+	;
       else
 	return clib_error_return (0, "unknown input `%U'",
 				  format_unformat_error, input);
diff --git a/src/vnet/session/session.h b/src/vnet/session/session.h
index 7722f4f..721119f 100644
--- a/src/vnet/session/session.h
+++ b/src/vnet/session/session.h
@@ -154,7 +154,7 @@
   /** Session ssvm segment configs*/
   uword session_baseva;
   uword session_va_space_size;
-  u32 evt_qs_segment_size;
+  uword evt_qs_segment_size;
   u8 evt_qs_use_memfd_seg;
 
   /** Session table size parameters */