32 #ifndef _RTE_CRYPTODEV_PMD_H_
33 #define _RTE_CRYPTODEV_PMD_H_
49 #include <rte_config.h>
61 #define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS 8
62 #define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS 2048
64 #define RTE_CRYPTODEV_PMD_NAME_ARG ("name")
65 #define RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG ("max_nb_queue_pairs")
66 #define RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG ("max_nb_sessions")
67 #define RTE_CRYPTODEV_PMD_SOCKET_ID_ARG ("socket_id")
70 static const char *
const cryptodev_pmd_valid_params[] = {
71 RTE_CRYPTODEV_PMD_NAME_ARG,
72 RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
73 RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG,
74 RTE_CRYPTODEV_PMD_SOCKET_ID_ARG
81 struct rte_cryptodev_pmd_init_params {
83 size_t private_data_size;
85 unsigned int max_nb_queue_pairs;
86 unsigned int max_nb_sessions;
98 struct cryptodev_driver {
99 TAILQ_ENTRY(cryptodev_driver) next;
290 unsigned obj_cache_size,
int socket_id);
344 void *session_private);
357 void *session_private);
443 rte_cryptodev_pmd_parse_input_args(
444 struct rte_cryptodev_pmd_init_params *params,
462 rte_cryptodev_pmd_create(
const char *name,
464 struct rte_cryptodev_pmd_init_params *params);
499 rte_cryptodev_pmd_create_dev_name(
char *name,
const char *dev_name_prefix);
513 uint8_t rte_cryptodev_allocate_driver(
struct cryptodev_driver *crypto_drv,
517 #define RTE_PMD_REGISTER_CRYPTO_DRIVER(crypto_drv, drv, driver_id)\
518 RTE_INIT(init_ ##driver_id);\
519 static void init_ ##driver_id(void)\
521 driver_id = rte_cryptodev_allocate_driver(&crypto_drv, &(drv).driver);\
void(* cryptodev_stop_t)(struct rte_cryptodev *dev)
__extension__ void * sess_private_data[0]
void(* cryptodev_info_get_t)(struct rte_cryptodev *dev, struct rte_cryptodev_info *dev_info)
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, struct rte_mempool *session_pool)
cryptodev_sym_get_session_private_size_t session_get_size
cryptodev_close_t dev_close
int rte_cryptodev_pmd_release_device(struct rte_cryptodev *cryptodev)
struct rte_cryptodev_data * data[RTE_CRYPTO_MAX_DEVS]
cryptodev_stop_t dev_stop
struct rte_cryptodev * devs
uint32_t(* cryptodev_queue_pair_count_t)(struct rte_cryptodev *dev)
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)
cryptodev_sym_queue_pair_detach_session_t qp_detach_session
int(* cryptodev_queue_pair_stop_t)(struct rte_cryptodev *dev, uint16_t qp_id)
struct rte_cryptodev * rte_cryptodev_pmd_get_named_dev(const char *name)
#define RTE_CRYPTODEV_NAME_MAX_LEN
cryptodev_queue_pair_stop_t queue_pair_stop
struct rte_cryptodev * rte_cryptodev_pmd_get_dev(uint8_t dev_id)
int(* cryptodev_sym_queue_pair_detach_session_t)(struct rte_cryptodev *dev, uint16_t qp_id, void *session_private)
unsigned(* cryptodev_sym_get_session_private_size_t)(struct rte_cryptodev *dev)
cryptodev_queue_pair_count_t queue_pair_count
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)
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_release_t)(struct rte_cryptodev *dev, uint16_t qp_id)
cryptodev_stats_get_t stats_get
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
cryptodev_sym_queue_pair_attach_session_t qp_attach_session
cryptodev_sym_free_session_t session_clear
cryptodev_queue_pair_start_t queue_pair_start
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
struct rte_cryptodev_global * rte_cryptodev_globals
int(* cryptodev_queue_pair_start_t)(struct rte_cryptodev *dev, uint16_t qp_id)
void(* cryptodev_stats_get_t)(struct rte_cryptodev *dev, struct rte_cryptodev_stats *stats)
cryptodev_sym_configure_session_t session_configure
void(* cryptodev_sym_free_session_t)(struct rte_cryptodev *dev, struct rte_cryptodev_sym_session *sess)
cryptodev_queue_pair_release_t queue_pair_release
struct rte_cryptodev * rte_cryptodevs
int(* cryptodev_start_t)(struct rte_cryptodev *dev)
int(* cryptodev_sym_queue_pair_attach_session_t)(struct rte_cryptodev *dev, uint16_t qp_id, void *session_private)