summaryrefslogtreecommitdiffstats
path: root/src/vppinfra
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2020-02-24 09:19:12 -0500
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-03-30 13:56:18 +0000
commit892cc729f8a6cfddeb381ed18bbbd4e742e2a6d5 (patch)
tree30d897959a92e6899233a53e23a390b66b9d01a1 /src/vppinfra
parent118c4461b3ede5dbc9d118befaf09b5dd2f3204d (diff)
vppinfra: correct fixed pool header size calculation
Remove duplicate space allocation for the pool header. Not significant w/ CLIB_CACHE_LINE_BYTES >= 64 since the code rounds the size of the pool header to an even multiple of the cache line size. Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I923f2a60e7565cf2dfbc18d78264bf82ff30c926 (cherry picked from commit 6e495ce428e110665ee9616e0951015963502cac)
Diffstat (limited to 'src/vppinfra')
-rw-r--r--src/vppinfra/pool.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/vppinfra/pool.c b/src/vppinfra/pool.c
index ed04eb68e31..30848d55848 100644
--- a/src/vppinfra/pool.c
+++ b/src/vppinfra/pool.c
@@ -55,9 +55,7 @@ _pool_init_fixed (void **pool_ptr, u32 elt_size, u32 max_elts)
ASSERT (elt_size);
ASSERT (max_elts);
- vector_size = pool_aligned_header_bytes + vec_header_bytes (0)
- + (u64) elt_size *max_elts;
-
+ vector_size = pool_aligned_header_bytes + (u64) elt_size *max_elts;
free_index_size = vec_header_bytes (0) + sizeof (u32) * max_elts;
/* Round up to a cache line boundary */