DPDK  20.05.0
Data Structures | Typedefs
rte_security_driver.h File Reference
#include "rte_security.h"

Go to the source code of this file.

Data Structures

struct  rte_security_ops
 

Typedefs

typedef int(* security_session_create_t) (void *device, struct rte_security_session_conf *conf, struct rte_security_session *sess, struct rte_mempool *mp)
 
typedef int(* security_session_destroy_t) (void *device, struct rte_security_session *sess)
 
typedef int(* security_session_update_t) (void *device, struct rte_security_session *sess, struct rte_security_session_conf *conf)
 
typedef unsigned int(* security_session_get_size) (void *device)
 
typedef int(* security_session_stats_get_t) (void *device, struct rte_security_session *sess, struct rte_security_stats *stats)
 
typedef int(* security_set_pkt_metadata_t) (void *device, struct rte_security_session *sess, struct rte_mbuf *m, void *params)
 
typedef int(* security_get_userdata_t) (void *device, uint64_t md, void **userdata)
 
typedef const struct rte_security_capability *(* security_capabilities_get_t) (void *device)
 

Detailed Description

RTE Security Common Definitions

Definition in file rte_security_driver.h.

Typedef Documentation

typedef int(* security_session_create_t) (void *device, struct rte_security_session_conf *conf, struct rte_security_session *sess, struct rte_mempool *mp)

Configure a security session on a device.

Parameters
deviceCrypto/eth device pointer
confSecurity session configuration
sessPointer to Security private session structure
mpMempool where the private session is allocated
Returns
  • Returns 0 if private session structure have been created successfully.
  • Returns -EINVAL if input parameters are invalid.
  • Returns -ENOTSUP if crypto device does not support the crypto transform.
  • Returns -ENOMEM if the private session could not be allocated.

Definition at line 36 of file rte_security_driver.h.

typedef int(* security_session_destroy_t) (void *device, struct rte_security_session *sess)

Free driver private session data.

Parameters
devCrypto/eth device pointer
sessSecurity session structure

Definition at line 47 of file rte_security_driver.h.

typedef int(* security_session_update_t) (void *device, struct rte_security_session *sess, struct rte_security_session_conf *conf)

Update driver private session data.

Parameters
deviceCrypto/eth device pointer
sessPointer to Security private session structure
confSecurity session configuration
Returns
  • Returns 0 if private session structure have been updated successfully.
  • Returns -EINVAL if input parameters are invalid.
  • Returns -ENOTSUP if crypto device does not support the crypto transform.

Definition at line 62 of file rte_security_driver.h.

typedef unsigned int(* security_session_get_size) (void *device)

Get the size of a security session

Parameters
deviceCrypto/eth device pointer
Returns
  • On success returns the size of the session structure for device
  • On failure returns 0

Definition at line 75 of file rte_security_driver.h.

typedef int(* security_session_stats_get_t) (void *device, struct rte_security_session *sess, struct rte_security_stats *stats)

Get stats from the PMD.

Parameters
deviceCrypto/eth device pointer
sessPointer to Security private session structure
statsSecurity stats of the driver
Returns
  • Returns 0 if private session structure have been updated successfully.
  • Returns -EINVAL if session parameters are invalid.

Definition at line 88 of file rte_security_driver.h.

typedef int(* security_set_pkt_metadata_t) (void *device, struct rte_security_session *sess, struct rte_mbuf *m, void *params)

Update the mbuf with provided metadata.

Parameters
sessSecurity session structure
mbPacket buffer
mtMetadata
Returns
  • Returns 0 if metadata updated successfully.
  • Returns -ve value for errors.

Definition at line 103 of file rte_security_driver.h.

typedef int(* security_get_userdata_t) (void *device, uint64_t md, void **userdata)

Get application specific userdata associated with the security session. Device specific metadata provided would be used to uniquely identify the security session being referred to.

Parameters
deviceCrypto/eth device pointer
mdMetadata
userdataPointer to receive userdata
Returns
  • Returns 0 if userdata is retrieved successfully.
  • Returns -ve value for errors.

Definition at line 120 of file rte_security_driver.h.

typedef const struct rte_security_capability*(* security_capabilities_get_t) (void *device)

Get security capabilities of the device.

Parameters
devicecrypto/eth device pointer
Returns

Definition at line 132 of file rte_security_driver.h.