|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
28 #include <dpdk/ipsec/ipsec.h>
30 #define foreach_dpdk_crypto_input_error \
31 _(DQ_COPS, "Crypto ops dequeued") \
32 _(AUTH_FAILED, "Crypto verification failed") \
33 _(STATUS, "Crypto operation failed")
37 #define _(f,s) DPDK_CRYPTO_INPUT_ERROR_##f,
72 struct rte_crypto_op *op0,
u16 *
next)
74 if (
PREDICT_FALSE (op0->status != RTE_CRYPTO_OP_STATUS_SUCCESS))
76 next[0] = DPDK_CRYPTO_INPUT_NEXT_DROP;
79 DPDK_CRYPTO_INPUT_ERROR_STATUS, 1);
81 if (op0->status == RTE_CRYPTO_OP_STATUS_AUTH_FAILED)
84 DPDK_CRYPTO_INPUT_ERROR_AUTH_FAILED, 1);
131 u8 numa = rte_socket_id ();
132 u32 n_ops, total_n_deq, n_deq[2];
135 struct rte_crypto_op **ops;
143 n_ops = total_n_deq = rte_cryptodev_dequeue_burst (res->
dev_id,
152 struct rte_crypto_op *op0, *op1, *op2, *op3;
197 op0->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
198 op1->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
199 op2->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
200 op3->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
210 struct rte_crypto_op *op0;
221 op0->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
231 DPDK_CRYPTO_INPUT_ERROR_DQ_COPS, total_n_deq);
253 u16 *remove = NULL, *res_idx;
307 .name =
"dpdk-crypto-input",
311 .state = VLIB_NODE_STATE_DISABLED,
317 #define _(s,n) [DPDK_CRYPTO_INPUT_NEXT_##s] = n,
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
static void dpdk_crypto_input_trace(vlib_main_t *vm, vlib_node_runtime_t *node, u8 dev_id, u32 *bis, u16 *nexts, u32 n_deq)
#define foreach_dpdk_crypto_input_error
vlib_main_t vlib_node_runtime_t * node
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static u32 vlib_get_trace_count(vlib_main_t *vm, vlib_node_runtime_t *rt)
vlib_main_t vlib_node_runtime_t vlib_frame_t * from_frame
vlib_buffer_enqueue_to_next(vm, node, from,(u16 *) nexts, frame->n_vectors)
static char * dpdk_crypto_input_error_strings[]
static_always_inline uword dpdk_crypto_input_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
#define CLIB_PREFETCH(addr, size, type)
#define VLIB_NODE_FN(node)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
#define static_always_inline
@ DPDK_CRYPTO_INPUT_N_ERROR
static void vlib_node_increment_counter(vlib_main_t *vm, u32 node_index, u32 counter_index, u64 increment)
crypto_resource_t * resource
#define VLIB_NODE_FLAG_TRACE_SUPPORTED
#define CLIB_CACHE_LINE_BYTES
static void vlib_set_trace_count(vlib_main_t *vm, vlib_node_runtime_t *rt, u32 count)
struct _vlib_node_registration vlib_node_registration_t
#define vec_search(v, E)
Search a vector for the index of the entry that matches.
#define vec_free(V)
Free vector's memory (no header).
crypto_worker_main_t * workers_main
description fragment has unexpected format
dpdk_crypto_input_error_t
#define vec_foreach(var, vec)
Vector iterator.
struct rte_crypto_op ** ops
static_always_inline u32 dpdk_crypto_dequeue(vlib_main_t *vm, crypto_worker_main_t *cwm, vlib_node_runtime_t *node, crypto_resource_t *res)
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
u16 nexts[VLIB_FRAME_SIZE]
static __clib_warn_unused_result int vlib_trace_buffer(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index, vlib_buffer_t *b, int follow_chain)
static_always_inline void dpdk_crypto_input_check_op(vlib_main_t *vm, vlib_node_runtime_t *node, struct rte_crypto_op *op0, u16 *next)
static u8 * format_dpdk_crypto_input_trace(u8 *s, va_list *args)
vlib_node_registration_t dpdk_crypto_input_node
(constructor) VLIB_REGISTER_NODE (dpdk_crypto_input_node)
#define vec_del1(v, i)
Delete the element at index I.
VLIB buffer representation.
#define VLIB_REGISTER_NODE(x,...)