DPDK  19.11.14
rte_ipsec.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2018 Intel Corporation
3  */
4 
5 #ifndef _RTE_IPSEC_H_
6 #define _RTE_IPSEC_H_
7 
21 #include <rte_ipsec_sa.h>
22 #include <rte_mbuf.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 struct rte_ipsec_session;
29 
40  uint16_t (*prepare)(const struct rte_ipsec_session *ss,
41  struct rte_mbuf *mb[],
42  struct rte_crypto_op *cop[],
43  uint16_t num);
44  uint16_t (*process)(const struct rte_ipsec_session *ss,
45  struct rte_mbuf *mb[],
46  uint16_t num);
47 };
48 
62  struct rte_ipsec_sa *sa;
66  union {
67  struct {
68  struct rte_cryptodev_sym_session *ses;
69  } crypto;
70  struct {
71  struct rte_security_session *ses;
72  struct rte_security_ctx *ctx;
73  uint32_t ol_flags;
74  } security;
75  };
77  struct rte_ipsec_sa_pkt_func pkt_func;
79 
91 __rte_experimental
92 int
94 
116 __rte_experimental
117 static inline uint16_t
119  struct rte_mbuf *mb[], struct rte_crypto_op *cop[], uint16_t num)
120 {
121  return ss->pkt_func.prepare(ss, mb, cop, num);
122 }
123 
147 __rte_experimental
148 static inline uint16_t
149 rte_ipsec_pkt_process(const struct rte_ipsec_session *ss, struct rte_mbuf *mb[],
150  uint16_t num)
151 {
152  return ss->pkt_func.process(ss, mb, num);
153 }
154 
155 #include <rte_ipsec_group.h>
156 
157 #ifdef __cplusplus
158 }
159 #endif
160 
161 #endif /* _RTE_IPSEC_H_ */
rte_security_session_action_type
Definition: rte_security.h:299
struct rte_ipsec_sa * sa
Definition: rte_ipsec.h:62
__rte_experimental int rte_ipsec_session_prepare(struct rte_ipsec_session *ss)
static __rte_experimental uint16_t rte_ipsec_pkt_crypto_prepare(const struct rte_ipsec_session *ss, struct rte_mbuf *mb[], struct rte_crypto_op *cop[], uint16_t num)
Definition: rte_ipsec.h:118
static __rte_experimental uint16_t rte_ipsec_pkt_process(const struct rte_ipsec_session *ss, struct rte_mbuf *mb[], uint16_t num)
Definition: rte_ipsec.h:149
#define __rte_cache_aligned
Definition: rte_common.h:322
struct rte_ipsec_sa_pkt_func pkt_func
Definition: rte_ipsec.h:77