DPDK
19.08.0-rc0
|
#include <string.h>
#include <rte_config.h>
#include <rte_dev.h>
#include <rte_malloc.h>
#include <rte_mbuf.h>
#include <rte_mempool.h>
#include <rte_log.h>
#include <rte_common.h>
#include "rte_crypto.h"
#include "rte_cryptodev.h"
Go to the source code of this file.
Data Structures | |
struct | rte_cryptodev_global |
struct | rte_cryptodev_ops |
Functions | |
struct rte_cryptodev * | rte_cryptodev_pmd_get_dev (uint8_t dev_id) |
struct rte_cryptodev * | rte_cryptodev_pmd_get_named_dev (const char *name) |
unsigned int | rte_cryptodev_pmd_is_valid_dev (uint8_t dev_id) |
struct rte_cryptodev * | rte_cryptodev_pmd_allocate (const char *name, int socket_id) |
int | rte_cryptodev_pmd_release_device (struct rte_cryptodev *cryptodev) |
void | rte_cryptodev_pmd_callback_process (struct rte_cryptodev *dev, enum rte_cryptodev_event_type event) |
Variables | |
struct rte_cryptodev * | rte_cryptodevs |
RTE Crypto PMD APIs
Definition in file rte_cryptodev_pmd.h.
typedef int(* cryptodev_configure_t) (struct rte_cryptodev *dev, struct rte_cryptodev_config *config) |
Definitions of all functions exported by a driver through the the generic structure of type crypto_dev_ops supplied in the rte_cryptodev structure associated with a device. Function used to configure device.
dev | Crypto device pointer config Crypto device configurations |
Definition at line 128 of file rte_cryptodev_pmd.h.
typedef int(* cryptodev_start_t) (struct rte_cryptodev *dev) |
Function used to start a configured device.
dev | Crypto device pointer |
Definition at line 138 of file rte_cryptodev_pmd.h.
typedef void(* cryptodev_stop_t) (struct rte_cryptodev *dev) |
Function used to stop a configured device.
dev | Crypto device pointer |
Definition at line 145 of file rte_cryptodev_pmd.h.
typedef int(* cryptodev_close_t) (struct rte_cryptodev *dev) |
Function used to close a configured device.
dev | Crypto device pointer |
Definition at line 155 of file rte_cryptodev_pmd.h.
typedef void(* cryptodev_stats_get_t) (struct rte_cryptodev *dev, struct rte_cryptodev_stats *stats) |
Function used to get statistics of a device.
dev | Crypto device pointer |
stats | Pointer to crypto device stats structure to populate |
Definition at line 164 of file rte_cryptodev_pmd.h.
typedef void(* cryptodev_stats_reset_t) (struct rte_cryptodev *dev) |
Function used to reset statistics of a device.
dev | Crypto device pointer |
Definition at line 173 of file rte_cryptodev_pmd.h.
typedef void(* cryptodev_info_get_t) (struct rte_cryptodev *dev, struct rte_cryptodev_info *dev_info) |
Function used to get specific information of a device.
dev | Crypto device pointer |
Definition at line 181 of file rte_cryptodev_pmd.h.
typedef 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) |
Setup a queue pair for a device.
dev | Crypto device pointer |
qp_id | Queue Pair Index |
qp_conf | Queue configuration structure |
socket_id | Socket Index |
Definition at line 194 of file rte_cryptodev_pmd.h.
typedef int(* cryptodev_queue_pair_release_t) (struct rte_cryptodev *dev, uint16_t qp_id) |
Release memory resources allocated by given queue pair.
dev | Crypto device pointer |
qp_id | Queue Pair Index |
Definition at line 208 of file rte_cryptodev_pmd.h.
typedef uint32_t(* cryptodev_queue_pair_count_t) (struct rte_cryptodev *dev) |
Get number of available queue pairs of a device.
dev | Crypto device pointer |
Definition at line 218 of file rte_cryptodev_pmd.h.
typedef int(* cryptodev_sym_create_session_pool_t) (struct rte_cryptodev *dev, unsigned nb_objs, unsigned obj_cache_size, int socket_id) |
Create a session mempool to allocate sessions from
dev | Crypto device pointer |
nb_objs | number of sessions objects in mempool |
obj_cache | l-core object cache size, see rte_ring_create |
socket_id | Socket Id to allocate mempool on. |
Definition at line 232 of file rte_cryptodev_pmd.h.
typedef unsigned(* cryptodev_sym_get_session_private_size_t) (struct rte_cryptodev *dev) |
Get the size of a cryptodev session
dev | Crypto device pointer |
Definition at line 246 of file rte_cryptodev_pmd.h.
typedef unsigned int(* cryptodev_asym_get_session_private_size_t) (struct rte_cryptodev *dev) |
Get the size of a asymmetric cryptodev session
dev | Crypto device pointer |
Definition at line 257 of file rte_cryptodev_pmd.h.
typedef 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) |
Configure a Crypto session on a device.
dev | Crypto device pointer |
xform | Single or chain of crypto xforms |
priv_sess | Pointer to cryptodev's private session structure |
mp | Mempool where the private session is allocated |
Definition at line 274 of file rte_cryptodev_pmd.h.
typedef 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) |
Configure a Crypto asymmetric session on a device.
dev | Crypto device pointer |
xform | Single or chain of crypto xforms |
priv_sess | Pointer to cryptodev's private session structure |
mp | Mempool where the private session is allocated |
Definition at line 292 of file rte_cryptodev_pmd.h.
typedef void(* cryptodev_sym_free_session_t) (struct rte_cryptodev *dev, struct rte_cryptodev_sym_session *sess) |
Free driver private session data.
dev | Crypto device pointer |
sess | Cryptodev session structure |
Definition at line 302 of file rte_cryptodev_pmd.h.
typedef void(* cryptodev_asym_free_session_t) (struct rte_cryptodev *dev, struct rte_cryptodev_asym_session *sess) |
Free asymmetric session private data.
dev | Crypto device pointer |
sess | Cryptodev session structure |
Definition at line 310 of file rte_cryptodev_pmd.h.
struct rte_cryptodev* rte_cryptodev_pmd_get_dev | ( | uint8_t | dev_id | ) |
Get the rte_cryptodev structure device pointer for the device. Assumes a valid device index.
dev_id | Device ID value to select the device structure. |
struct rte_cryptodev* rte_cryptodev_pmd_get_named_dev | ( | const char * | name | ) |
Get the rte_cryptodev structure device pointer for the named device.
name | device name to select the device structure. |
unsigned int rte_cryptodev_pmd_is_valid_dev | ( | uint8_t | dev_id | ) |
Validate if the crypto device index is valid attached crypto device.
dev_id | Crypto device index. |
struct rte_cryptodev* rte_cryptodev_pmd_allocate | ( | const char * | name, |
int | socket_id | ||
) |
Function for internal use by dummy drivers primarily, e.g. ring-based driver. Allocates a new cryptodev slot for an crypto device and returns the pointer to that slot for the driver to use.
name | Unique identifier name for each device |
socket_id | Socket to allocate resources on. |
int rte_cryptodev_pmd_release_device | ( | struct rte_cryptodev * | cryptodev | ) |
Function for internal use by dummy drivers primarily, e.g. ring-based driver. Release the specified cryptodev device.
cryptodev | The cryptodev pointer is the address of the rte_cryptodev structure. |
void rte_cryptodev_pmd_callback_process | ( | struct rte_cryptodev * | dev, |
enum rte_cryptodev_event_type | event | ||
) |
Executes all the user application registered callbacks for the specific device.
dev | Pointer to cryptodev struct |
event | Crypto device interrupt event type. |
struct rte_cryptodev* rte_cryptodevs |
The pool of rte_cryptodev structures.