DPDK 22.11.5
|
#include <rte_mbuf.h>
#include <rte_memory.h>
#include <rte_mempool.h>
#include <rte_common.h>
#include "rte_crypto_sym.h"
#include "rte_crypto_asym.h"
Go to the source code of this file.
Data Structures | |
struct | rte_crypto_op |
struct | rte_crypto_op_pool_private |
Macros | |
#define | RTE_CRYPTO_OP_AUX_FLAGS_IPSEC_SOFT_EXPIRY (1 << 0) |
Functions | |
static void | __rte_crypto_op_reset (struct rte_crypto_op *op, enum rte_crypto_op_type type) |
static uint16_t | __rte_crypto_op_get_priv_data_size (struct rte_mempool *mempool) |
struct rte_mempool * | rte_crypto_op_pool_create (const char *name, enum rte_crypto_op_type type, unsigned nb_elts, unsigned cache_size, uint16_t priv_size, int socket_id) |
static int | __rte_crypto_op_raw_bulk_alloc (struct rte_mempool *mempool, enum rte_crypto_op_type type, struct rte_crypto_op **ops, uint16_t nb_ops) |
static struct rte_crypto_op * | rte_crypto_op_alloc (struct rte_mempool *mempool, enum rte_crypto_op_type type) |
static unsigned | rte_crypto_op_bulk_alloc (struct rte_mempool *mempool, enum rte_crypto_op_type type, struct rte_crypto_op **ops, uint16_t nb_ops) |
static void * | __rte_crypto_op_get_priv_data (struct rte_crypto_op *op, uint32_t size) |
static void | rte_crypto_op_free (struct rte_crypto_op *op) |
static struct rte_crypto_op * | rte_crypto_sym_op_alloc_from_mbuf_priv_data (struct rte_mbuf *m) |
static struct rte_crypto_sym_xform * | rte_crypto_op_sym_xforms_alloc (struct rte_crypto_op *op, uint8_t nb_xforms) |
static int | rte_crypto_op_attach_sym_session (struct rte_crypto_op *op, void *sess) |
static int | rte_crypto_op_attach_asym_session (struct rte_crypto_op *op, struct rte_cryptodev_asym_session *sess) |
RTE Cryptography Common Definitions
Definition in file rte_crypto.h.
#define RTE_CRYPTO_OP_AUX_FLAGS_IPSEC_SOFT_EXPIRY (1 << 0) |
SA soft expiry limit has been reached
Definition at line 71 of file rte_crypto.h.
enum rte_crypto_op_type |
Crypto operation types
Enumerator | |
---|---|
RTE_CRYPTO_OP_TYPE_UNDEFINED | Undefined operation type |
RTE_CRYPTO_OP_TYPE_SYMMETRIC | Symmetric operation |
RTE_CRYPTO_OP_TYPE_ASYMMETRIC | Asymmetric operation |
Definition at line 29 of file rte_crypto.h.
enum rte_crypto_op_status |
Status of crypto operation
Definition at line 39 of file rte_crypto.h.
Crypto operation session type. This is used to specify whether a crypto operation has session structure attached for immutable parameters or if all operation information is included in the operation data structure.
Enumerator | |
---|---|
RTE_CRYPTO_OP_WITH_SESSION | Session based crypto operation |
RTE_CRYPTO_OP_SESSIONLESS | Session-less crypto operation |
RTE_CRYPTO_OP_SECURITY_SESSION | Security session crypto operation |
Definition at line 62 of file rte_crypto.h.
|
inlinestatic |
Reset the fields of a crypto operation to their default values.
op | The crypto operation to be reset. |
type | The crypto operation type. |
Definition at line 153 of file rte_crypto.h.
|
inlinestatic |
Returns the size of private data allocated with each rte_crypto_op object by the mempool
mempool | rte_crypto_op mempool |
Definition at line 192 of file rte_crypto.h.
struct rte_mempool * rte_crypto_op_pool_create | ( | const char * | name, |
enum rte_crypto_op_type | type, | ||
unsigned | nb_elts, | ||
unsigned | cache_size, | ||
uint16_t | priv_size, | ||
int | socket_id | ||
) |
Creates a crypto operation pool
name | pool name |
type | crypto operation type, use RTE_CRYPTO_OP_TYPE_UNDEFINED for a pool which supports all operation types |
nb_elts | number of elements in pool |
cache_size | Number of elements to cache on lcore, see rte_mempool_create for further details about cache size |
priv_size | Size of private data to allocate with each operation |
socket_id | Socket to allocate memory on |
|
inlinestatic |
Bulk allocate raw element from mempool and return as crypto operations
mempool | crypto operation mempool. |
type | crypto operation type. |
ops | Array to place allocated crypto operations |
nb_ops | Number of crypto operations to allocate |
Definition at line 237 of file rte_crypto.h.
|
inlinestatic |
Allocate a crypto operation from a mempool with default parameters set
mempool | crypto operation mempool |
type | operation type to allocate |
Definition at line 265 of file rte_crypto.h.
|
inlinestatic |
Bulk allocate crypto operations from a mempool with default parameters set
mempool | crypto operation mempool |
type | operation type to allocate |
ops | Array to place allocated crypto operations |
nb_ops | Number of crypto operations to allocate |
Definition at line 295 of file rte_crypto.h.
|
inlinestatic |
Returns a pointer to the private data of a crypto operation if that operation has enough capacity for requested size.
op | crypto operation. |
size | size of space requested in private data. |
Definition at line 325 of file rte_crypto.h.
|
inlinestatic |
free crypto operation structure If operation has been allocate from a rte_mempool, then the operation will be returned to the mempool.
op | Pointer to symmetric crypto operation allocated with rte_crypto_op_alloc() If op is NULL, no operation is performed. |
Definition at line 355 of file rte_crypto.h.
|
inlinestatic |
Allocate a symmetric crypto operation in the private data of an mbuf.
m | mbuf which is associated with the crypto operation, the operation will be allocated in the private data of that mbuf. |
Definition at line 373 of file rte_crypto.h.
|
inlinestatic |
Allocate space for symmetric crypto xforms in the private data space of the crypto operation. This also defaults the crypto xform type and configures the chaining of the xforms in the crypto operation
Definition at line 407 of file rte_crypto.h.
|
inlinestatic |
Attach a session to a crypto operation
op | crypto operation, must be of type symmetric |
sess | cryptodev session |
Definition at line 433 of file rte_crypto.h.
|
inlinestatic |
Attach a asymmetric session to a crypto operation
op | crypto operation, must be of type asymmetric |
sess | cryptodev session |
Definition at line 450 of file rte_crypto.h.