DPDK 22.11.5
Data Structures | Macros | Typedefs
rte_security_driver.h File Reference
#include <rte_compat.h>
#include "rte_security.h"

Go to the source code of this file.

Data Structures

struct  rte_security_ops
 

Macros

#define SECURITY_GET_SESS_PRIV(s)    ((void *)(((struct rte_security_session *)s)->driver_priv_data))
 

Typedefs

typedef int(* security_session_create_t) (void *device, struct rte_security_session_conf *conf, struct rte_security_session *sess)
 
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 int(* security_macsec_sc_create_t) (void *device, struct rte_security_macsec_sc *conf)
 
typedef int(* security_macsec_sc_destroy_t) (void *device, uint16_t sc_id)
 
typedef int(* security_macsec_sa_create_t) (void *device, struct rte_security_macsec_sa *conf)
 
typedef int(* security_macsec_sa_destroy_t) (void *device, uint16_t sa_id)
 
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_macsec_sc_stats_get_t) (void *device, uint16_t sc_id, struct rte_security_macsec_sc_stats *stats)
 
typedef int(* security_macsec_sa_stats_get_t) (void *device, uint16_t sa_id, struct rte_security_macsec_sa_stats *stats)
 
typedef int(* security_set_pkt_metadata_t) (void *device, struct rte_security_session *sess, struct rte_mbuf *mb, void *params)
 
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.

Macro Definition Documentation

◆ SECURITY_GET_SESS_PRIV

#define SECURITY_GET_SESS_PRIV (   s)     ((void *)(((struct rte_security_session *)s)->driver_priv_data))

Helper macro to get driver private data

Definition at line 44 of file rte_security_driver.h.

Typedef Documentation

◆ security_session_create_t

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

Configure a security session on a device.

Parameters
deviceCrypto/eth device pointer
confSecurity session configuration
sessPointer to Security private session structure
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.

Definition at line 61 of file rte_security_driver.h.

◆ security_session_destroy_t

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

Free driver private session data.

Parameters
deviceCrypto/eth device pointer
sessSecurity session structure

Definition at line 71 of file rte_security_driver.h.

◆ security_session_update_t

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 86 of file rte_security_driver.h.

◆ security_macsec_sc_create_t

typedef int(* security_macsec_sc_create_t) (void *device, struct rte_security_macsec_sc *conf)

Configure a MACsec secure channel (SC) on a device.

Parameters
deviceCrypto/eth device pointer
confMACsec SC configuration params
Returns
  • positive sc_id if SC is created successfully.
  • -EINVAL if input parameters are invalid.
  • -ENOTSUP if device does not support MACsec.
  • -ENOMEM if the SC cannot be created.

Definition at line 102 of file rte_security_driver.h.

◆ security_macsec_sc_destroy_t

typedef int(* security_macsec_sc_destroy_t) (void *device, uint16_t sc_id)

Free MACsec secure channel (SC).

Parameters
deviceCrypto/eth device pointer
sc_idMACsec SC ID

Definition at line 110 of file rte_security_driver.h.

◆ security_macsec_sa_create_t

typedef int(* security_macsec_sa_create_t) (void *device, struct rte_security_macsec_sa *conf)

Configure a MACsec security Association (SA) on a device.

Parameters
deviceCrypto/eth device pointer
confMACsec SA configuration params
Returns
  • positive sa_id if SA is created successfully.
  • -EINVAL if input parameters are invalid.
  • -ENOTSUP if device does not support MACsec.
  • -ENOMEM if the SA cannot be created.

Definition at line 124 of file rte_security_driver.h.

◆ security_macsec_sa_destroy_t

typedef int(* security_macsec_sa_destroy_t) (void *device, uint16_t sa_id)

Free MACsec security association (SA).

Parameters
deviceCrypto/eth device pointer
sa_idMACsec SA ID

Definition at line 132 of file rte_security_driver.h.

◆ security_session_get_size

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 143 of file rte_security_driver.h.

◆ security_session_stats_get_t

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 156 of file rte_security_driver.h.

◆ security_macsec_sc_stats_get_t

typedef int(* security_macsec_sc_stats_get_t) (void *device, uint16_t sc_id, struct rte_security_macsec_sc_stats *stats)

Get MACsec secure channel stats from the PMD.

Parameters
deviceCrypto/eth device pointer
sc_idsecure channel ID created by rte_security_macsec_sc_create()
statsSC stats of the driver
Returns
  • 0 if success.
  • -EINVAL if sc_id or device is invalid.

Definition at line 171 of file rte_security_driver.h.

◆ security_macsec_sa_stats_get_t

typedef int(* security_macsec_sa_stats_get_t) (void *device, uint16_t sa_id, struct rte_security_macsec_sa_stats *stats)

Get MACsec SA stats from the PMD.

Parameters
deviceCrypto/eth device pointer
sa_idsecure channel ID created by rte_security_macsec_sc_create()
statsSC stats of the driver
Returns
  • 0 if success.
  • -EINVAL if sa_id or device is invalid.

Definition at line 185 of file rte_security_driver.h.

◆ security_set_pkt_metadata_t

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

Update the mbuf with provided metadata.

Parameters
deviceCrypto/eth device pointer
sessSecurity session structure
mbPacket buffer
paramsMetadata
Returns
  • Returns 0 if metadata updated successfully.
  • Returns -ve value for errors.

Definition at line 205 of file rte_security_driver.h.

◆ security_capabilities_get_t

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 205 of file rte_security_driver.h.