rte_crypto.h(3)
β¨ rte_crypto.h β DPDK's common crypto definitions, bestie β¨
π NAME π
rte_crypto.h β the common crypto header for DPDK crypto operations. Short name section, iconic behavior. π
β¨ SYNOPSIS β¨
Okay so you include these headers, and yes the last two use single quotes exactly like the page says:
#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'
π§Έ Data Structures
struct rte_crypto_opstruct rte_crypto_op_pool_private
π Macros
#define RTE_CRYPTO_OP_AUX_FLAGS_SESS_SOFT_EXPIRY (1 << 0)β session soft expiry limit has been reached. Applicable for any session that has a soft lifetime feature supported.#define RTE_CRYPTO_OP_AUX_FLAGS_IPSEC_SOFT_EXPIRYβRTE_CRYPTO_OP_AUX_FLAGS_SESS_SOFT_EXPIRY; SA soft expiry limit has been reached.
π¦ Enumerations
enum rte_crypto_op_type { RTE_CRYPTO_OP_TYPE_UNDEFINED, RTE_CRYPTO_OP_TYPE_SYMMETRIC, RTE_CRYPTO_OP_TYPE_ASYMMETRIC }enum rte_crypto_op_status { RTE_CRYPTO_OP_STATUS_SUCCESS, RTE_CRYPTO_OP_STATUS_NOT_PROCESSED, RTE_CRYPTO_OP_STATUS_AUTH_FAILED, RTE_CRYPTO_OP_STATUS_INVALID_SESSION, RTE_CRYPTO_OP_STATUS_INVALID_ARGS, RTE_CRYPTO_OP_STATUS_ERROR }enum rte_crypto_op_sess_type { RTE_CRYPTO_OP_WITH_SESSION, RTE_CRYPTO_OP_SESSIONLESS, RTE_CRYPTO_OP_SECURITY_SESSION }
πΈ Functions
All the function signatures, copied exactly with their inline/static energy:
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)
π₯ Detailed Description π₯
RTE Cryptography Common Definitions
Definition in file rte_crypto.h.
π Macro Definition Documentation π
RTE_CRYPTO_OP_AUX_FLAGS_SESS_SOFT_EXPIRY
#define RTE_CRYPTO_OP_AUX_FLAGS_SESS_SOFT_EXPIRY (1 << 0)
Session soft expiry limit has been reached. Applicable for any session that has a soft lifetime feature supported.
See also: rte_security_ipsec_lifetime, rte_security_tls_record_lifetime
Definition at line 74 of file rte_crypto.h.
RTE_CRYPTO_OP_AUX_FLAGS_IPSEC_SOFT_EXPIRY
#define RTE_CRYPTO_OP_AUX_FLAGS_IPSEC_SOFT_EXPIRY
RTE_CRYPTO_OP_AUX_FLAGS_SESS_SOFT_EXPIRY
SA soft expiry limit has been reached
Definition at line 79 of file rte_crypto.h.
π Enumeration Type Documentation π
enum rte_crypto_op_type
Crypto operation types
Enumerator
RTE_CRYPTO_OP_TYPE_UNDEFINEDβ undefined operation typeRTE_CRYPTO_OP_TYPE_SYMMETRICβ symmetric operationRTE_CRYPTO_OP_TYPE_ASYMMETRICβ asymmetric operation
Definition at line 28 of file rte_crypto.h.
enum rte_crypto_op_status
Status of crypto operation
Enumerator
RTE_CRYPTO_OP_STATUS_SUCCESSβ operation completed successfullyRTE_CRYPTO_OP_STATUS_NOT_PROCESSEDβ operation has not yet been processed by a crypto deviceRTE_CRYPTO_OP_STATUS_AUTH_FAILEDβ authentication verification failedRTE_CRYPTO_OP_STATUS_INVALID_SESSIONβ symmetric operation failed due to invalid session arguments, or if in session-less mode, failed to allocate private operation material.RTE_CRYPTO_OP_STATUS_INVALID_ARGSβ operation failed due to invalid arguments in requestRTE_CRYPTO_OP_STATUS_ERRORβ error handling operation
Definition at line 38 of file rte_crypto.h.
enum rte_crypto_op_sess_type
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 operationRTE_CRYPTO_OP_SESSIONLESSβ session-less crypto operationRTE_CRYPTO_OP_SECURITY_SESSIONβ security session crypto operation
Definition at line 61 of file rte_crypto.h.
β Function Documentation β
__rte_crypto_op_reset β reset the fields, keep the facts
static void __rte_crypto_op_reset (struct rte_crypto_op * op, enum
rte_crypto_op_type type) [inline], [static]
Reset the fields of a crypto operation to their default values.
Parameters:
opβ the crypto operation to be reset.typeβ the crypto operation type.
Definition at line 196 of file rte_crypto.h.
__rte_crypto_op_get_priv_data_size β size check, but make it cute
static uint16_t __rte_crypto_op_get_priv_data_size (struct rte_mempool *
mempool) [inline], [static]
Returns the size of private data allocated with each rte_crypto_op object by the mempool.
Parameters:
mempoolβrte_crypto_opmempool.
Returns:
- private data size
Definition at line 235 of file rte_crypto.h.
rte_crypto_op_pool_create β make a pool, hydrate, repeat
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.
Parameters:
nameβ pool nametypeβ crypto operation type, useRTE_CRYPTO_OP_TYPE_UNDEFINEDfor a pool which supports all operation typesnb_eltsβ number of elements in poolcache_sizeβ number of elements to cache on lcore, seerte_mempool_createfor further details about cache sizepriv_sizeβ size of private data to allocate with each operationsocket_idβ socket to allocate memory on
Returns:
- On success pointer to mempool
- On failure
NULL
__rte_crypto_op_raw_bulk_alloc β raw bulk allocation, no cap
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) [inline], [static]
Bulk allocate raw element from mempool and return as crypto operations.
Parameters:
mempoolβ crypto operation mempool.typeβ crypto operation type.opsβ array to place allocated crypto operationsnb_opsβ number of crypto operations to allocate
Returns:
- On success returns number of ops allocated
Definition at line 280 of file rte_crypto.h.
rte_crypto_op_alloc β one op, pls
static struct rte_crypto_op* rte_crypto_op_alloc (struct rte_mempool *
mempool, enum rte_crypto_op_type type) [inline], [static]
Allocate a crypto operation from a mempool with default parameters set.
Parameters:
mempoolβ crypto operation mempooltypeβ operation type to allocate
Returns:
- On success returns a valid
rte_crypto_opstructure - On failure returns
NULL
Definition at line 308 of file rte_crypto.h.
rte_crypto_op_bulk_alloc β group chat allocation
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)
[inline], [static]
Bulk allocate crypto operations from a mempool with default parameters set.
Parameters:
mempoolβ crypto operation mempooltypeβ operation type to allocateopsβ array to place allocated crypto operationsnb_opsβ number of crypto operations to allocate
Returns:
nb_opsif the number of operations requested were allocated.0if the requested number of ops are not available. None are allocated in this case.
Definition at line 338 of file rte_crypto.h.
__rte_crypto_op_get_priv_data β access the private data, respectfully
static void* __rte_crypto_op_get_priv_data (struct rte_crypto_op * op,
uint32_t size) [inline], [static]
Returns a pointer to the private data of a crypto operation if that operation has enough capacity for requested size.
Parameters:
opβ crypto operation.sizeβ size of space requested in private data.
Returns:
- if sufficient space available returns pointer to start of private data
- if insufficient space returns
NULL
Definition at line 368 of file rte_crypto.h.
rte_crypto_op_free β release the op back to the pool
static void rte_crypto_op_free (struct rte_crypto_op * op) [inline],
[static]
Free crypto operation structure. If operation has been allocated from a rte_mempool, then the operation will be returned to the mempool.
Parameters:
opβ pointer to symmetric crypto operation allocated withrte_crypto_op_alloc(). IfopisNULL, no operation is performed.
Definition at line 398 of file rte_crypto.h.
rte_crypto_sym_op_alloc_from_mbuf_priv_data β op hiding in an mbuf's private data
static struct rte_crypto_op* rte_crypto_sym_op_alloc_from_mbuf_priv_data
(struct rte_mbuf * m) [inline], [static]
Allocate a symmetric crypto operation in the private data of an mbuf.
Parameters:
mβ mbuf which is associated with the crypto operation, the operation will be allocated in the private data of that mbuf.
Returns:
- On success returns a pointer to the crypto operation.
- On failure returns
NULL.
Definition at line 416 of file rte_crypto.h.
rte_crypto_op_sym_xforms_alloc β xform chain, assembled
static struct rte_crypto_sym_xform* rte_crypto_op_sym_xforms_alloc (struct
rte_crypto_op * op, uint8_t nb_xforms) [inline], [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.
Returns:
- On success returns pointer to first crypto xform in crypto operations chain
- On failure returns
NULL
Definition at line 450 of file rte_crypto.h.
rte_crypto_op_attach_sym_session β attach that symmetric session
static int rte_crypto_op_attach_sym_session (struct rte_crypto_op * op, void
* sess) [inline], [static]
Attach a session to a crypto operation.
Parameters:
opβ crypto operation, must be of type symmetricsessβ cryptodev session
Definition at line 476 of file rte_crypto.h.
rte_crypto_op_attach_asym_session β attach that asymmetric session
static int rte_crypto_op_attach_asym_session (struct rte_crypto_op * op,
struct rte_cryptodev_asym_session * sess) [inline], [static]
Attach a asymmetric session to a crypto operation.
Parameters:
opβ crypto operation, must be of type asymmetricsessβ cryptodev session
Definition at line 493 of file rte_crypto.h.
π Author π
Generated automatically by Doxygen for DPDK from the source code.
That's the whole page, bestie β facts intact, vibe immaculate. Footer tea: Version 25.11.0, dated Fri Jan 30 2026, for rte_crypto.h(3) from DPDK. Mwah ππ
π¦ where this page comes from
- centos-stream 9: dpdk-devel 2:25.11-1.el9 Β· BSD and LGPLv2 and GPLv2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms