DPDK  23.07.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 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 #include <rte_compat.h>
20 #include "rte_security.h"
21 
26 struct rte_security_session {
27  RTE_MARKER cacheline0;
28  uint64_t opaque_data;
30  uint64_t fast_mdata;
32  rte_iova_t driver_priv_data_iova;
36  uint8_t driver_priv_data[0];
38 };
39 
43 #define SECURITY_GET_SESS_PRIV(s) \
44  ((void *)(((struct rte_security_session *)s)->driver_priv_data))
45 #define SECURITY_GET_SESS_PRIV_IOVA(s) \
46  (((struct rte_security_session *)s)->driver_priv_data_iova)
47 
60 typedef int (*security_session_create_t)(void *device,
61  struct rte_security_session_conf *conf,
62  struct rte_security_session *sess);
63 
70 typedef int (*security_session_destroy_t)(void *device,
71  struct rte_security_session *sess);
72 
85 typedef int (*security_session_update_t)(void *device,
86  struct rte_security_session *sess,
87  struct rte_security_session_conf *conf);
88 
101 typedef int (*security_macsec_sc_create_t)(void *device, struct rte_security_macsec_sc *conf);
102 
110 typedef int (*security_macsec_sc_destroy_t)(void *device, uint16_t sc_id,
112 
125 typedef int (*security_macsec_sa_create_t)(void *device, struct rte_security_macsec_sa *conf);
126 
134 typedef int (*security_macsec_sa_destroy_t)(void *device, uint16_t sa_id,
136 
146 typedef unsigned int (*security_session_get_size)(void *device);
147 
159 typedef int (*security_session_stats_get_t)(void *device,
160  struct rte_security_session *sess,
161  struct rte_security_stats *stats);
162 
175 typedef int (*security_macsec_sc_stats_get_t)(void *device, uint16_t sc_id,
177  struct rte_security_macsec_sc_stats *stats);
178 
191 typedef int (*security_macsec_sa_stats_get_t)(void *device, uint16_t sa_id,
193  struct rte_security_macsec_sa_stats *stats);
194 
195 
196 
197 __rte_internal
198 int rte_security_dynfield_register(void);
199 
212 typedef int (*security_set_pkt_metadata_t)(void *device,
213  struct rte_security_session *sess, struct rte_mbuf *mb,
214  void *params);
215 
225 typedef const struct rte_security_capability *(*security_capabilities_get_t)(
226  void *device);
227 
256 };
257 
258 #ifdef __cplusplus
259 }
260 #endif
261 
262 #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
enum rte_security_macsec_direction dir
Definition: rte_security.h:377
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)
int(* security_macsec_sa_stats_get_t)(void *device, uint16_t sa_id, enum rte_security_macsec_direction dir, struct rte_security_macsec_sa_stats *stats)
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_destroy_t)(void *device, uint16_t sc_id, enum rte_security_macsec_direction dir)
rte_security_macsec_direction
Definition: rte_security.h:360
security_macsec_sc_stats_get_t macsec_sc_stats_get
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, enum rte_security_macsec_direction dir)
security_macsec_sa_stats_get_t macsec_sa_stats_get
int(* security_macsec_sc_stats_get_t)(void *device, uint16_t sc_id, enum rte_security_macsec_direction dir, struct rte_security_macsec_sc_stats *stats)
enum rte_security_macsec_direction dir
Definition: rte_security.h:400
unsigned int(* security_session_get_size)(void *device)