DPDK
20.11.10
|
#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 |
RTE Cryptography Common Definitions
Definition in 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 143 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 182 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 227 of file rte_crypto.h.
|
static |
Allocate a crypto operation from a mempool with default parameters set
mempool | crypto operation mempool |
type | operation type to allocate |
Definition at line 255 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 285 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 315 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 | symmetric crypto operation |
Definition at line 343 of file rte_crypto.h.
|
static |
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 361 of file rte_crypto.h.
|
static |
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 395 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 421 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 439 of file rte_crypto.h.