5 #ifndef _RTE_CRYPTODEV_H_
6 #define _RTE_CRYPTODEV_H_
25 #include <rte_config.h>
27 extern const char **rte_cyptodev_names;
31 #define CDEV_LOG_ERR(...) \
32 RTE_LOG(ERR, CRYPTODEV, \
33 RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
34 __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
36 #define CDEV_LOG_INFO(...) \
37 RTE_LOG(INFO, CRYPTODEV, \
38 RTE_FMT(RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
39 RTE_FMT_TAIL(__VA_ARGS__,)))
41 #define CDEV_LOG_DEBUG(...) \
42 RTE_LOG(DEBUG, CRYPTODEV, \
43 RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
44 __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
46 #define CDEV_PMD_TRACE(...) \
47 RTE_LOG(DEBUG, CRYPTODEV, \
48 RTE_FMT("[%s] %s: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
49 dev, __func__, RTE_FMT_TAIL(__VA_ARGS__,)))
64 #define rte_crypto_op_ctod_offset(c, t, o) \
65 ((t)((char *)(c) + (o)))
78 #define rte_crypto_op_ctophys_offset(c, o) \
79 (rte_iova_t)((c)->phys_addr + (o))
252 uint16_t key_size, uint16_t iv_size);
270 uint16_t key_size, uint16_t digest_size, uint16_t iv_size);
289 uint16_t key_size, uint16_t digest_size, uint16_t aad_size,
302 int __rte_experimental
317 int __rte_experimental
335 const char *algo_string);
350 const char *algo_string);
365 const char *algo_string);
378 int __rte_experimental
380 const char *xform_string);
384 #define RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST() \
385 { RTE_CRYPTO_OP_TYPE_UNDEFINED }
396 #define RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO (1ULL << 0)
398 #define RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO (1ULL << 1)
400 #define RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING (1ULL << 2)
402 #define RTE_CRYPTODEV_FF_CPU_SSE (1ULL << 3)
404 #define RTE_CRYPTODEV_FF_CPU_AVX (1ULL << 4)
406 #define RTE_CRYPTODEV_FF_CPU_AVX2 (1ULL << 5)
408 #define RTE_CRYPTODEV_FF_CPU_AESNI (1ULL << 6)
410 #define RTE_CRYPTODEV_FF_HW_ACCELERATED (1ULL << 7)
414 #define RTE_CRYPTODEV_FF_CPU_AVX512 (1ULL << 8)
416 #define RTE_CRYPTODEV_FF_IN_PLACE_SGL (1ULL << 9)
420 #define RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT (1ULL << 10)
424 #define RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT (1ULL << 11)
429 #define RTE_CRYPTODEV_FF_OOP_LB_IN_SGL_OUT (1ULL << 12)
433 #define RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT (1ULL << 13)
435 #define RTE_CRYPTODEV_FF_CPU_NEON (1ULL << 14)
437 #define RTE_CRYPTODEV_FF_CPU_ARM_CE (1ULL << 15)
439 #define RTE_CRYPTODEV_FF_SECURITY (1ULL << 16)
485 #define RTE_CRYPTODEV_DETACHED (0)
486 #define RTE_CRYPTODEV_ATTACHED (1)
530 #define RTE_CRYPTODEV_NAME_MAX_LEN (64)
604 rte_cryptodev_socket_id(uint8_t dev_id);
792 struct rte_cryptodev_callback;
795 TAILQ_HEAD(rte_cryptodev_cb_list, rte_cryptodev_callback);
828 rte_cryptodev_get_sec_ctx(uint8_t dev_id);
897 static inline uint16_t
940 static inline uint16_t
962 __extension__
struct {
1057 int __rte_experimental
1097 int __rte_experimental
1131 int __rte_experimental
1156 unsigned int __rte_experimental
1166 unsigned int __rte_experimental
1193 unsigned int __rte_experimental
1228 int __rte_experimental
1244 void * __rte_experimental