32 #ifndef _RTE_CRYPTODEV_H_
33 #define _RTE_CRYPTODEV_H_
56 #define CRYPTODEV_NAME_NULL_PMD ("cryptodev_null_pmd")
58 #define CRYPTODEV_NAME_AESNI_MB_PMD ("cryptodev_aesni_mb_pmd")
60 #define CRYPTODEV_NAME_QAT_PMD ("cryptodev_qat_pmd")
72 #define CDEV_LOG_ERR(fmt, args...) \
73 RTE_LOG(ERR, CRYPTODEV, "%s() line %u: " fmt "\n", \
74 __func__, __LINE__, ## args)
76 #define CDEV_PMD_LOG_ERR(dev, fmt, args...) \
77 RTE_LOG(ERR, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
78 dev, __func__, __LINE__, ## args)
80 #ifdef RTE_LIBRTE_CRYPTODEV_DEBUG
81 #define CDEV_LOG_DEBUG(fmt, args...) \
82 RTE_LOG(DEBUG, CRYPTODEV, "%s() line %u: " fmt "\n", \
83 __func__, __LINE__, ## args) \
85 #define CDEV_PMD_TRACE(fmt, args...) \
86 RTE_LOG(DEBUG, CRYPTODEV, "[%s] %s: " fmt "\n", \
87 dev, __func__, ## args)
90 #define CDEV_LOG_DEBUG(fmt, args...)
91 #define CDEV_PMD_TRACE(fmt, args...)
106 #define RTE_CRYPTODEV_DETACHED (0)
107 #define RTE_CRYPTODEV_ATTACHED (1)
133 #ifdef RTE_CRYPTODEV_PERF
138 struct rte_cryptodev_perf_stats {
139 uint64_t t_accumlated;
157 #ifdef RTE_CRYPTODEV_DETAILED_STATS
159 uint64_t encrypt_ops;
160 uint64_t encrypt_bytes;
162 uint64_t decrypt_ops;
163 uint64_t decrypt_bytes;
167 uint64_t generate_ops;
168 uint64_t bytes_hashed;
171 uint64_t bytes_verified;
175 #ifdef RTE_CRYPTODEV_PERF
176 struct rte_cryptodev_perf_stats op_perf;
229 rte_cryptodev_socket_id(uint8_t dev_id);
452 struct rte_cryptodev_callback;
455 TAILQ_HEAD(rte_cryptodev_cb_list, rte_cryptodev_callback);
486 #define RTE_CRYPTODEV_NAME_MAX_LEN (64)
554 static inline uint16_t
556 struct rte_mbuf **pkts, uint16_t nb_pkts)
599 static inline uint16_t
601 struct rte_mbuf **pkts, uint16_t nb_pkts)
631 extern struct rte_cryptodev_session *
647 extern struct rte_cryptodev_session *
649 struct rte_cryptodev_session *session);