diff options
author | Damjan Marion <damarion@cisco.com> | 2019-01-23 12:51:36 +0100 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2019-01-23 13:47:07 +0000 |
commit | c0b7a82a924e098a4afde28e9fc327de83da6475 (patch) | |
tree | a314007d555bec63064aee21966bbc2a4e6164b9 /src | |
parent | 78c0ff758fe85a4e8cd1f4248b84016a0d826752 (diff) |
vppinfra: add CLIB_CACHE_LINE_ROUND() macro
Change-Id: Ic141162acaf39878ab978a997e3f6757d4f7c240
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/vppinfra/cache.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vppinfra/cache.h b/src/vppinfra/cache.h index e8e89ba8556..e2c406d8432 100644 --- a/src/vppinfra/cache.h +++ b/src/vppinfra/cache.h @@ -58,6 +58,7 @@ #define CLIB_CACHE_LINE_BYTES (1 << CLIB_LOG2_CACHE_LINE_BYTES) #define CLIB_CACHE_LINE_ALIGN_MARK(mark) u8 mark[0] __attribute__((aligned(CLIB_CACHE_LINE_BYTES))) +#define CLIB_CACHE_LINE_ROUND(x) ((x + CLIB_CACHE_LINE_BYTES - 1) & ~(CLIB_CACHE_LINE_BYTES - 1)) /* Default cache line fill buffers. */ #ifndef CLIB_N_PREFETCHES |