diff options
Diffstat (limited to 'src/vppinfra/vec_bootstrap.h')
-rw-r--r-- | src/vppinfra/vec_bootstrap.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/vppinfra/vec_bootstrap.h b/src/vppinfra/vec_bootstrap.h index f2940288110..d628d3827f9 100644 --- a/src/vppinfra/vec_bootstrap.h +++ b/src/vppinfra/vec_bootstrap.h @@ -56,12 +56,16 @@ typedef struct { u32 len; /**< Number of elements in vector (NOT its allocated length). */ u8 numa_id; /**< NUMA id */ - u8 vpad[3]; /**< pad to 8 bytes */ + u8 hdr_size; /**< header size divided by VEC_HEADER_ROUND */ + u8 log2_align; /**< data alignment */ + u8 vpad[1]; /**< pad to 8 bytes */ u8 vector_data[0]; /**< Vector data . */ } vec_header_t; #define VEC_NUMA_UNSPECIFIED (0xFF) +#define VEC_HEADER_ROUND 8 + /** \brief Find the vector header Given the user's pointer to a vector, find the corresponding @@ -78,8 +82,7 @@ typedef struct always_inline uword vec_header_bytes (uword header_bytes) { - return round_pow2 (header_bytes + sizeof (vec_header_t), - sizeof (vec_header_t)); + return round_pow2 (header_bytes + sizeof (vec_header_t), VEC_HEADER_ROUND); } /** \brief Find a user vector header |