32 #ifndef _RTE_CRYPTODEV_H_
33 #define _RTE_CRYPTODEV_H_
53 #define CRYPTODEV_NAME_NULL_PMD crypto_null
55 #define CRYPTODEV_NAME_AESNI_MB_PMD crypto_aesni_mb
57 #define CRYPTODEV_NAME_AESNI_GCM_PMD crypto_aesni_gcm
59 #define CRYPTODEV_NAME_OPENSSL_PMD crypto_openssl
61 #define CRYPTODEV_NAME_QAT_SYM_PMD crypto_qat
63 #define CRYPTODEV_NAME_SNOW3G_PMD crypto_snow3g
65 #define CRYPTODEV_NAME_KASUMI_PMD crypto_kasumi
67 #define CRYPTODEV_NAME_ZUC_PMD crypto_zuc
69 #define CRYPTODEV_NAME_ARMV8_PMD crypto_armv8
71 #define CRYPTODEV_NAME_SCHEDULER_PMD crypto_scheduler
88 extern const char **rte_cyptodev_names;
92 #define CDEV_LOG_ERR(...) \
93 RTE_LOG(ERR, CRYPTODEV, \
94 RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
95 __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
97 #define CDEV_PMD_LOG_ERR(dev, ...) \
98 RTE_LOG(ERR, CRYPTODEV, \
99 RTE_FMT("[%s] %s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
100 dev, __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
102 #ifdef RTE_LIBRTE_CRYPTODEV_DEBUG
103 #define CDEV_LOG_DEBUG(...) \
104 RTE_LOG(DEBUG, CRYPTODEV, \
105 RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
106 __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
108 #define CDEV_PMD_TRACE(...) \
109 RTE_LOG(DEBUG, CRYPTODEV, \
110 RTE_FMT("[%s] %s: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
111 dev, __func__, RTE_FMT_TAIL(__VA_ARGS__,)))
114 #define CDEV_LOG_DEBUG(...) (void)0
115 #define CDEV_PMD_TRACE(...) (void)0
238 #define RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST() \
239 { RTE_CRYPTO_OP_TYPE_UNDEFINED }
250 #define RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO (1ULL << 0)
252 #define RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO (1ULL << 1)
254 #define RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING (1ULL << 2)
256 #define RTE_CRYPTODEV_FF_CPU_SSE (1ULL << 3)
258 #define RTE_CRYPTODEV_FF_CPU_AVX (1ULL << 4)
260 #define RTE_CRYPTODEV_FF_CPU_AVX2 (1ULL << 5)
262 #define RTE_CRYPTODEV_FF_CPU_AESNI (1ULL << 6)
264 #define RTE_CRYPTODEV_FF_HW_ACCELERATED (1ULL << 7)
266 #define RTE_CRYPTODEV_FF_CPU_AVX512 (1ULL << 8)
268 #define RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER (1ULL << 9)
270 #define RTE_CRYPTODEV_FF_CPU_NEON (1ULL << 10)
272 #define RTE_CRYPTODEV_FF_CPU_ARM_CE (1ULL << 11)
308 #define RTE_CRYPTODEV_DETACHED (0)
309 #define RTE_CRYPTODEV_ATTACHED (1)
349 #define RTE_CRYPTODEV_NAME_MAX_LEN (64)
351 #define RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_QUEUE_PAIRS 8
352 #define RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_SESSIONS 2048
358 struct rte_crypto_vdev_init_params {
359 unsigned max_nb_queue_pairs;
360 unsigned max_nb_sessions;
378 struct rte_crypto_vdev_init_params *params,
379 const char *input_args);
452 rte_cryptodev_socket_id(uint8_t dev_id);
675 struct rte_cryptodev_callback;
678 TAILQ_HEAD(rte_cryptodev_cb_list, rte_cryptodev_callback);
776 static inline uint16_t
819 static inline uint16_t