aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application.c
diff options
context:
space:
mode:
authorRyujiro Shibuya <ryujiro.shibuya@owmobility.com>2019-12-25 07:40:54 +0000
committerDave Barach <openvpp@barachs.net>2020-02-25 19:18:49 +0000
commit234fe894d80a6ebc7e457bc86f2eea80d5ef01ea (patch)
tree89d1e728091669f4199f668b2438b26ab3f95d9b /src/vnet/session/application.c
parentf22f4e562e1b922cff036ef628b77fd2d479d015 (diff)
session svm: tracking segment memory usage
1. segment manager would attempt to balance the usages across the segments, when it allocate fifos 2. the memory presure level is determined per fifo-segment 3. updated unit test 4. updated cli output for segments Type: feature Signed-off-by: Ryujiro Shibuya <ryujiro.shibuya@owmobility.com> Change-Id: I2923f3e0a43dd919196a0cb2cd55e098fde6cf66
Diffstat (limited to 'src/vnet/session/application.c')
-rw-r--r--src/vnet/session/application.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/vnet/session/application.c b/src/vnet/session/application.c
index 646d6b6de2c..0dcb3e6ad94 100644
--- a/src/vnet/session/application.c
+++ b/src/vnet/session/application.c
@@ -550,6 +550,10 @@ application_alloc_and_init (app_init_args_t * a)
props->use_mq_eventfd = 1;
if (options[APP_OPTIONS_TLS_ENGINE])
app->tls_engine = options[APP_OPTIONS_TLS_ENGINE];
+ if (options[APP_OPTIONS_HIGH_WATERMARK])
+ props->high_watermark = options[APP_OPTIONS_HIGH_WATERMARK];
+ if (options[APP_OPTIONS_LOW_WATERMARK])
+ props->low_watermark = options[APP_OPTIONS_LOW_WATERMARK];
props->segment_type = seg_type;
/* Add app to lookup by api_client_index table */
@@ -698,8 +702,7 @@ application_alloc_worker_and_init (application_t * app, app_worker_t ** wrk)
sm = segment_manager_alloc ();
sm->app_wrk_index = app_wrk->wrk_index;
- if ((rv = segment_manager_init (sm, app->sm_properties.segment_size,
- app->sm_properties.prealloc_fifos)))
+ if ((rv = segment_manager_init (sm)))
{
app_worker_free (app_wrk);
return rv;