diff options
author | Damjan Marion <damarion@cisco.com> | 2024-01-19 21:19:57 +0100 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2024-01-20 18:28:09 +0000 |
commit | 038dad7ef29b0b724071edb5f8cc7a9845584454 (patch) | |
tree | fd49f72aa41a215b73be0409dc1f512e1f82bef2 /src/vlib/CMakeLists.txt | |
parent | 5840c66bbc15b265e280997b028442f9fedd92f6 (diff) |
buffers: add compile-time option to set buffer alignment
Type: improvement
Change-Id: I88c4c45bed0bdd8686e17e4f77a7d32a08c995aa
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/CMakeLists.txt')
-rw-r--r-- | src/vlib/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vlib/CMakeLists.txt b/src/vlib/CMakeLists.txt index 76de4edcde2..9c4121672a5 100644 --- a/src/vlib/CMakeLists.txt +++ b/src/vlib/CMakeLists.txt @@ -22,6 +22,12 @@ else() set(BUFFER_ALLOC_FAULT_INJECTOR 0 CACHE STRING "fault injector off") endif() +if(VPP_PLATFORM_BUFFER_ALIGN) + set(VLIB_BUFFER_ALIGN ${VPP_PLATFORM_BUFFER_ALIGN}) +else() + set(VLIB_BUFFER_ALIGN ${VPP_CACHE_LINE_SIZE}) +endif() + set(PRE_DATA_SIZE 128 CACHE STRING "Buffer headroom size.") if (CMAKE_BUILD_TYPE_UC STREQUAL "DEBUG") |