From 50e7ea7b14863a155a359fb192df9a23883a3391 Mon Sep 17 00:00:00 2001 From: Benoît Ganne Date: Mon, 8 Apr 2024 16:49:06 +0200 Subject: vlib: fix vlib_buffer_free_inline() AVX-512 overflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 'queue' is declared on the stack and must be big enough to handle queue_size + max processed elements per loops. When AVX-512 was added, this additional max was not increased from 4 to 8 accordingly. Type: fix Fixes: 767a9ab4b1 Change-Id: I15f2f930fc316f92da2e4642f41852d856c06a48 Signed-off-by: Benoît Ganne --- src/vlib/buffer_funcs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vlib/buffer_funcs.h b/src/vlib/buffer_funcs.h index b3861a2f695..010289ce2be 100644 --- a/src/vlib/buffer_funcs.h +++ b/src/vlib/buffer_funcs.h @@ -777,7 +777,7 @@ vlib_buffer_free_inline (vlib_main_t * vm, u32 * buffers, u32 n_buffers, const int queue_size = 128; vlib_buffer_pool_t *bp = 0; u8 buffer_pool_index = ~0; - u32 n_queue = 0, queue[queue_size + 4]; + u32 n_queue = 0, queue[queue_size + 8]; vlib_buffer_template_t bt = {}; #if defined(CLIB_HAVE_VEC128) vlib_buffer_t bpi_mask = {.buffer_pool_index = ~0 }; -- cgit 1.2.3-korg