aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/vec_bootstrap.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2022-03-18 15:48:12 +0100
committerFlorin Coras <florin.coras@gmail.com>2022-03-18 22:17:45 +0000
commit3cfd529bd0f7c11ad39ad82a704d95ee5e818013 (patch)
treef79282cb930137872acb54b629f9cae4dee13e97 /src/vppinfra/vec_bootstrap.h
parentf56b007356c145e0ef56e3590a20771a98383748 (diff)
vppinfra: deprecate vec numa macros
More generic vector heap code coming in another patch... Type: refactor Change-Id: I2327128fb3aba9d5d330f46a35afec32e1e3942e Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/vec_bootstrap.h')
-rw-r--r--src/vppinfra/vec_bootstrap.h30
1 files changed, 1 insertions, 29 deletions
diff --git a/src/vppinfra/vec_bootstrap.h b/src/vppinfra/vec_bootstrap.h
index 5dc1b6af540..bb6ac84e734 100644
--- a/src/vppinfra/vec_bootstrap.h
+++ b/src/vppinfra/vec_bootstrap.h
@@ -55,15 +55,12 @@
typedef struct
{
u32 len; /**< Number of elements in vector (NOT its allocated length). */
- u8 numa_id; /**< NUMA id */
u8 hdr_size; /**< header size divided by VEC_HEADER_ROUND */
u8 log2_align; /**< data alignment */
- u8 vpad[1]; /**< pad to 8 bytes */
+ u8 vpad[2]; /**< 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
@@ -133,20 +130,6 @@ vec_header_end (void *v)
#define vec_len(v) ((v) ? _vec_len(v) : 0)
u32 vec_len_not_inline (void *v);
-/** \brief Vector's NUMA id (lvalue-capable)
-
- _vec_numa(v) does not check for null, but can be used as an lvalue
- (e.g. _vec_numa(v) = 1).
-*/
-
-#define _vec_numa(v) (_vec_find(v)->numa_id)
-
-/** \brief Return vector's NUMA ID (rvalue-only, NULL tolerant)
- vec_numa(v) checks for NULL, but cannot be used as an lvalue.
-*/
-#define vec_numa(v) ((v) ? _vec_numa(v) : 0)
-
-
/** \brief Number of data bytes in vector. */
#define vec_bytes(v) (vec_len (v) * sizeof (v[0]))
@@ -229,17 +212,6 @@ _vec_set_len (void *v, uword len, uword elt_size)
if (v) \
for ((var) = vec_len ((v)) - 1; (var) >= 0; (var)--)
-/** \brief return the NUMA index for a vector */
-always_inline uword
-vec_get_numa (void *v)
-{
- vec_header_t *vh;
- if (v == 0)
- return 0;
- vh = _vec_find (v);
- return vh->numa_id;
-}
-
#endif /* included_clib_vec_bootstrap_h */
/*