6#ifndef _RTE_SECURITY_H_
7#define _RTE_SECURITY_H_
22#include <rte_compat.h>
60#define RTE_SECURITY_IPSEC_TUNNEL_VERIFY_DST_ADDR 0x1
61#define RTE_SECURITY_IPSEC_TUNNEL_VERIFY_SRC_DST_ADDR 0x2
83#define RTE_SEC_CTX_F_FAST_SET_MDATA 0x00000001
86#define RTE_SEC_CTX_F_FAST_GET_UDATA 0x00000002
131struct rte_security_ipsec_udp_param {
343 struct rte_security_ipsec_udp_param
udp;
517struct rte_security_session {
518 void *sess_private_data;
520 uint64_t opaque_data;
535struct rte_security_session *
554 struct rte_security_session *sess,
585 struct rte_security_session *sess);
631 struct rte_security_session *sess,
649 struct rte_security_session *sess,
691 return (
void *)(uintptr_t)md;
705 struct rte_security_session *sess)
713get_sec_session_private_data(
const struct rte_security_session *sess)
715 return sess->sess_private_data;
719set_sec_session_private_data(
struct rte_security_session *sess,
722 sess->sess_private_data = private_data;
736 struct rte_security_session *sess)
746struct rte_security_macsec_stats {
750struct rte_security_ipsec_stats {
761struct rte_security_pdcp_stats {
765struct rte_security_docsis_stats {
769struct rte_security_stats {
775 struct rte_security_macsec_stats macsec;
776 struct rte_security_ipsec_stats ipsec;
777 struct rte_security_pdcp_stats pdcp;
778 struct rte_security_docsis_stats docsis;
798 struct rte_security_session *sess,
799 struct rte_security_stats *stats);
857#define RTE_SECURITY_PDCP_ORDERING_CAP 0x00000001
863#define RTE_SECURITY_PDCP_DUP_DETECT_CAP 0x00000002
865#define RTE_SECURITY_TX_OLOAD_NEED_MDATA 0x00000001
869#define RTE_SECURITY_TX_HW_TRAILER_OFFLOAD 0x00000002
875#define RTE_SECURITY_RX_HW_TRAILER_OFFLOAD 0x00010000
@ RTE_CRYPTO_OP_SECURITY_SESSION
@ RTE_CRYPTO_OP_TYPE_SYMMETRIC
#define RTE_MBUF_DYNFIELD(m, offset, type)
rte_security_session_protocol
@ RTE_SECURITY_PROTOCOL_PDCP
@ RTE_SECURITY_PROTOCOL_DOCSIS
@ RTE_SECURITY_PROTOCOL_IPSEC
@ RTE_SECURITY_PROTOCOL_MACSEC
static int __rte_security_attach_session(struct rte_crypto_sym_op *sym_op, struct rte_security_session *sess)
const struct rte_security_capability * rte_security_capability_get(struct rte_security_ctx *instance, struct rte_security_capability_idx *idx)
const struct rte_security_capability * rte_security_capabilities_get(struct rte_security_ctx *instance)
#define RTE_SEC_CTX_F_FAST_SET_MDATA
#define RTE_SEC_CTX_F_FAST_GET_UDATA
rte_security_pdcp_direction
@ RTE_SECURITY_PDCP_UPLINK
@ RTE_SECURITY_PDCP_DOWNLINK
struct rte_security_session * rte_security_session_create(struct rte_security_ctx *instance, struct rte_security_session_conf *conf, struct rte_mempool *mp, struct rte_mempool *priv_mp)
rte_security_ipsec_sa_protocol
@ RTE_SECURITY_IPSEC_SA_PROTO_AH
@ RTE_SECURITY_IPSEC_SA_PROTO_ESP
__rte_experimental int rte_security_session_update(struct rte_security_ctx *instance, struct rte_security_session *sess, struct rte_security_session_conf *conf)
rte_security_session_action_type
@ RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO
@ RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL
@ RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL
@ RTE_SECURITY_ACTION_TYPE_NONE
@ RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO
__rte_experimental int rte_security_session_stats_get(struct rte_security_ctx *instance, struct rte_security_session *sess, struct rte_security_stats *stats)
static __rte_experimental void * rte_security_get_userdata(struct rte_security_ctx *instance, uint64_t md)
rte_security_ipsec_sa_direction
@ RTE_SECURITY_IPSEC_SA_DIR_INGRESS
@ RTE_SECURITY_IPSEC_SA_DIR_EGRESS
int rte_security_session_destroy(struct rte_security_ctx *instance, struct rte_security_session *sess)
static int rte_security_set_pkt_metadata(struct rte_security_ctx *instance, struct rte_security_session *sess, struct rte_mbuf *mb, void *params)
rte_security_ipsec_sa_mode
@ RTE_SECURITY_IPSEC_SA_MODE_TUNNEL
@ RTE_SECURITY_IPSEC_SA_MODE_TRANSPORT
@ RTE_SECURITY_PDCP_MODE_CONTROL
@ RTE_SECURITY_PDCP_MODE_SHORT_MAC
@ RTE_SECURITY_PDCP_MODE_DATA
static int rte_security_attach_session(struct rte_crypto_op *op, struct rte_security_session *sess)
rte_security_docsis_direction
@ RTE_SECURITY_DOCSIS_UPLINK
@ RTE_SECURITY_DOCSIS_DOWNLINK
unsigned int rte_security_session_get_size(struct rte_security_ctx *instance)
int rte_security_dynfield_offset
__rte_experimental int __rte_security_set_pkt_metadata(struct rte_security_ctx *instance, struct rte_security_session *sess, struct rte_mbuf *m, void *params)
static __rte_experimental bool rte_security_dynfield_is_registered(void)
uint64_t rte_security_dynfield_t
__rte_experimental void * __rte_security_get_userdata(struct rte_security_ctx *instance, uint64_t md)
static __rte_experimental rte_security_dynfield_t * rte_security_dynfield(struct rte_mbuf *mbuf)
rte_security_pdcp_sn_size
@ RTE_SECURITY_PDCP_SN_SIZE_12
@ RTE_SECURITY_PDCP_SN_SIZE_18
@ RTE_SECURITY_PDCP_SN_SIZE_15
@ RTE_SECURITY_PDCP_SN_SIZE_7
@ RTE_SECURITY_PDCP_SN_SIZE_5
rte_security_ipsec_tunnel_type
@ RTE_SECURITY_IPSEC_TUNNEL_IPV6
@ RTE_SECURITY_IPSEC_TUNNEL_IPV4
struct rte_crypto_sym_op sym[0]
struct rte_security_session * sec_session
uint32_t replay_win_sz_max
enum rte_security_ipsec_sa_protocol proto
struct rte_security_capability::@371::@376 docsis
enum rte_security_session_action_type action
enum rte_security_ipsec_sa_direction direction
struct rte_security_capability::@371::@375 pdcp
struct rte_security_ipsec_sa_options options
struct rte_security_capability::@371::@374 macsec
struct rte_security_capability::@371::@373 ipsec
enum rte_security_pdcp_domain domain
enum rte_security_session_protocol protocol
enum rte_security_ipsec_sa_mode mode
enum rte_security_docsis_direction direction
const struct rte_cryptodev_capabilities * crypto_capabilities
const struct rte_security_ops * ops
uint64_t bytes_soft_limit
uint64_t bytes_hard_limit
uint64_t packets_soft_limit
uint64_t packets_hard_limit
uint32_t udp_ports_verify
uint32_t tunnel_hdr_verify
enum rte_security_ipsec_tunnel_type type
struct rte_security_ipsec_tunnel_param::@360::@363 ipv6
struct rte_security_ipsec_tunnel_param::@360::@362 ipv4
struct rte_crypto_sym_xform * crypto_xform
enum rte_security_session_action_type action_type
enum rte_security_session_protocol protocol