5 #ifndef _RTE_CRYPTODEV_PMD_H_
6 #define _RTE_CRYPTODEV_PMD_H_
22 #include <rte_config.h>
34 #define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS 8
36 #define RTE_CRYPTODEV_PMD_NAME_ARG ("name")
37 #define RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG ("max_nb_queue_pairs")
38 #define RTE_CRYPTODEV_PMD_SOCKET_ID_ARG ("socket_id")
41 static const char *
const cryptodev_pmd_valid_params[] = {
42 RTE_CRYPTODEV_PMD_NAME_ARG,
43 RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
44 RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
52 struct rte_cryptodev_pmd_init_params {
54 size_t private_data_size;
56 unsigned int max_nb_queue_pairs;
68 struct cryptodev_driver {
69 TAILQ_ENTRY(cryptodev_driver) next;
226 unsigned obj_cache_size,
int socket_id);
450 rte_cryptodev_pmd_parse_input_args(
451 struct rte_cryptodev_pmd_init_params *params,
469 rte_cryptodev_pmd_create(
const char *name,
471 struct rte_cryptodev_pmd_init_params *params);
506 rte_cryptodev_pmd_create_dev_name(
char *name,
const char *dev_name_prefix);
520 uint8_t rte_cryptodev_allocate_driver(
struct cryptodev_driver *crypto_drv,
524 #define RTE_PMD_REGISTER_CRYPTO_DRIVER(crypto_drv, drv, driver_id)\
525 RTE_INIT(init_ ##driver_id)\
527 driver_id = rte_cryptodev_allocate_driver(&crypto_drv, &(drv));\
541 uint8_t driver_id,
void *private_data)
544 CDEV_LOG_ERR(
"Set private data for driver %u not allowed\n",
560 uint8_t driver_id,
void *private_data)
void(* cryptodev_stop_t)(struct rte_cryptodev *dev)
int(* cryptodev_sym_configure_raw_dp_ctx_t)(struct rte_cryptodev *dev, uint16_t qp_id, struct rte_crypto_raw_dp_ctx *ctx, enum rte_crypto_op_sess_type sess_type, union rte_cryptodev_session_ctx session_ctx, uint8_t is_update)
void(* cryptodev_info_get_t)(struct rte_cryptodev *dev, struct rte_cryptodev_info *dev_info)
cryptodev_close_t dev_close
unsigned int(* cryptodev_asym_get_session_private_size_t)(struct rte_cryptodev *dev)
int rte_cryptodev_pmd_release_device(struct rte_cryptodev *cryptodev)
struct rte_cryptodev_data * data[RTE_CRYPTO_MAX_DEVS]
void(* cryptodev_asym_free_session_t)(struct rte_cryptodev *dev, struct rte_cryptodev_asym_session *sess)
cryptodev_stop_t dev_stop
cryptodev_asym_get_session_private_size_t asym_session_get_size
struct rte_cryptodev * devs
cryptodev_sym_get_session_private_size_t sym_session_get_size
int(* cryptodev_sym_configure_session_t)(struct rte_cryptodev *dev, struct rte_crypto_sym_xform *xform, struct rte_cryptodev_sym_session *session, struct rte_mempool *mp)
uint32_t(* cryptodev_sym_cpu_crypto_process_t)(struct rte_cryptodev *dev, struct rte_cryptodev_sym_session *sess, union rte_crypto_sym_ofs ofs, struct rte_crypto_sym_vec *vec)
cryptodev_sym_configure_session_t sym_session_configure
__extension__ void * sess_private_data[0]
struct rte_cryptodev * rte_cryptodev_pmd_get_named_dev(const char *name)
#define RTE_CRYPTODEV_NAME_MAX_LEN
cryptodev_sym_free_session_t sym_session_clear
struct rte_cryptodev * rte_cryptodev_pmd_get_dev(uint8_t dev_id)
unsigned(* cryptodev_sym_get_session_private_size_t)(struct rte_cryptodev *dev)
struct rte_cryptodev * rte_cryptodev_pmd_allocate(const char *name, int socket_id)
int(* cryptodev_configure_t)(struct rte_cryptodev *dev, struct rte_cryptodev_config *config)
cryptodev_sym_cpu_crypto_process_t sym_cpu_process
void rte_cryptodev_pmd_callback_process(struct rte_cryptodev *dev, enum rte_cryptodev_event_type event)
unsigned int rte_cryptodev_pmd_is_valid_dev(uint8_t dev_id)
int(* cryptodev_queue_pair_setup_t)(struct rte_cryptodev *dev, uint16_t qp_id, const struct rte_cryptodev_qp_conf *qp_conf, int socket_id)
int(* cryptodev_queue_pair_release_t)(struct rte_cryptodev *dev, uint16_t qp_id)
cryptodev_stats_get_t stats_get
cryptodev_asym_configure_session_t asym_session_configure
int(* cryptodev_sym_create_session_pool_t)(struct rte_cryptodev *dev, unsigned nb_objs, unsigned obj_cache_size, int socket_id)
cryptodev_configure_t dev_configure
void(* cryptodev_stats_reset_t)(struct rte_cryptodev *dev)
cryptodev_info_get_t dev_infos_get
cryptodev_start_t dev_start
int(* cryptodev_close_t)(struct rte_cryptodev *dev)
struct rte_device * device
cryptodev_stats_reset_t stats_reset
cryptodev_queue_pair_setup_t queue_pair_setup
cryptodev_sym_get_raw_dp_ctx_size_t sym_get_raw_dp_ctx_size
void(* cryptodev_stats_get_t)(struct rte_cryptodev *dev, struct rte_cryptodev_stats *stats)
void(* cryptodev_sym_free_session_t)(struct rte_cryptodev *dev, struct rte_cryptodev_sym_session *sess)
cryptodev_queue_pair_release_t queue_pair_release
int(* cryptodev_sym_get_raw_dp_ctx_size_t)(struct rte_cryptodev *dev)
int(* cryptodev_asym_configure_session_t)(struct rte_cryptodev *dev, struct rte_crypto_asym_xform *xform, struct rte_cryptodev_asym_session *session, struct rte_mempool *mp)
__extension__ struct rte_cryptodev_sym_session::@146 sess_data[0]
cryptodev_asym_free_session_t asym_session_clear
struct rte_cryptodev * rte_cryptodevs
cryptodev_sym_configure_raw_dp_ctx_t sym_configure_raw_dp_ctx
int(* cryptodev_start_t)(struct rte_cryptodev *dev)