DPDK 22.11.5
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
17extern "C" {
18#endif
19
20#include <rte_compat.h>
21#include "rte_security.h"
22
27struct 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
61typedef int (*security_session_create_t)(void *device,
62 struct rte_security_session_conf *conf,
63 struct rte_security_session *sess);
64
71typedef int (*security_session_destroy_t)(void *device,
72 struct rte_security_session *sess);
73
86typedef int (*security_session_update_t)(void *device,
87 struct rte_security_session *sess,
88 struct rte_security_session_conf *conf);
89
102typedef int (*security_macsec_sc_create_t)(void *device, struct rte_security_macsec_sc *conf);
103
110typedef int (*security_macsec_sc_destroy_t)(void *device, uint16_t sc_id);
111
124typedef int (*security_macsec_sa_create_t)(void *device, struct rte_security_macsec_sa *conf);
125
132typedef int (*security_macsec_sa_destroy_t)(void *device, uint16_t sa_id);
133
143typedef unsigned int (*security_session_get_size)(void *device);
144
156typedef int (*security_session_stats_get_t)(void *device,
157 struct rte_security_session *sess,
158 struct rte_security_stats *stats);
159
171typedef int (*security_macsec_sc_stats_get_t)(void *device, uint16_t sc_id,
172 struct rte_security_macsec_sc_stats *stats);
173
185typedef 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
191int rte_security_dynfield_register(void);
192
205typedef int (*security_set_pkt_metadata_t)(void *device,
206 struct rte_security_session *sess, struct rte_mbuf *mb,
207 void *params);
208
218typedef 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_ */
#define __rte_cache_min_aligned
Definition: rte_common.h:443
uint64_t rte_iova_t
Definition: rte_common.h:458
__extension__ typedef void * RTE_MARKER[0]
Definition: rte_common.h:464
int(* security_macsec_sc_stats_get_t)(void *device, uint16_t sc_id, struct rte_security_macsec_sc_stats *stats)
int(* security_session_update_t)(void *device, struct rte_security_session *sess, struct rte_security_session_conf *conf)
int(* security_session_stats_get_t)(void *device, struct rte_security_session *sess, struct rte_security_stats *stats)
int(* security_macsec_sc_destroy_t)(void *device, uint16_t sc_id)
int(* security_macsec_sa_destroy_t)(void *device, uint16_t sa_id)
int(* security_macsec_sa_stats_get_t)(void *device, uint16_t sa_id, struct rte_security_macsec_sa_stats *stats)
unsigned int(* security_session_get_size)(void *device)
int(* security_macsec_sa_create_t)(void *device, struct rte_security_macsec_sa *conf)
const struct rte_security_capability *(* security_capabilities_get_t)(void *device)
int(* security_session_create_t)(void *device, struct rte_security_session_conf *conf, struct rte_security_session *sess)
int(* security_set_pkt_metadata_t)(void *device, struct rte_security_session *sess, struct rte_mbuf *mb, void *params)
int(* security_session_destroy_t)(void *device, struct rte_security_session *sess)
int(* security_macsec_sc_create_t)(void *device, struct rte_security_macsec_sc *conf)
security_session_destroy_t session_destroy
security_macsec_sc_stats_get_t macsec_sc_stats_get
security_macsec_sc_destroy_t macsec_sc_destroy
security_macsec_sa_stats_get_t macsec_sa_stats_get
security_macsec_sc_create_t macsec_sc_create
security_macsec_sa_create_t macsec_sa_create
security_session_update_t session_update
security_session_create_t session_create
security_set_pkt_metadata_t set_pkt_metadata
security_session_get_size session_get_size
security_session_stats_get_t session_stats_get
security_macsec_sa_destroy_t macsec_sa_destroy
security_capabilities_get_t capabilities_get