32 #ifndef _RTE_CRYPTODEV_H_
33 #define _RTE_CRYPTODEV_H_
54 extern const char **rte_cyptodev_names;
58 #define CDEV_LOG_ERR(...) \
59 RTE_LOG(ERR, CRYPTODEV, \
60 RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
61 __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
63 #define CDEV_PMD_LOG_ERR(dev, ...) \
64 RTE_LOG(ERR, CRYPTODEV, \
65 RTE_FMT("[%s] %s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
66 dev, __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
68 #ifdef RTE_LIBRTE_CRYPTODEV_DEBUG
69 #define CDEV_LOG_DEBUG(...) \
70 RTE_LOG(DEBUG, CRYPTODEV, \
71 RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
72 __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
74 #define CDEV_PMD_TRACE(...) \
75 RTE_LOG(DEBUG, CRYPTODEV, \
76 RTE_FMT("[%s] %s: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
77 dev, __func__, RTE_FMT_TAIL(__VA_ARGS__,)))
80 #define CDEV_LOG_DEBUG(...) (void)0
81 #define CDEV_PMD_TRACE(...) (void)0
99 #define rte_crypto_op_ctod_offset(c, t, o) \
100 ((t)((char *)(c) + (o)))
113 #define rte_crypto_op_ctophys_offset(c, o) \
114 (phys_addr_t)((c)->phys_addr + (o))
285 const char *algo_string);
300 const char *algo_string);
315 const char *algo_string);
318 #define RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST() \
319 { RTE_CRYPTO_OP_TYPE_UNDEFINED }
330 #define RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO (1ULL << 0)
332 #define RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO (1ULL << 1)
334 #define RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING (1ULL << 2)
336 #define RTE_CRYPTODEV_FF_CPU_SSE (1ULL << 3)
338 #define RTE_CRYPTODEV_FF_CPU_AVX (1ULL << 4)
340 #define RTE_CRYPTODEV_FF_CPU_AVX2 (1ULL << 5)
342 #define RTE_CRYPTODEV_FF_CPU_AESNI (1ULL << 6)
344 #define RTE_CRYPTODEV_FF_HW_ACCELERATED (1ULL << 7)
346 #define RTE_CRYPTODEV_FF_CPU_AVX512 (1ULL << 8)
348 #define RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER (1ULL << 9)
350 #define RTE_CRYPTODEV_FF_CPU_NEON (1ULL << 10)
352 #define RTE_CRYPTODEV_FF_CPU_ARM_CE (1ULL << 11)
392 #define RTE_CRYPTODEV_DETACHED (0)
393 #define RTE_CRYPTODEV_ATTACHED (1)
433 #define RTE_CRYPTODEV_NAME_MAX_LEN (64)
511 rte_cryptodev_socket_id(uint8_t dev_id);
732 struct rte_cryptodev_callback;
735 TAILQ_HEAD(rte_cryptodev_cb_list, rte_cryptodev_callback);
831 static inline uint16_t
874 static inline uint16_t
1037 uint8_t rte_cryptodev_allocate_driver(
const struct rte_driver *driver);
1040 #define RTE_PMD_REGISTER_CRYPTO_DRIVER(drv, driver_id)\
1041 RTE_INIT(init_ ##driver_id);\
1042 static void init_ ##driver_id(void)\
1044 driver_id = rte_cryptodev_allocate_driver(&(drv).driver);\