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
73 #define CRYPTODEV_NAME_DPAA2_SEC_PMD cryptodev_dpaa2_sec_pmd
91 extern const char **rte_cyptodev_names;
95 #define CDEV_LOG_ERR(...) \
96 RTE_LOG(ERR, CRYPTODEV, \
97 RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
98 __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
100 #define CDEV_PMD_LOG_ERR(dev, ...) \
101 RTE_LOG(ERR, CRYPTODEV, \
102 RTE_FMT("[%s] %s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
103 dev, __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
105 #ifdef RTE_LIBRTE_CRYPTODEV_DEBUG
106 #define CDEV_LOG_DEBUG(...) \
107 RTE_LOG(DEBUG, CRYPTODEV, \
108 RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
109 __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
111 #define CDEV_PMD_TRACE(...) \
112 RTE_LOG(DEBUG, CRYPTODEV, \
113 RTE_FMT("[%s] %s: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
114 dev, __func__, RTE_FMT_TAIL(__VA_ARGS__,)))
117 #define CDEV_LOG_DEBUG(...) (void)0
118 #define CDEV_PMD_TRACE(...) (void)0
253 const char *algo_string);
268 const char *algo_string);
271 #define RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST() \
272 { RTE_CRYPTO_OP_TYPE_UNDEFINED }
283 #define RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO (1ULL << 0)
285 #define RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO (1ULL << 1)
287 #define RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING (1ULL << 2)
289 #define RTE_CRYPTODEV_FF_CPU_SSE (1ULL << 3)
291 #define RTE_CRYPTODEV_FF_CPU_AVX (1ULL << 4)
293 #define RTE_CRYPTODEV_FF_CPU_AVX2 (1ULL << 5)
295 #define RTE_CRYPTODEV_FF_CPU_AESNI (1ULL << 6)
297 #define RTE_CRYPTODEV_FF_HW_ACCELERATED (1ULL << 7)
299 #define RTE_CRYPTODEV_FF_CPU_AVX512 (1ULL << 8)
301 #define RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER (1ULL << 9)
303 #define RTE_CRYPTODEV_FF_CPU_NEON (1ULL << 10)
305 #define RTE_CRYPTODEV_FF_CPU_ARM_CE (1ULL << 11)
345 #define RTE_CRYPTODEV_DETACHED (0)
346 #define RTE_CRYPTODEV_ATTACHED (1)
386 #define RTE_CRYPTODEV_NAME_MAX_LEN (64)
388 #define RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_QUEUE_PAIRS 8
389 #define RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_SESSIONS 2048
395 struct rte_crypto_vdev_init_params {
396 unsigned max_nb_queue_pairs;
397 unsigned max_nb_sessions;
415 struct rte_crypto_vdev_init_params *params,
416 const char *input_args);
490 rte_cryptodev_socket_id(uint8_t dev_id);
713 struct rte_cryptodev_callback;
716 TAILQ_HEAD(rte_cryptodev_cb_list, rte_cryptodev_callback);
814 static inline uint16_t
857 static inline uint16_t