aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-10-23 19:50:20 +0200
committerDamjan Marion <damarion@cisco.com>2018-10-23 19:50:23 +0200
commit901d16cced85b2ff7353009ca325de310654eb6c (patch)
treefeddeb8af9db7ebab71f1b47f5d4882c7342967f /src
parent68b4da67deb2e8ca224bb5abaeb9dbc7ae8e378c (diff)
vlib: reduce default buffer memory size to be below RLIMIT_MEMLOCK
Change-Id: If36be24fa08e21c7718a1dced506a7f254dfb5cf Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vlib/buffer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vlib/buffer.c b/src/vlib/buffer.c
index 711b83514f4..502e74fd291 100644
--- a/src/vlib/buffer.c
+++ b/src/vlib/buffer.c
@@ -47,7 +47,11 @@
#include <vlib/unix/unix.h>
vlib_buffer_callbacks_t *vlib_buffer_callbacks = 0;
-static u32 vlib_buffer_physmem_sz = 32 << 20;
+
+/* when running unpriviledged we are limited by RLIMIT_MEMLOCK which is
+ typically set to 16MB so setting default size for buffer memory to 14MB
+ */
+static u32 vlib_buffer_physmem_sz = 14 << 20;
vlib_buffer_main_t buffer_main;