Go to the source code of this file.
|
#define | VERBOSE1(fmt, args...) |
|
#define | VERBOSE2(fmt, args...) |
|
#define | VERBOSE3(fmt, args...) |
|
#define | clib_mem_free_safe(p) |
|
#define | fill_with_random_data(ptr, bytes, seed) |
|
#define | compute_mem_hash(hash, ptr, bytes) |
|
#define | log2_align_down(value, align) |
|
#define | log2_align_up(value, align) |
|
#define | log2_align_ptr_down(ptr, align) uword_to_pointer (log2_align_down (pointer_to_uword (ptr), align), void *) |
|
#define | log2_align_ptr_up(ptr, align) uword_to_pointer (log2_align_up (pointer_to_uword (ptr), align), void *) |
|
#define | MAX_LOG2_ALIGN 6 |
|
#define | MAX_UNALIGN_OFFSET ((1 << MAX_LOG2_ALIGN) - 1) |
|
#define | memory_snap() |
|
◆ clib_mem_free_safe
#define clib_mem_free_safe |
( |
|
p | ) |
|
Value:do { \
if (p) \
{ \
clib_mem_free (p); \
(p) = NULL; \
} \
} while (0)
Definition at line 86 of file test_vec.h.
◆ compute_mem_hash
#define compute_mem_hash |
( |
|
hash, |
|
|
|
ptr, |
|
|
|
bytes |
|
) |
| |
Value:({ \
u8 * _v(p) = (
u8 *) (ptr); \
uword _v(b) = (
uword) (bytes); \
uword _v(
h) = (
u8) (hash); \
\
if (_v(p) && _v(b) > 0) \
{ \
for (_v(
i) = 0; _v(
i) < _v(b); _v(
i)++) \
} \
\
})
sll srl srl sll sra u16x4 i
Definition at line 145 of file test_vec.h.
◆ fill_with_random_data
#define fill_with_random_data |
( |
|
ptr, |
|
|
|
bytes, |
|
|
|
seed |
|
) |
| |
Value:do { \
u8 * _v(p) = (
u8 *) (ptr); \
uword _v(b) = (bytes); \
for (_v(
i) = 0; _v(
i) < _v(b); _v(
i)++) \
\
} while (0)
static u32 bounded_random_u32(u32 *seed, uword lo, uword hi)
for(i=1;i<=collision_buckets;i++)
sll srl srl sll sra u16x4 i
Definition at line 134 of file test_vec.h.
◆ log2_align_down
#define log2_align_down |
( |
|
value, |
|
|
|
align |
|
) |
| |
Value:({ \
uword _a = (
uword) (align); \
uword _m = (1 << _a) - 1; \
\
_v = _v & ~_m; \
})
Definition at line 161 of file test_vec.h.
◆ log2_align_ptr_down
◆ log2_align_ptr_up
◆ log2_align_up
#define log2_align_up |
( |
|
value, |
|
|
|
align |
|
) |
| |
Value:({ \
uword _a = (
uword) (align); \
uword _m = (1 << _a) - 1; \
\
_v = (_v + _m) & ~_m; \
})
Definition at line 170 of file test_vec.h.
◆ MAX_LOG2_ALIGN
◆ MAX_UNALIGN_OFFSET
◆ memory_snap
Value:do { \
clib_mem_usage_t _usage = { 0 }; \
clib_mem_usage (&_usage); \
} while (0)
u8 * format_clib_mem_usage(u8 *s, va_list *args)
Definition at line 227 of file test_vec.h.
◆ VERBOSE1
#define VERBOSE1 |
( |
|
fmt, |
|
|
|
args... |
|
) |
| |
Value:do { \
fformat (stdout, fmt, ## args); \
} while (0)
Definition at line 68 of file test_vec.h.
◆ VERBOSE2
#define VERBOSE2 |
( |
|
fmt, |
|
|
|
args... |
|
) |
| |
Value:do { \
fformat (stdout, fmt, ## args); \
} while (0)
Definition at line 74 of file test_vec.h.
◆ VERBOSE3
#define VERBOSE3 |
( |
|
fmt, |
|
|
|
args... |
|
) |
| |
Value:do { \
fformat (stdout, fmt, ## args); \
} while (0)
Definition at line 80 of file test_vec.h.
◆ alloc_aligned()
static void* alloc_aligned |
( |
uword |
size, |
|
|
uword |
log2_align, |
|
|
void ** |
ptr_to_free |
|
) |
| |
|
inlinestatic |
◆ alloc_unaligned()
static void* alloc_unaligned |
( |
uword |
size, |
|
|
uword |
offset, |
|
|
void ** |
ptr_to_free |
|
) |
| |
|
inlinestatic |
◆ bounded_random_u32()
◆ format_u32_binary()
static u8* format_u32_binary |
( |
u8 * |
s, |
|
|
va_list * |
va |
|
) |
| |
|
inlinestatic |
◆ my_random_u32()
static u32 my_random_u32 |
( |
u32 * |
seed_return | ) |
|
|
static |
◆ g_seed
◆ g_verbose