summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-02-09 13:51:25 -0800
committerDamjan Marion <dmarion@me.com>2019-02-11 16:06:37 +0000
commitb4c1491f7419a91bc5b74f1aa00f56d4b07c5b14 (patch)
tree81905d09acafa2a114cc3860b52f432ef7d4885e /src/vnet
parentc1a4265b4b76bf7874b53e866549371c8daf70f4 (diff)
session: add config for evt qs segment size
Change-Id: I286d0d53a9ef2d6e28cd301eae25fc119d491f22 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/session/session.c7
-rw-r--r--src/vnet/session/session.h2
2 files changed, 6 insertions, 3 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 532a242cc5f..a94a0c40882 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -1243,7 +1243,7 @@ session_vpp_event_queues_allocate (session_manager_main_t * smm)
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 @@ session_vpp_event_queues_allocate (session_manager_main_t * smm)
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 @@ session_config_fn (vlib_main_t * vm, unformat_input_t * input)
;
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 7722f4f03e3..721119f0097 100644
--- a/src/vnet/session/session.h
+++ b/src/vnet/session/session.h
@@ -154,7 +154,7 @@ typedef struct session_manager_main_
/** 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 */