vlib: reduce default buffer memory size to be below RLIMIT_MEMLOCK
Change-Id: If36be24fa08e21c7718a1dced506a7f254dfb5cf
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/vlib/buffer.c b/src/vlib/buffer.c
index 711b835..502e74f 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;