25 u32 indent = va_arg (*args,
u32);
26 u32 res_idx = va_arg (*args,
u32);
31 s =
format (s,
"%U thr_id %3d qp %2u enc_inflight %u, dec_inflights %u\n",
49 rte_cryptodevs[dev->
id].data->dev_started ?
"up" :
"down");
54 for (mask = 1; mask != 0; mask <<= 1)
61 rte_cryptodev_get_feature_name (feat));
68 s =
format (s,
" Cipher:");
88 struct rte_cryptodev_stats stats;
89 rte_cryptodev_stats_get (dev->
id, &stats);
93 " enqueue %-10lu dequeue %-10lu enqueue_err %-10lu dequeue_err %-10lu \n",
94 stats.enqueued_count, stats.dequeued_count,
95 stats.enqueue_err_count, stats.dequeue_err_count);
133 rte_cryptodev_stats_reset (dev->
id);
152 .path =
"clear dpdk crypto devices statistics",
153 .short_help =
"clear dpdk crypto devices statistics",
199 .path =
"show dpdk crypto devices",
200 .short_help =
"show dpdk crypto devices",
209 u8 verbose = (
u8) va_arg (*args,
u32);
219 s =
format (s,
"Thread %u (%v):\n", thread_idx,
227 s =
format (s,
"%s%-20s dev-id %2u queue-pair %2u\n",
234 s =
format (s,
"%sCipher:", ind);
244 s =
format (s,
"%sAuth:", ind);
322 .path =
"show dpdk crypto placement",
323 .short_help =
"show dpdk crypto placement",
356 .path =
"show dpdk crypto placement verbose",
357 .short_help =
"show dpdk crypto placement verbose",
373 u8 dev_idx, auto_en = 0;
380 if (
unformat (line_input,
"%u %u", &dev_idx, &thread_idx))
382 else if (
unformat (line_input,
"auto"))
417 thread_idx, dev_idx);
454 if (idx[0] == res_idx)
472 .path =
"set dpdk crypto placement",
473 .short_help =
"set dpdk crypto placement (<device> <thread> | auto)",
518 u8 dev_idx = (
u8) ~ 0;
526 if (
unformat (line_input,
"%u %u", &dev_idx, &thread_idx))
528 else if (
unformat (line_input,
"%u", &dev_idx))
568 thread_idx, dev_idx);
577 .path =
"clear dpdk crypto placement",
578 .short_help =
"clear dpdk crypto placement <device> [<thread>]",
586 struct rte_mempool *mp = va_arg (*args,
struct rte_mempool *);
588 u32 count = rte_mempool_avail_count (mp);
590 s =
format (s,
"%s\n%Uavailable %7d, allocated %7d total %7d\n",
592 count, mp->size - count, mp->size);
593 s =
format (s,
"%Uphys_addr %p, flags %08x, nb_mem_chunks %u\n",
595 mp->mz->phys_addr, mp->flags, mp->nb_mem_chunks);
596 s =
format (s,
"%Uelt_size %4u, header_size %3u, trailer_size %u\n",
598 mp->elt_size, mp->header_size, mp->trailer_size);
599 s =
format (s,
"%Uprivate_data_size %3u, total_elt_size %u\n",
601 mp->private_data_size,
602 mp->elt_size + mp->header_size + mp->trailer_size);
621 struct rte_mempool **mp;
659 .path =
"show dpdk crypto pools",
660 .short_help =
"show dpdk crypto pools",
static clib_error_t * show_dpdk_crypto_placement_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define vec_foreach_index(var, v)
Iterate over vector indices.
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
for(i=1;i<=collision_buckets;i++)
#define vec_pop(V)
Returns last element of a vector and decrements its length.
u16 cipher_resource_idx[IPSEC_CRYPTO_N_ALG]
dpdk_crypto_main_t dpdk_crypto_main
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
#define clib_error_return(e, args...)
static clib_error_t * clear_crypto_stats_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define vec_end(v)
End (last data address) of vector.
vlib_worker_thread_t * vlib_worker_threads
crypto_alg_t * cipher_algs
static clib_error_t * show_dpdk_crypto_pools_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static clib_error_t * show_dpdk_crypto_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
struct rte_mempool ** session_drv
sll srl srl sll sra u16x4 i
static u8 * format_crypto_resource(u8 *s, va_list *args)
static clib_error_t * common_crypto_placement_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd, u8 verbose)
#define VLIB_CLI_COMMAND(x,...)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
static clib_error_t * set_dpdk_crypto_placement_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
struct rte_mempool * crypto_op
static u8 * format_crypto(u8 *s, va_list *args)
crypto_worker_main_t * workers_main
crypto_resource_t * resource
struct rte_mempool * session_h
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
void crypto_auto_placement(void)
static clib_error_t * clear_dpdk_crypto_placement_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static u8 * format_crypto_worker(u8 *s, va_list *args)
static u32 vlib_num_workers()
u16 auth_resource_idx[IPSEC_INTEG_N_ALG]
u8 auth_support[IPSEC_INTEG_N_ALG]
#define vec_foreach(var, vec)
Vector iterator.
static void dpdk_crypto_clear_resource(u16 res_idx)
static clib_error_t * show_dpdk_crypto_placement_v_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
u8 * format_dpdk_mempool(u8 *s, va_list *args)
u8 cipher_support[IPSEC_CRYPTO_N_ALG]