22 #define _(sym,str) VNET_CRYPTO_ASYNC_ERROR_##sym, 29 #define _(sym,string) string, 34 #define foreach_crypto_dispatch_next \ 35 _(ERR_DROP, "error-drop") 39 #define _(n, s) CRYPTO_DISPATCH_NEXT_##n, 82 u32 enqueue_thread_idx = ~0;
102 for (i = 0; i < cf->
n_elts; i++)
104 if (cf->
elts[i].
status != VNET_CRYPTO_OP_STATUS_COMPLETED)
106 ct->
nexts[i + n_cache] = CRYPTO_DISPATCH_NEXT_ERR_DROP;
126 for (i = 0; i < cf->
n_elts; i++)
130 if (b->
flags & VLIB_BUFFER_IS_TRACED)
146 enqueue_thread_idx = 0;
147 cf = (hdl) (vm, &n_elts, &enqueue_thread_idx);
160 u32 n_dispatched = 0, n_cache = 0;
165 n_cache = crypto_dequeue_frame (vm, node, ct, cm->dequeue_handlers[index],
166 n_cache, &n_dispatched);
178 .name =
"crypto-dispatch",
180 .state = VLIB_NODE_STATE_DISABLED,
189 [CRYPTO_DISPATCH_NEXT_##n] = s, #define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
#define foreach_crypto_op_status
vnet_crypto_thread_t * threads
vnet_crypto_op_status_t op_status
static char * vnet_crypto_async_error_strings[]
static void vlib_node_set_interrupt_pending(vlib_main_t *vm, u32 node_index)
#define clib_memcpy_fast(a, b, c)
static_always_inline u32 crypto_dequeue_frame(vlib_main_t *vm, vlib_node_runtime_t *node, vnet_crypto_thread_t *ct, vnet_crypto_frame_dequeue_t *hdl, u32 n_cache, u32 *n_total)
#define VLIB_NODE_FN(node)
vlib_main_t ** vlib_mains
format_function_t format_vnet_crypto_async_op
#define static_always_inline
static void vnet_crypto_async_add_trace(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t *b, vnet_crypto_async_op_id_t op_id, vnet_crypto_op_status_t status)
vnet_crypto_async_op_id_t op
#define clib_bitmap_foreach(i, ai, body)
Macro to iterate across set bits in a bitmap.
#define VNET_CRYPTO_ASYNC_DISPATCH_INTERRUPT
u16 next_node_index[VNET_CRYPTO_FRAME_SIZE]
vnet_crypto_async_error_t
static_always_inline void vnet_crypto_async_free_frame(vlib_main_t *vm, vnet_crypto_async_frame_t *frame)
u32 node_index
Node index.
static void vlib_node_increment_counter(vlib_main_t *vm, u32 node_index, u32 counter_index, u64 increment)
static u8 * format_crypto_dispatch_trace(u8 *s, va_list *args)
u32 buffer_indices[VNET_CRYPTO_FRAME_SIZE]
#define VLIB_REGISTER_NODE(x,...)
static_always_inline void vlib_buffer_enqueue_to_next(vlib_main_t *vm, vlib_node_runtime_t *node, u32 *buffers, u16 *nexts, uword count)
sll srl srl sll sra u16x4 i
#define VNET_CRYPTO_FRAME_STATE_SUCCESS
vlib_main_t vlib_node_runtime_t * node
format_function_t format_vnet_crypto_op_status
clib_bitmap_t * async_active_ids
vlib_node_registration_t crypto_dispatch_node
(constructor) VLIB_REGISTER_NODE (crypto_dispatch_node)
vnet_crypto_async_op_id_t
vnet_crypto_async_op_id_t op
vnet_crypto_async_frame_t *() vnet_crypto_frame_dequeue_t(vlib_main_t *vm, u32 *nb_elts_processed, u32 *enqueue_thread_idx)
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
VLIB buffer representation.
u16 flags
Copy of main node flags.
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
#define VLIB_NODE_FLAG_TRACE
#define foreach_crypto_dispatch_next
vnet_crypto_main_t crypto_main
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
vnet_crypto_op_status_t status
vnet_crypto_async_frame_elt_t elts[VNET_CRYPTO_FRAME_SIZE]