From: Georgina Sheehan Date: Thu, 12 Oct 2017 11:13:59 +0000 (+0100) Subject: plugins/dpdk: align memory to avoid potential segfault and false sharing X-Git-Tag: v17.10~11 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=abc914b7da7ec7da9c6e5f4738b14d984a2edcb1;p=vpp.git plugins/dpdk: align memory to avoid potential segfault and false sharing VPP-1025 Change-Id: I87bb8f38974a7be274c1b1d205f5513e7d068e48 Signed-off-by: Georgina --- diff --git a/src/plugins/dpdk/buffer.c b/src/plugins/dpdk/buffer.c index e09d80194ed..02a11b83891 100644 --- a/src/plugins/dpdk/buffer.c +++ b/src/plugins/dpdk/buffer.c @@ -188,7 +188,7 @@ fill_free_list (vlib_main_t * vm, /* Always allocate new buffers in reasonably large sized chunks. */ n = clib_max (n, fl->min_n_buffers_each_physmem_alloc); - vec_validate (vm->mbuf_alloc_list, n - 1); + vec_validate_aligned (vm->mbuf_alloc_list, n - 1, CLIB_CACHE_LINE_BYTES); if (rte_mempool_get_bulk (rmp, vm->mbuf_alloc_list, n) < 0) return 0;