summaryrefslogtreecommitdiffstats
path: root/src/vlib/buffer.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-02-06 14:22:32 +0100
committerFlorin Coras <florin.coras@gmail.com>2019-02-06 18:00:17 +0000
commit5de3fec531691a81b3f77ed965488dc8dbf1e9a1 (patch)
tree57b8dde55804ab52a6ef40767f1fe705c1968d2a /src/vlib/buffer.h
parent672ab690182f3d4941d2640c68bb6ced38880bc3 (diff)
buffers: make buffer data size configurable from startup config
Example: buffers { default data-size 1536 } Change-Id: I5b4436850ca18025c9fdcfc7ed648c2c2732d660 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/buffer.h')
-rw-r--r--src/vlib/buffer.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vlib/buffer.h b/src/vlib/buffer.h
index 1adde73d4ee..31baf5fd21e 100644
--- a/src/vlib/buffer.h
+++ b/src/vlib/buffer.h
@@ -48,9 +48,10 @@
#include <vlib/error.h> /* for vlib_error_t */
#include <vlib/config.h> /* for __PRE_DATA_SIZE */
-#define VLIB_BUFFER_DATA_SIZE (2048)
#define VLIB_BUFFER_PRE_DATA_SIZE __PRE_DATA_SIZE
+#define VLIB_BUFFER_DEFAULT_DATA_SIZE (2048)
+
/* Minimum buffer chain segment size. Does not apply to last buffer in chain.
Dataplane code can safely asume that specified amount of data is not split
into 2 chained buffers */
@@ -413,6 +414,7 @@ typedef struct
/* config */
u32 buffers_per_numa;
u16 ext_hdr_size;
+ u32 default_data_size;
/* logging */
vlib_log_class_t log_default;