aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-04-28 01:54:22 +0000
committerDave Barach <openvpp@barachs.net>2020-05-04 18:28:16 +0000
commit9845c20d77ce8e9e66c9a7693c6841cc971bd423 (patch)
tree04a313f6cd1d25fe47f70bc3981b7162d3c36724 /src/vnet/session/application.c
parent933c4ca5a0529b6ed22e0dcc52caa6c797f60563 (diff)
session: add option to preallocate fifo headers
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie47546ef36590b90ed481b14cf812afbecf7981c
Diffstat (limited to 'src/vnet/session/application.c')
-rw-r--r--src/vnet/session/application.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vnet/session/application.c b/src/vnet/session/application.c
index bf86cbff1d4..86e75c83ed0 100644
--- a/src/vnet/session/application.c
+++ b/src/vnet/session/application.c
@@ -517,6 +517,10 @@ application_alloc_and_init (app_init_args_t * a)
if (!application_verify_cfg (seg_type))
return VNET_API_ERROR_APP_UNSUPPORTED_CFG;
+ if (options[APP_OPTIONS_PREALLOC_FIFO_PAIRS]
+ && options[APP_OPTIONS_PREALLOC_FIFO_HDRS])
+ return VNET_API_ERROR_APP_UNSUPPORTED_CFG;
+
/* Check that the obvious things are properly set up */
application_verify_cb_fns (a->session_cb_vft);
@@ -535,6 +539,7 @@ application_alloc_and_init (app_init_args_t * a)
segment_manager_props_init (props);
props->segment_size = options[APP_OPTIONS_SEGMENT_SIZE];
props->prealloc_fifos = options[APP_OPTIONS_PREALLOC_FIFO_PAIRS];
+ props->prealloc_fifo_hdrs = options[APP_OPTIONS_PREALLOC_FIFO_HDRS];
if (options[APP_OPTIONS_ADD_SEGMENT_SIZE])
{
props->add_segment_size = options[APP_OPTIONS_ADD_SEGMENT_SIZE];