DPDK  19.11.1
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 
17 #include <rte_ipsec_sa.h>
18 #include <rte_mbuf.h>
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 struct rte_ipsec_session;
25 
36  uint16_t (*prepare)(const struct rte_ipsec_session *ss,
37  struct rte_mbuf *mb[],
38  struct rte_crypto_op *cop[],
39  uint16_t num);
40  uint16_t (*process)(const struct rte_ipsec_session *ss,
41  struct rte_mbuf *mb[],
42  uint16_t num);
43 };
44 
58  struct rte_ipsec_sa *sa;
62  union {
63  struct {
64  struct rte_cryptodev_sym_session *ses;
65  } crypto;
66  struct {
67  struct rte_security_session *ses;
68  struct rte_security_ctx *ctx;
69  uint32_t ol_flags;
70  } security;
71  };
75 
87 __rte_experimental
88 int
90 
112 __rte_experimental
113 static inline uint16_t
115  struct rte_mbuf *mb[], struct rte_crypto_op *cop[], uint16_t num)
116 {
117  return ss->pkt_func.prepare(ss, mb, cop, num);
118 }
119 
143 __rte_experimental
144 static inline uint16_t
145 rte_ipsec_pkt_process(const struct rte_ipsec_session *ss, struct rte_mbuf *mb[],
146  uint16_t num)
147 {
148  return ss->pkt_func.process(ss, mb, num);
149 }
150 
151 #include <rte_ipsec_group.h>
152 
153 #ifdef __cplusplus
154 }
155 #endif
156 
157 #endif /* _RTE_IPSEC_H_ */
rte_security_session_action_type
Definition: rte_security.h:299
struct rte_ipsec_sa * sa
Definition: rte_ipsec.h:58
__rte_experimental int rte_ipsec_session_prepare(struct rte_ipsec_session *ss)
enum rte_security_session_action_type type
Definition: rte_ipsec.h:60
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:114
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:145
#define __rte_cache_aligned
Definition: rte_common.h:329
struct rte_ipsec_sa_pkt_func pkt_func
Definition: rte_ipsec.h:73