aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vlib/buffer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vlib/buffer.c b/src/vlib/buffer.c
index 82fe6412781..b5200ba5029 100644
--- a/src/vlib/buffer.c
+++ b/src/vlib/buffer.c
@@ -473,6 +473,10 @@ vlib_buffer_alloc_size (uword ext_hdr_size, uword data_size)
uword alloc_size = ext_hdr_size + sizeof (vlib_buffer_t) + data_size;
alloc_size = round_pow2 (alloc_size, VLIB_BUFFER_ALIGN);
+ /* in case when we have even number of 'cachelines', we add one more for
+ * better cache occupancy */
+ alloc_size |= VLIB_BUFFER_ALIGN;
+
return alloc_size;
}