DPDK  23.03.0
rte_security_driver.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright 2017 NXP.
3  * Copyright(c) 2017 Intel Corporation.
4  */
5 
6 #ifndef _RTE_SECURITY_DRIVER_H_
7 #define _RTE_SECURITY_DRIVER_H_
8 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 #include <rte_compat.h>
21 #include "rte_security.h"
22 
27 struct rte_security_session {
28  RTE_MARKER cacheline0;
29  uint64_t opaque_data;
31  uint64_t fast_mdata;
33  rte_iova_t driver_priv_data_iova;
37  uint8_t driver_priv_data[0];
39 };
40 
44 #define SECURITY_GET_SESS_PRIV(s) \
45  ((void *)(((struct rte_security_session *)s)->driver_priv_data))
46 #define SECURITY_GET_SESS_PRIV_IOVA(s) \
47  (((struct rte_security_session *)s)->driver_priv_data_iova)
48 
61 typedef int (*security_session_create_t)(void *device,
62  struct rte_security_session_conf *conf,
63  struct rte_security_session *sess);
64 
71 typedef int (*security_session_destroy_t)(void *device,
72  struct rte_security_session *sess);
73 
86 typedef int (*security_session_update_t)(void *device,
87  struct rte_security_session *sess,
88  struct rte_security_session_conf *conf);
89 
102 typedef int (*security_macsec_sc_create_t)(void *device, struct rte_security_macsec_sc *conf);
103 
110 typedef int (*security_macsec_sc_destroy_t)(void *device, uint16_t sc_id);
111 
124 typedef int (*security_macsec_sa_create_t)(void *device, struct rte_security_macsec_sa *conf);
125 
132 typedef int (*security_macsec_sa_destroy_t)(void *device, uint16_t sa_id);
133 
143 typedef unsigned int (*security_session_get_size)(void *device);
144 
156 typedef int (*security_session_stats_get_t)(void *device,
157  struct rte_security_session *sess,
158  struct rte_security_stats *stats);
159 
171 typedef int (*security_macsec_sc_stats_get_t)(void *device, uint16_t sc_id,
172  struct rte_security_macsec_sc_stats *stats);
173 
185 typedef int (*security_macsec_sa_stats_get_t)(void *device, uint16_t sa_id,
186  struct rte_security_macsec_sa_stats *stats);
187 
188 
189 
190 __rte_internal
191 int rte_security_dynfield_register(void);
192 
205 typedef int (*security_set_pkt_metadata_t)(void *device,
206  struct rte_security_session *sess, struct rte_mbuf *mb,
207  void *params);
208 
218 typedef const struct rte_security_capability *(*security_capabilities_get_t)(
219  void *device);
220 
249 };
250 
251 #ifdef __cplusplus
252 }
253 #endif
254 
255 #endif /* _RTE_SECURITY_DRIVER_H_ */
security_macsec_sc_destroy_t macsec_sc_destroy
#define __rte_cache_min_aligned
Definition: rte_common.h:443
int(* security_session_update_t)(void *device, struct rte_security_session *sess, struct rte_security_session_conf *conf)
uint64_t rte_iova_t
Definition: rte_common.h:458
security_session_stats_get_t session_stats_get
const struct rte_security_capability *(* security_capabilities_get_t)(void *device)
security_macsec_sc_create_t macsec_sc_create
security_macsec_sa_destroy_t macsec_sa_destroy
int(* security_session_stats_get_t)(void *device, struct rte_security_session *sess, struct rte_security_stats *stats)
security_session_update_t session_update
security_capabilities_get_t capabilities_get
security_session_destroy_t session_destroy
int(* security_macsec_sa_create_t)(void *device, struct rte_security_macsec_sa *conf)
__extension__ typedef void * RTE_MARKER[0]
Definition: rte_common.h:464
int(* security_set_pkt_metadata_t)(void *device, struct rte_security_session *sess, struct rte_mbuf *mb, void *params)
security_session_create_t session_create
security_set_pkt_metadata_t set_pkt_metadata
security_macsec_sa_create_t macsec_sa_create
int(* security_macsec_sc_create_t)(void *device, struct rte_security_macsec_sc *conf)
int(* security_macsec_sc_stats_get_t)(void *device, uint16_t sc_id, struct rte_security_macsec_sc_stats *stats)
security_macsec_sc_stats_get_t macsec_sc_stats_get
int(* security_macsec_sa_stats_get_t)(void *device, uint16_t sa_id, struct rte_security_macsec_sa_stats *stats)
int(* security_session_create_t)(void *device, struct rte_security_session_conf *conf, struct rte_security_session *sess)
security_session_get_size session_get_size
int(* security_session_destroy_t)(void *device, struct rte_security_session *sess)
int(* security_macsec_sa_destroy_t)(void *device, uint16_t sa_id)
security_macsec_sa_stats_get_t macsec_sa_stats_get
int(* security_macsec_sc_destroy_t)(void *device, uint16_t sc_id)
unsigned int(* security_session_get_size)(void *device)