1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2020 Marvell International Ltd.
5 #ifndef _RTE_CRYPTODEV_TRACE_H_
6 #define _RTE_CRYPTODEV_TRACE_H_
11 * API for cryptodev trace support
18 #include <rte_trace_point.h>
20 #include "rte_cryptodev.h"
23 rte_cryptodev_trace_configure,
24 RTE_TRACE_POINT_ARGS(uint8_t dev_id,
25 struct rte_cryptodev_config *conf),
26 rte_trace_point_emit_u8(dev_id);
27 rte_trace_point_emit_u16(conf->nb_queue_pairs);
28 rte_trace_point_emit_i64(conf->ff_disable);
32 rte_cryptodev_trace_start,
33 RTE_TRACE_POINT_ARGS(uint8_t dev_id, int rc),
34 rte_trace_point_emit_u8(dev_id);
35 rte_trace_point_emit_int(rc);
39 rte_cryptodev_trace_stop,
40 RTE_TRACE_POINT_ARGS(uint8_t dev_id),
41 rte_trace_point_emit_u8(dev_id);
45 rte_cryptodev_trace_close,
46 RTE_TRACE_POINT_ARGS(uint8_t dev_id, int rc),
47 rte_trace_point_emit_u8(dev_id);
48 rte_trace_point_emit_int(rc);
52 rte_cryptodev_trace_queue_pair_setup,
53 RTE_TRACE_POINT_ARGS(uint8_t dev_id, uint16_t queue_pair_id,
54 const struct rte_cryptodev_qp_conf *conf),
55 rte_trace_point_emit_u8(dev_id);
56 rte_trace_point_emit_u16(queue_pair_id);
57 rte_trace_point_emit_u32(conf->nb_descriptors);
58 rte_trace_point_emit_ptr(conf->mp_session);
59 rte_trace_point_emit_ptr(conf->mp_session_private);
63 rte_cryptodev_trace_sym_session_pool_create,
64 RTE_TRACE_POINT_ARGS(const char *name, uint32_t nb_elts,
65 uint32_t elt_size, uint32_t cache_size,
66 uint16_t user_data_size, void *mempool),
67 rte_trace_point_emit_string(name);
68 rte_trace_point_emit_u32(nb_elts);
69 rte_trace_point_emit_u32(elt_size);
70 rte_trace_point_emit_u32(cache_size);
71 rte_trace_point_emit_u16(user_data_size);
72 rte_trace_point_emit_ptr(mempool);
76 rte_cryptodev_trace_sym_session_create,
77 RTE_TRACE_POINT_ARGS(void *mempool,
78 struct rte_cryptodev_sym_session *sess),
79 rte_trace_point_emit_ptr(mempool);
80 rte_trace_point_emit_ptr(sess);
81 rte_trace_point_emit_u64(sess->opaque_data);
82 rte_trace_point_emit_u16(sess->nb_drivers);
83 rte_trace_point_emit_u16(sess->user_data_sz);
87 rte_cryptodev_trace_asym_session_create,
88 RTE_TRACE_POINT_ARGS(void *mempool,
89 struct rte_cryptodev_asym_session *sess),
90 rte_trace_point_emit_ptr(mempool);
91 rte_trace_point_emit_ptr(sess);
95 rte_cryptodev_trace_sym_session_free,
96 RTE_TRACE_POINT_ARGS(struct rte_cryptodev_sym_session *sess),
97 rte_trace_point_emit_ptr(sess);
101 rte_cryptodev_trace_asym_session_free,
102 RTE_TRACE_POINT_ARGS(struct rte_cryptodev_asym_session *sess),
103 rte_trace_point_emit_ptr(sess);
107 rte_cryptodev_trace_sym_session_init,
108 RTE_TRACE_POINT_ARGS(uint8_t dev_id,
109 struct rte_cryptodev_sym_session *sess, void *xforms,
111 rte_trace_point_emit_u8(dev_id);
112 rte_trace_point_emit_ptr(sess);
113 rte_trace_point_emit_u64(sess->opaque_data);
114 rte_trace_point_emit_u16(sess->nb_drivers);
115 rte_trace_point_emit_u16(sess->user_data_sz);
116 rte_trace_point_emit_ptr(xforms);
117 rte_trace_point_emit_ptr(mempool);
121 rte_cryptodev_trace_asym_session_init,
122 RTE_TRACE_POINT_ARGS(uint8_t dev_id,
123 struct rte_cryptodev_asym_session *sess, void *xforms,
125 rte_trace_point_emit_u8(dev_id);
126 rte_trace_point_emit_ptr(sess);
127 rte_trace_point_emit_ptr(xforms);
128 rte_trace_point_emit_ptr(mempool);
132 rte_cryptodev_trace_sym_session_clear,
133 RTE_TRACE_POINT_ARGS(uint8_t dev_id, void *sess),
134 rte_trace_point_emit_u8(dev_id);
135 rte_trace_point_emit_ptr(sess);
139 rte_cryptodev_trace_asym_session_clear,
140 RTE_TRACE_POINT_ARGS(uint8_t dev_id, void *sess),
141 rte_trace_point_emit_u8(dev_id);
142 rte_trace_point_emit_ptr(sess);
149 #endif /* _RTE_CRYPTODEV_TRACE_H_ */