DPDK 21.11.9
rte_cryptodev.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2015-2020 Intel Corporation.
3 */
4
5#ifndef _RTE_CRYPTODEV_H_
6#define _RTE_CRYPTODEV_H_
7
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21#include "rte_kvargs.h"
22#include "rte_crypto.h"
23#include "rte_dev.h"
24#include <rte_common.h>
25#include <rte_config.h>
26#include <rte_rcu_qsbr.h>
27
28#include "rte_cryptodev_trace_fp.h"
29
30/* Logging Macros */
31
32#define CDEV_LOG_ERR(...) \
33 RTE_LOG(ERR, CRYPTODEV, \
34 RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
35 __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
36
37#define CDEV_LOG_INFO(...) \
38 RTE_LOG(INFO, CRYPTODEV, \
39 RTE_FMT(RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
40 RTE_FMT_TAIL(__VA_ARGS__,)))
41
42#define CDEV_LOG_DEBUG(...) \
43 RTE_LOG(DEBUG, CRYPTODEV, \
44 RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
45 __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
46
47#define CDEV_PMD_TRACE(...) \
48 RTE_LOG(DEBUG, CRYPTODEV, \
49 RTE_FMT("[%s] %s: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
50 dev, __func__, RTE_FMT_TAIL(__VA_ARGS__,)))
51
65#define rte_crypto_op_ctod_offset(c, t, o) \
66 ((t)((char *)(c) + (o)))
67
79#define rte_crypto_op_ctophys_offset(c, o) \
80 (rte_iova_t)((c)->phys_addr + (o))
81
86 uint16_t min;
87 uint16_t max;
88 uint16_t increment;
94};
95
101#define RTE_CRYPTO_CIPHER_DATA_UNIT_LEN_512_BYTES RTE_BIT32(0)
102#define RTE_CRYPTO_CIPHER_DATA_UNIT_LEN_4096_BYTES RTE_BIT32(1)
103#define RTE_CRYPTO_CIPHER_DATA_UNIT_LEN_1_MEGABYTES RTE_BIT32(2)
104
112 union {
113 struct {
116 uint16_t block_size;
126 } auth;
128 struct {
131 uint16_t block_size;
137 uint32_t dataunit_set;
143 } cipher;
145 struct {
148 uint16_t block_size;
158 } aead;
159 };
160};
161
170 uint32_t op_types;
173 __extension__
174 union {
179 };
180};
181
188};
189
190
197 union {
202 };
203};
204
208 union {
209 enum rte_crypto_cipher_algorithm cipher;
212 } algo;
213};
214
223};
224
237 const struct rte_cryptodev_sym_capability_idx *idx);
238
249__rte_experimental
252 const struct rte_cryptodev_asym_capability_idx *idx);
253
266int
268 const struct rte_cryptodev_symmetric_capability *capability,
269 uint16_t key_size, uint16_t iv_size);
270
284int
286 const struct rte_cryptodev_symmetric_capability *capability,
287 uint16_t key_size, uint16_t digest_size, uint16_t iv_size);
288
303int
305 const struct rte_cryptodev_symmetric_capability *capability,
306 uint16_t key_size, uint16_t digest_size, uint16_t aad_size,
307 uint16_t iv_size);
308
319__rte_experimental
320int
322 const struct rte_cryptodev_asymmetric_xform_capability *capability,
323 enum rte_crypto_asym_op_type op_type);
324
335__rte_experimental
336int
338 const struct rte_cryptodev_asymmetric_xform_capability *capability,
339 uint16_t modlen);
340
352int
354 const char *algo_string);
355
367int
369 const char *algo_string);
370
382int
384 const char *algo_string);
385
397__rte_experimental
398int
400 const char *xform_string);
401
402
404#define RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST() \
405 { RTE_CRYPTO_OP_TYPE_UNDEFINED }
406
407
416#define RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO (1ULL << 0)
418#define RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO (1ULL << 1)
420#define RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING (1ULL << 2)
422#define RTE_CRYPTODEV_FF_CPU_SSE (1ULL << 3)
424#define RTE_CRYPTODEV_FF_CPU_AVX (1ULL << 4)
426#define RTE_CRYPTODEV_FF_CPU_AVX2 (1ULL << 5)
428#define RTE_CRYPTODEV_FF_CPU_AESNI (1ULL << 6)
430#define RTE_CRYPTODEV_FF_HW_ACCELERATED (1ULL << 7)
434#define RTE_CRYPTODEV_FF_CPU_AVX512 (1ULL << 8)
436#define RTE_CRYPTODEV_FF_IN_PLACE_SGL (1ULL << 9)
440#define RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT (1ULL << 10)
444#define RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT (1ULL << 11)
449#define RTE_CRYPTODEV_FF_OOP_LB_IN_SGL_OUT (1ULL << 12)
453#define RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT (1ULL << 13)
455#define RTE_CRYPTODEV_FF_CPU_NEON (1ULL << 14)
457#define RTE_CRYPTODEV_FF_CPU_ARM_CE (1ULL << 15)
459#define RTE_CRYPTODEV_FF_SECURITY (1ULL << 16)
461#define RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP (1ULL << 17)
463#define RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT (1ULL << 18)
465#define RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED (1ULL << 19)
467#define RTE_CRYPTODEV_FF_ASYM_SESSIONLESS (1ULL << 20)
469#define RTE_CRYPTODEV_FF_SYM_CPU_CRYPTO (1ULL << 21)
471#define RTE_CRYPTODEV_FF_SYM_SESSIONLESS (1ULL << 22)
473#define RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA (1ULL << 23)
475#define RTE_CRYPTODEV_FF_SYM_RAW_DP (1ULL << 24)
477#define RTE_CRYPTODEV_FF_CIPHER_MULTIPLE_DATA_UNITS (1ULL << 25)
479#define RTE_CRYPTODEV_FF_CIPHER_WRAPPED_KEY (1ULL << 26)
481#define RTE_CRYPTODEV_FF_SECURITY_INNER_CSUM (1ULL << 27)
493extern const char *
495
498 const char *driver_name;
499 uint8_t driver_id;
517 struct {
523 } sym;
524};
525
526#define RTE_CRYPTODEV_DETACHED (0)
527#define RTE_CRYPTODEV_ATTACHED (1)
528
535
538 uint32_t nb_descriptors;
543};
544
566typedef uint16_t (*rte_cryptodev_callback_fn)(uint16_t dev_id, uint16_t qp_id,
567 struct rte_crypto_op **ops, uint16_t nb_ops, void *user_param);
568
578typedef void (*rte_cryptodev_cb_fn)(uint8_t dev_id,
579 enum rte_cryptodev_event_type event, void *cb_arg);
580
581
593};
594
595#define RTE_CRYPTODEV_NAME_MAX_LEN (64)
607extern int
608rte_cryptodev_get_dev_id(const char *name);
609
620extern const char *
622
630extern uint8_t
632
641extern uint8_t
643
655uint8_t
656rte_cryptodev_devices_get(const char *driver_name, uint8_t *devices,
657 uint8_t nb_devices);
658/*
659 * Return the NUMA socket to which a device is connected
660 *
661 * @param dev_id
662 * The identifier of the device
663 * @return
664 * The NUMA socket id to which the device is connected or
665 * a default of zero if the socket could not be determined.
666 * -1 if returned is the dev_id value is out of range.
667 */
668extern int
669rte_cryptodev_socket_id(uint8_t dev_id);
670
676 uint64_t ff_disable;
683};
684
699extern int
700rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config);
701
717extern int
718rte_cryptodev_start(uint8_t dev_id);
719
726extern void
727rte_cryptodev_stop(uint8_t dev_id);
728
738extern int
739rte_cryptodev_close(uint8_t dev_id);
740
762extern int
763rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
764 const struct rte_cryptodev_qp_conf *qp_conf, int socket_id);
765
779__rte_experimental
780int
781rte_cryptodev_get_qp_status(uint8_t dev_id, uint16_t queue_pair_id);
782
790extern uint16_t
792
793
805extern int
806rte_cryptodev_stats_get(uint8_t dev_id, struct rte_cryptodev_stats *stats);
807
813extern void
815
829extern void
830rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info);
831
832
846extern int
848 enum rte_cryptodev_event_type event,
849 rte_cryptodev_cb_fn cb_fn, void *cb_arg);
850
864extern int
866 enum rte_cryptodev_event_type event,
867 rte_cryptodev_cb_fn cb_fn, void *cb_arg);
868
869struct rte_cryptodev_callback;
870
872RTE_TAILQ_HEAD(rte_cryptodev_cb_list, rte_cryptodev_callback);
873
883 void *arg;
885};
886
891struct rte_cryptodev_cb_rcu {
892 struct rte_cryptodev_cb *next;
894 struct rte_rcu_qsbr *qsbr;
896};
897
907void *
909
915 uint64_t opaque_data;
917 uint16_t nb_drivers;
919 uint16_t user_data_sz;
921 __extension__ struct {
922 void *data;
923 uint16_t refcnt;
924 } sess_data[0];
926};
927
930 __extension__ void *sess_private_data[0];
932};
933
960__rte_experimental
961struct rte_mempool *
962rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
963 uint32_t elt_size, uint32_t cache_size, uint16_t priv_size,
964 int socket_id);
965
977
987__rte_experimental
990
1003int
1005
1018__rte_experimental
1019int
1021
1038int
1040 struct rte_cryptodev_sym_session *sess,
1041 struct rte_crypto_sym_xform *xforms,
1042 struct rte_mempool *mempool);
1043
1059__rte_experimental
1060int
1062 struct rte_cryptodev_asym_session *sess,
1063 struct rte_crypto_asym_xform *xforms,
1064 struct rte_mempool *mempool);
1065
1080int
1082 struct rte_cryptodev_sym_session *sess);
1083
1094__rte_experimental
1095int
1097 struct rte_cryptodev_asym_session *sess);
1098
1106unsigned int
1108
1120__rte_experimental
1121unsigned int
1123 struct rte_cryptodev_sym_session *sess);
1124
1131__rte_experimental
1132unsigned int
1134
1146unsigned int
1148
1159__rte_experimental
1160unsigned int
1162
1171unsigned int
1173
1182int rte_cryptodev_driver_id_get(const char *name);
1183
1192const char *rte_cryptodev_driver_name_get(uint8_t driver_id);
1193
1206__rte_experimental
1207int
1209 struct rte_cryptodev_sym_session *sess,
1210 void *data,
1211 uint16_t size);
1212
1223__rte_experimental
1224void *
1226 struct rte_cryptodev_sym_session *sess);
1227
1240__rte_experimental
1241uint32_t
1243 struct rte_cryptodev_sym_session *sess, union rte_crypto_sym_ofs ofs,
1244 struct rte_crypto_sym_vec *vec);
1245
1255__rte_experimental
1256int
1258
1264 struct rte_cryptodev_sym_session *crypto_sess;
1265 struct rte_crypto_sym_xform *xform;
1266 struct rte_security_session *sec_sess;
1267};
1268
1295 void *qp, uint8_t *drv_ctx, struct rte_crypto_sym_vec *vec,
1296 union rte_crypto_sym_ofs ofs, void *user_data[], int *enqueue_status);
1297
1320 void *qp, uint8_t *drv_ctx, struct rte_crypto_vec *data_vec,
1321 uint16_t n_data_vecs, union rte_crypto_sym_ofs ofs,
1322 struct rte_crypto_va_iova_ptr *iv,
1323 struct rte_crypto_va_iova_ptr *digest,
1324 struct rte_crypto_va_iova_ptr *aad_or_auth_iv,
1325 void *user_data);
1326
1338typedef int (*cryptodev_sym_raw_operation_done_t)(void *qp, uint8_t *drv_ctx,
1339 uint32_t n);
1340
1350typedef uint32_t (*rte_cryptodev_raw_get_dequeue_count_t)(void *user_data);
1351
1360typedef void (*rte_cryptodev_raw_post_dequeue_t)(void *user_data,
1361 uint32_t index, uint8_t is_op_success);
1362
1404typedef uint32_t (*cryptodev_sym_raw_dequeue_burst_t)(void *qp,
1405 uint8_t *drv_ctx,
1406 rte_cryptodev_raw_get_dequeue_count_t get_dequeue_count,
1407 uint32_t max_nb_to_dequeue,
1409 void **out_user_data, uint8_t is_user_data_array,
1410 uint32_t *n_success, int *dequeue_status);
1411
1435typedef void * (*cryptodev_sym_raw_dequeue_t)(
1436 void *qp, uint8_t *drv_ctx, int *dequeue_status,
1437 enum rte_crypto_op_status *op_status);
1438
1445 void *qp_data;
1446
1453
1454 /* Driver specific context data */
1455 __extension__ uint8_t drv_ctx_data[];
1456};
1457
1481__rte_experimental
1482int
1483rte_cryptodev_configure_raw_dp_ctx(uint8_t dev_id, uint16_t qp_id,
1484 struct rte_crypto_raw_dp_ctx *ctx,
1485 enum rte_crypto_op_sess_type sess_type,
1486 union rte_cryptodev_session_ctx session_ctx,
1487 uint8_t is_update);
1488
1513__rte_experimental
1514uint32_t
1516 struct rte_crypto_sym_vec *vec, union rte_crypto_sym_ofs ofs,
1517 void **user_data, int *enqueue_status);
1518
1539__rte_experimental
1540static __rte_always_inline int
1542 struct rte_crypto_vec *data_vec, uint16_t n_data_vecs,
1543 union rte_crypto_sym_ofs ofs,
1544 struct rte_crypto_va_iova_ptr *iv,
1545 struct rte_crypto_va_iova_ptr *digest,
1546 struct rte_crypto_va_iova_ptr *aad_or_auth_iv,
1547 void *user_data)
1548{
1549 return (*ctx->enqueue)(ctx->qp_data, ctx->drv_ctx_data, data_vec,
1550 n_data_vecs, ofs, iv, digest, aad_or_auth_iv, user_data);
1551}
1552
1563__rte_experimental
1564int
1566 uint32_t n);
1567
1609__rte_experimental
1610uint32_t
1612 rte_cryptodev_raw_get_dequeue_count_t get_dequeue_count,
1613 uint32_t max_nb_to_dequeue,
1615 void **out_user_data, uint8_t is_user_data_array,
1616 uint32_t *n_success, int *dequeue_status);
1617
1641__rte_experimental
1642static __rte_always_inline void *
1644 int *dequeue_status, enum rte_crypto_op_status *op_status)
1645{
1646 return (*ctx->dequeue)(ctx->qp_data, ctx->drv_ctx_data, dequeue_status,
1647 op_status);
1648}
1649
1659__rte_experimental
1660int
1662 uint32_t n);
1663
1700__rte_experimental
1701struct rte_cryptodev_cb *
1703 uint16_t qp_id,
1705 void *cb_arg);
1706
1729__rte_experimental
1731 uint16_t qp_id,
1732 struct rte_cryptodev_cb *cb);
1733
1769__rte_experimental
1770struct rte_cryptodev_cb *
1772 uint16_t qp_id,
1774 void *cb_arg);
1775
1797__rte_experimental
1799 uint16_t qp_id,
1800 struct rte_cryptodev_cb *cb);
1801
1802#include <rte_cryptodev_core.h>
1839static inline uint16_t
1840rte_cryptodev_dequeue_burst(uint8_t dev_id, uint16_t qp_id,
1841 struct rte_crypto_op **ops, uint16_t nb_ops)
1842{
1843 const struct rte_crypto_fp_ops *fp_ops;
1844 void *qp;
1845
1846 rte_cryptodev_trace_dequeue_burst(dev_id, qp_id, (void **)ops, nb_ops);
1847
1848 fp_ops = &rte_crypto_fp_ops[dev_id];
1849 qp = fp_ops->qp.data[qp_id];
1850
1851 nb_ops = fp_ops->dequeue_burst(qp, ops, nb_ops);
1852
1853#ifdef RTE_CRYPTO_CALLBACKS
1854 if (unlikely(fp_ops->qp.deq_cb[qp_id].next != NULL)) {
1855 struct rte_cryptodev_cb_rcu *list;
1856 struct rte_cryptodev_cb *cb;
1857
1858 /* __ATOMIC_RELEASE memory order was used when the
1859 * call back was inserted into the list.
1860 * Since there is a clear dependency between loading
1861 * cb and cb->fn/cb->next, __ATOMIC_ACQUIRE memory order is
1862 * not required.
1863 */
1864 list = &fp_ops->qp.deq_cb[qp_id];
1865 rte_rcu_qsbr_thread_online(list->qsbr, 0);
1866 cb = __atomic_load_n(&list->next, __ATOMIC_RELAXED);
1867
1868 while (cb != NULL) {
1869 nb_ops = cb->fn(dev_id, qp_id, ops, nb_ops,
1870 cb->arg);
1871 cb = cb->next;
1872 };
1873
1874 rte_rcu_qsbr_thread_offline(list->qsbr, 0);
1875 }
1876#endif
1877 return nb_ops;
1878}
1879
1911static inline uint16_t
1912rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_t qp_id,
1913 struct rte_crypto_op **ops, uint16_t nb_ops)
1914{
1915 const struct rte_crypto_fp_ops *fp_ops;
1916 void *qp;
1917
1918 fp_ops = &rte_crypto_fp_ops[dev_id];
1919 qp = fp_ops->qp.data[qp_id];
1920#ifdef RTE_CRYPTO_CALLBACKS
1921 if (unlikely(fp_ops->qp.enq_cb[qp_id].next != NULL)) {
1922 struct rte_cryptodev_cb_rcu *list;
1923 struct rte_cryptodev_cb *cb;
1924
1925 /* __ATOMIC_RELEASE memory order was used when the
1926 * call back was inserted into the list.
1927 * Since there is a clear dependency between loading
1928 * cb and cb->fn/cb->next, __ATOMIC_ACQUIRE memory order is
1929 * not required.
1930 */
1931 list = &fp_ops->qp.enq_cb[qp_id];
1932 rte_rcu_qsbr_thread_online(list->qsbr, 0);
1933 cb = __atomic_load_n(&list->next, __ATOMIC_RELAXED);
1934
1935 while (cb != NULL) {
1936 nb_ops = cb->fn(dev_id, qp_id, ops, nb_ops,
1937 cb->arg);
1938 cb = cb->next;
1939 };
1940
1941 rte_rcu_qsbr_thread_offline(list->qsbr, 0);
1942 }
1943#endif
1944
1945 rte_cryptodev_trace_enqueue_burst(dev_id, qp_id, (void **)ops, nb_ops);
1946 return fp_ops->enqueue_burst(qp, ops, nb_ops);
1947}
1948
1949
1950
1951#ifdef __cplusplus
1952}
1953#endif
1954
1955#endif /* _RTE_CRYPTODEV_H_ */
#define unlikely(x)
#define RTE_STD_C11
Definition: rte_common.h:42
#define __rte_always_inline
Definition: rte_common.h:233
rte_crypto_op_sess_type
Definition: rte_crypto.h:62
rte_crypto_op_type
Definition: rte_crypto.h:29
rte_crypto_op_status
Definition: rte_crypto.h:39
rte_crypto_asym_op_type
rte_crypto_asym_xform_type
rte_crypto_auth_algorithm
rte_crypto_sym_xform_type
rte_crypto_aead_algorithm
rte_crypto_cipher_algorithm
static uint16_t rte_cryptodev_dequeue_burst(uint8_t dev_id, uint16_t qp_id, struct rte_crypto_op **ops, uint16_t nb_ops)
uint32_t(* cryptodev_sym_raw_dequeue_burst_t)(void *qp, uint8_t *drv_ctx, rte_cryptodev_raw_get_dequeue_count_t get_dequeue_count, uint32_t max_nb_to_dequeue, rte_cryptodev_raw_post_dequeue_t post_dequeue, void **out_user_data, uint8_t is_user_data_array, uint32_t *n_success, int *dequeue_status)
int rte_cryptodev_close(uint8_t dev_id)
rte_cryptodev_event_type
@ RTE_CRYPTODEV_EVENT_ERROR
@ RTE_CRYPTODEV_EVENT_UNKNOWN
@ RTE_CRYPTODEV_EVENT_MAX
uint8_t rte_cryptodev_devices_get(const char *driver_name, uint8_t *devices, uint8_t nb_devices)
__rte_experimental int rte_cryptodev_get_raw_dp_ctx_size(uint8_t dev_id)
uint8_t rte_cryptodev_count(void)
__rte_experimental int rte_cryptodev_remove_enq_callback(uint8_t dev_id, uint16_t qp_id, struct rte_cryptodev_cb *cb)
__rte_experimental uint32_t rte_cryptodev_raw_dequeue_burst(struct rte_crypto_raw_dp_ctx *ctx, rte_cryptodev_raw_get_dequeue_count_t get_dequeue_count, uint32_t max_nb_to_dequeue, rte_cryptodev_raw_post_dequeue_t post_dequeue, void **out_user_data, uint8_t is_user_data_array, uint32_t *n_success, int *dequeue_status)
static uint16_t rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_t qp_id, struct rte_crypto_op **ops, uint16_t nb_ops)
int rte_cryptodev_start(uint8_t dev_id)
__rte_experimental int rte_cryptodev_sym_session_set_user_data(struct rte_cryptodev_sym_session *sess, void *data, uint16_t size)
const char * rte_cryptodev_driver_name_get(uint8_t driver_id)
void *(* cryptodev_sym_raw_dequeue_t)(void *qp, uint8_t *drv_ctx, int *dequeue_status, enum rte_crypto_op_status *op_status)
__rte_experimental uint32_t rte_cryptodev_sym_cpu_crypto_process(uint8_t dev_id, struct rte_cryptodev_sym_session *sess, union rte_crypto_sym_ofs ofs, struct rte_crypto_sym_vec *vec)
__rte_experimental unsigned int rte_cryptodev_asym_get_private_session_size(uint8_t dev_id)
__rte_experimental int rte_cryptodev_asym_session_free(struct rte_cryptodev_asym_session *sess)
unsigned int rte_cryptodev_is_valid_dev(uint8_t dev_id)
unsigned int rte_cryptodev_sym_get_private_session_size(uint8_t dev_id)
int rte_cryptodev_get_auth_algo_enum(enum rte_crypto_auth_algorithm *algo_enum, const char *algo_string)
void rte_cryptodev_stop(uint8_t dev_id)
int rte_cryptodev_sym_session_init(uint8_t dev_id, struct rte_cryptodev_sym_session *sess, struct rte_crypto_sym_xform *xforms, struct rte_mempool *mempool)
const char * rte_cryptodev_name_get(uint8_t dev_id)
RTE_TAILQ_HEAD(rte_cryptodev_cb_list, rte_cryptodev_callback)
int rte_cryptodev_callback_unregister(uint8_t dev_id, enum rte_cryptodev_event_type event, rte_cryptodev_cb_fn cb_fn, void *cb_arg)
int rte_cryptodev_sym_capability_check_auth(const struct rte_cryptodev_symmetric_capability *capability, uint16_t key_size, uint16_t digest_size, uint16_t iv_size)
__rte_experimental int rte_cryptodev_remove_deq_callback(uint8_t dev_id, uint16_t qp_id, struct rte_cryptodev_cb *cb)
int rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config)
__rte_experimental struct rte_cryptodev_asym_session * rte_cryptodev_asym_session_create(struct rte_mempool *mempool)
int rte_cryptodev_callback_register(uint8_t dev_id, enum rte_cryptodev_event_type event, rte_cryptodev_cb_fn cb_fn, void *cb_arg)
struct rte_cryptodev_sym_session * rte_cryptodev_sym_session_create(struct rte_mempool *mempool)
__rte_experimental uint32_t rte_cryptodev_raw_enqueue_burst(struct rte_crypto_raw_dp_ctx *ctx, struct rte_crypto_sym_vec *vec, union rte_crypto_sym_ofs ofs, void **user_data, int *enqueue_status)
uint16_t rte_cryptodev_queue_pair_count(uint8_t dev_id)
void(* rte_cryptodev_cb_fn)(uint8_t dev_id, enum rte_cryptodev_event_type event, void *cb_arg)
uint32_t(* cryptodev_sym_raw_enqueue_burst_t)(void *qp, uint8_t *drv_ctx, struct rte_crypto_sym_vec *vec, union rte_crypto_sym_ofs ofs, void *user_data[], int *enqueue_status)
void rte_cryptodev_stats_reset(uint8_t dev_id)
__rte_experimental struct rte_cryptodev_cb * rte_cryptodev_add_deq_callback(uint8_t dev_id, uint16_t qp_id, rte_cryptodev_callback_fn cb_fn, void *cb_arg)
unsigned int rte_cryptodev_sym_get_header_session_size(void)
static __rte_experimental __rte_always_inline int rte_cryptodev_raw_enqueue(struct rte_crypto_raw_dp_ctx *ctx, struct rte_crypto_vec *data_vec, uint16_t n_data_vecs, union rte_crypto_sym_ofs ofs, struct rte_crypto_va_iova_ptr *iv, struct rte_crypto_va_iova_ptr *digest, struct rte_crypto_va_iova_ptr *aad_or_auth_iv, void *user_data)
__rte_experimental int rte_cryptodev_configure_raw_dp_ctx(uint8_t dev_id, uint16_t qp_id, struct rte_crypto_raw_dp_ctx *ctx, enum rte_crypto_op_sess_type sess_type, union rte_cryptodev_session_ctx session_ctx, uint8_t is_update)
__rte_experimental struct rte_cryptodev_cb * rte_cryptodev_add_enq_callback(uint8_t dev_id, uint16_t qp_id, rte_cryptodev_callback_fn cb_fn, void *cb_arg)
void(* rte_cryptodev_raw_post_dequeue_t)(void *user_data, uint32_t index, uint8_t is_op_success)
__rte_experimental unsigned int rte_cryptodev_asym_get_header_session_size(void)
int rte_cryptodev_driver_id_get(const char *name)
int rte_cryptodev_get_dev_id(const char *name)
int rte_cryptodev_sym_session_clear(uint8_t dev_id, struct rte_cryptodev_sym_session *sess)
void * rte_cryptodev_get_sec_ctx(uint8_t dev_id)
int rte_cryptodev_stats_get(uint8_t dev_id, struct rte_cryptodev_stats *stats)
int rte_cryptodev_get_cipher_algo_enum(enum rte_crypto_cipher_algorithm *algo_enum, const char *algo_string)
__rte_experimental int rte_cryptodev_asym_session_clear(uint8_t dev_id, struct rte_cryptodev_asym_session *sess)
uint32_t(* rte_cryptodev_raw_get_dequeue_count_t)(void *user_data)
__rte_experimental int rte_cryptodev_asym_session_init(uint8_t dev_id, struct rte_cryptodev_asym_session *sess, struct rte_crypto_asym_xform *xforms, struct rte_mempool *mempool)
static __rte_experimental __rte_always_inline void * rte_cryptodev_raw_dequeue(struct rte_crypto_raw_dp_ctx *ctx, int *dequeue_status, enum rte_crypto_op_status *op_status)
int(* cryptodev_sym_raw_enqueue_t)(void *qp, uint8_t *drv_ctx, struct rte_crypto_vec *data_vec, uint16_t n_data_vecs, union rte_crypto_sym_ofs ofs, struct rte_crypto_va_iova_ptr *iv, struct rte_crypto_va_iova_ptr *digest, struct rte_crypto_va_iova_ptr *aad_or_auth_iv, void *user_data)
int rte_cryptodev_sym_capability_check_aead(const struct rte_cryptodev_symmetric_capability *capability, uint16_t key_size, uint16_t digest_size, uint16_t aad_size, uint16_t iv_size)
__rte_experimental int rte_cryptodev_raw_enqueue_done(struct rte_crypto_raw_dp_ctx *ctx, uint32_t n)
const char * rte_cryptodev_get_feature_name(uint64_t flag)
__rte_experimental void * rte_cryptodev_sym_session_get_user_data(struct rte_cryptodev_sym_session *sess)
int rte_cryptodev_sym_capability_check_cipher(const struct rte_cryptodev_symmetric_capability *capability, uint16_t key_size, uint16_t iv_size)
uint8_t rte_cryptodev_device_count_by_driver(uint8_t driver_id)
__rte_experimental int rte_cryptodev_asym_xform_capability_check_optype(const struct rte_cryptodev_asymmetric_xform_capability *capability, enum rte_crypto_asym_op_type op_type)
int rte_cryptodev_get_aead_algo_enum(enum rte_crypto_aead_algorithm *algo_enum, const char *algo_string)
__rte_experimental unsigned int rte_cryptodev_sym_get_existing_header_session_size(struct rte_cryptodev_sym_session *sess)
__rte_experimental const struct rte_cryptodev_asymmetric_xform_capability * rte_cryptodev_asym_capability_get(uint8_t dev_id, const struct rte_cryptodev_asym_capability_idx *idx)
__rte_experimental int rte_cryptodev_get_qp_status(uint8_t dev_id, uint16_t queue_pair_id)
uint16_t(* rte_cryptodev_callback_fn)(uint16_t dev_id, uint16_t qp_id, struct rte_crypto_op **ops, uint16_t nb_ops, void *user_param)
__rte_experimental int rte_cryptodev_raw_dequeue_done(struct rte_crypto_raw_dp_ctx *ctx, uint32_t n)
int rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id, const struct rte_cryptodev_qp_conf *qp_conf, int socket_id)
__rte_experimental int rte_cryptodev_asym_xform_capability_check_modlen(const struct rte_cryptodev_asymmetric_xform_capability *capability, uint16_t modlen)
int(* cryptodev_sym_raw_operation_done_t)(void *qp, uint8_t *drv_ctx, uint32_t n)
__rte_experimental struct rte_mempool * rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts, uint32_t elt_size, uint32_t cache_size, uint16_t priv_size, int socket_id)
void rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
__rte_experimental int rte_cryptodev_asym_get_xform_enum(enum rte_crypto_asym_xform_type *xform_enum, const char *xform_string)
const struct rte_cryptodev_symmetric_capability * rte_cryptodev_sym_capability_get(uint8_t dev_id, const struct rte_cryptodev_sym_capability_idx *idx)
int rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess)
static __rte_always_inline void rte_rcu_qsbr_thread_online(struct rte_rcu_qsbr *v, unsigned int thread_id)
Definition: rte_rcu_qsbr.h:303
static __rte_always_inline void rte_rcu_qsbr_thread_offline(struct rte_rcu_qsbr *v, unsigned int thread_id)
Definition: rte_rcu_qsbr.h:356
enum rte_crypto_asym_xform_type type
__extension__ void * sess_private_data[0]
struct rte_crypto_param_range modlen
enum rte_crypto_asym_xform_type xform_type
enum rte_crypto_op_type op
struct rte_cryptodev_symmetric_capability sym
struct rte_cryptodev_asymmetric_capability asym
struct rte_cryptodev_cb * next
rte_cryptodev_callback_fn fn
unsigned max_nb_queue_pairs
struct rte_device * device
uint16_t min_mbuf_headroom_req
const struct rte_cryptodev_capabilities * capabilities
uint16_t min_mbuf_tailroom_req
const char * driver_name
unsigned max_nb_sessions
struct rte_mempool * mp_session_private
struct rte_mempool * mp_session
uint64_t enqueue_err_count
uint64_t dequeue_err_count
__extension__ struct rte_cryptodev_sym_session::@141 sess_data[0]
enum rte_crypto_auth_algorithm algo
struct rte_cryptodev_symmetric_capability::@130::@132 auth
enum rte_crypto_cipher_algorithm algo
enum rte_crypto_aead_algorithm algo
struct rte_crypto_param_range iv_size
struct rte_cryptodev_symmetric_capability::@130::@133 cipher
struct rte_crypto_param_range digest_size
struct rte_crypto_param_range aad_size
struct rte_crypto_param_range key_size
enum rte_crypto_sym_xform_type xform_type
char name[RTE_MEMPOOL_NAMESIZE]
Definition: rte_mempool.h:213
uint32_t cache_size
Definition: rte_mempool.h:224
uint32_t elt_size
Definition: rte_mempool.h:227