NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
ipsec_ctx.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2023-2025 NVIDIA CORPORATION AND AFFILIATES. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without modification, are permitted
5  * provided that the following conditions are met:
6  * * Redistributions of source code must retain the above copyright notice, this list of
7  * conditions and the following disclaimer.
8  * * Redistributions in binary form must reproduce the above copyright notice, this list of
9  * conditions and the following disclaimer in the documentation and/or other materials
10  * provided with the distribution.
11  * * Neither the name of the NVIDIA CORPORATION nor the names of its contributors may be used
12  * to endorse or promote products derived from this software without specific prior written
13  * permission.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
16  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
17  * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE
18  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
19  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
20  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21  * STRICT LIABILITY, OR TOR (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23  *
24  */
25 
26 #ifndef IPSEC_CTX_H_
27 #define IPSEC_CTX_H_
28 
29 #include <doca_dev.h>
30 #include <doca_flow.h>
31 
32 #include <dpdk_utils.h>
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 #define MAX_SOCKET_PATH_NAME (108) /* Maximum socket file name length */
39 #define MAX_FILE_NAME (255) /* Maximum file name length */
40 #define MAX_NB_RULES (1048576) /* Maximal number of rules == 2^20 */
41 #define DYN_RESERVED_RULES (1024) /* Reserved rules for dynamic rules */
42 #define MAX_KEY_LEN (32) /* Maximal GCM key size is 256bit==32B */
43 #define NUM_OF_SYNDROMES (4) /* Number of bad syndromes */
44 #define SW_WINDOW_SIZE 64 /* The size of the replay window when anti replay is done by SW */
45 #define HW_WINDOW_SIZE 128 /* The size of the replay window when anti replay is done by HW*/
46 #define MAX_NAME_LEN (20) /* Max pipe and entry name length */
47 #define MAX_ACTIONS_MEM_SIZE (8388608 * 64) /* 2^23 * size of max_entry */
48 
49 /* SA attrs struct */
51  enum doca_flow_crypto_key_type key_type; /* Key type */
52  uint8_t enc_key_data[MAX_KEY_LEN]; /* Policy encryption key */
53  uint64_t iv; /* Policy IV */
54  uint32_t salt; /* Key Salt */
55  uint32_t lifetime_threshold; /* SA lifetime threshold */
56  bool esn_en; /* If extended sn is enable*/
57 };
58 
59 /* will hold an entry of a bad syndrome and its last counter */
61  struct doca_flow_pipe_entry *entry; /* DOCA Flow entry */
62  uint32_t previous_stats; /* last query stats */
63 };
64 
65 /* struct to hold antireplay state */
67  uint32_t window_size; /* antireplay window size */
68  uint32_t end_win_sn; /* end of window sequence number */
69  uint64_t bitmap; /* antireplay bitmap - LSB is with lowest sequence number */
70 };
71 
72 /* entry information struct */
74  char name[MAX_NAME_LEN + 1]; /* entry name */
75  struct doca_flow_pipe_entry *entry; /* entry pointer */
76  uint32_t prev_stats; /* prev stats */
77 };
78 
79 /* decryption rule struct */
80 struct decrypt_rule {
81  enum doca_flow_l3_type l3_type; /* IP type */
82  union {
83  doca_be32_t dst_ip4; /* destination IPv4 */
84  doca_be32_t dst_ip6[4]; /* destination IPv6 */
85  };
86  doca_be32_t esp_spi; /* ipsec session parameter index */
87  enum doca_flow_l3_type inner_l3_type; /* inner IP type */
88  struct ipsec_security_gw_sa_attrs sa_attrs; /* input SA attributes */
89  struct bad_syndrome_entry entries[NUM_OF_SYNDROMES]; /* array of bad syndrome entries */
90  struct antireplay_state antireplay_state; /* Antireplay state */
91 };
92 
93 /* IPv4 addresses struct */
95  doca_be32_t src_ip; /* source IPv4 */
96  doca_be32_t dst_ip; /* destination IPv4 */
97 };
98 
99 /* IPv6 addresses struct */
101  doca_be32_t src_ip[4]; /* source IPv6 */
102  doca_be32_t dst_ip[4]; /* destination IPv6 */
103 };
104 
105 /* encryption rule struct */
106 struct encrypt_rule {
107  enum doca_flow_l3_type l3_type; /* l3 type */
108  enum doca_flow_l4_type_ext protocol; /* protocol */
109  union {
110  struct ipsec_security_gw_ip4 ip4; /* IPv4 addresses */
111  struct ipsec_security_gw_ip6 ip6; /* IPv6 addresses */
112  };
113  int src_port; /* source port */
114  int dst_port; /* destination port */
115  enum doca_flow_l3_type encap_l3_type; /* encap l3 type */
116  union {
117  doca_be32_t encap_dst_ip4; /* encap destination IPv4 */
118  doca_be32_t encap_dst_ip6[4]; /* encap destination IPv6 */
119  };
120  doca_be32_t esp_spi; /* ipsec session parameter index */
121  uint32_t current_sn; /* current sequence number */
122  struct ipsec_security_gw_sa_attrs sa_attrs; /* input SA attributes */
123 };
124 
125 /* pipe information struct */
127  char name[MAX_NAME_LEN + 1]; /* pipe name */
128  struct doca_flow_pipe *pipe; /* pipe pointer */
129  uint32_t nb_entries; /* number of entries in pipe */
130  struct security_gateway_entry_info *entries_info; /* entries info array */
131 };
132 
133 /* all the pipes that is used for encrypt packets */
135  struct security_gateway_pipe_info encrypt_root; /* encrypt control pipe */
136  struct security_gateway_pipe_info egress_ip_classifier; /* egress IP classifier */
137  struct security_gateway_pipe_info ipv4_encrypt_pipe; /* encryption action pipe for ipv4 traffic */
138  struct security_gateway_pipe_info ipv6_encrypt_pipe; /* encryption action pipe for ipv6 traffic */
139  struct security_gateway_pipe_info ipv4_tcp_pipe; /* 5-tuple ipv4 tcp match pipe */
140  struct security_gateway_pipe_info ipv4_udp_pipe; /* 5-tuple ipv4 udp match pipe */
141  struct security_gateway_pipe_info ipv6_tcp_pipe; /* 5-tuple ipv6 tcp match pipe */
142  struct security_gateway_pipe_info ipv6_udp_pipe; /* 5-tuple ipv6 udp match pipe */
143  struct security_gateway_pipe_info ipv6_src_tcp_pipe; /* src ipv6 tcp match pipe */
144  struct security_gateway_pipe_info ipv6_src_udp_pipe; /* src ipv6 udp match pipe */
145  struct security_gateway_pipe_info vxlan_encap_pipe; /* vxlan encap pipe */
146  struct security_gateway_pipe_info marker_insert_pipe; /* insert non-ESP marker pipe */
147 };
148 
149 /* all the pipes that is used for decrypt packets */
151  struct security_gateway_pipe_info decrypt_root; /* decrypt control pipe */
152  struct security_gateway_pipe_info marker_remove_pipe; /* remove non-ESP marker pipe */
153  struct security_gateway_pipe_info decrypt_ipv4_pipe; /* decrypt ipv4 pipe */
154  struct security_gateway_pipe_info decrypt_ipv6_pipe; /* decrypt ipv6 pipe */
155  struct security_gateway_pipe_info decap_pipe; /* decap ESP header pipe */
156  struct security_gateway_pipe_info bad_syndrome_pipe; /* match on ipsec bad syndrome */
157  struct security_gateway_pipe_info vxlan_decap_ipv4_pipe; /* decap vxlan tunnel inner ipv4 pipe */
158  struct security_gateway_pipe_info vxlan_decap_ipv6_pipe; /* decap vxlan tunnel inner ipv6 pipe */
159 };
160 
161 /* all the pipes that is ued for switch mode */
162 struct switch_pipes {
163  struct security_gateway_pipe_info rss_pipe; /* RSS pipe */
164  struct security_gateway_pipe_info pkt_meta_pipe; /* packet meta */
165 };
166 
167 /* Application rules arrays {encryption, decryption}*/
169  struct encrypt_rule *encrypt_rules; /* Encryption rules array */
170  struct decrypt_rule *decrypt_rules; /* Decryption rules array */
171  int nb_encrypt_rules; /* Number of encryption rules in array */
172  int nb_decrypt_rules; /* Number of decryption rules in array */
173  int nb_rules; /* Total number of rules, will be used to indicate
174  * which crypto index is the next one.
175  */
176 };
177 
178 /* IPsec Security Gateway modes */
180  IPSEC_SECURITY_GW_TUNNEL, /* ipsec tunnel mode */
181  IPSEC_SECURITY_GW_TRANSPORT, /* ipsec transport mode */
182  IPSEC_SECURITY_GW_UDP_TRANSPORT, /* ipsec transport mode over UDP */
183 };
184 
185 /* IPsec Security Gateway flow modes */
187  IPSEC_SECURITY_GW_VNF, /* DOCA Flow vnf mode */
188  IPSEC_SECURITY_GW_SWITCH, /* DOCA Flow switch mode */
189 };
190 
191 /* IPsec Security Gateway ESP offload */
193  IPSEC_SECURITY_GW_ESP_OFFLOAD_BOTH, /* HW offload for both encap and decap */
194  IPSEC_SECURITY_GW_ESP_OFFLOAD_ENCAP, /* HW offload for encap, decap in SW */
195  IPSEC_SECURITY_GW_ESP_OFFLOAD_DECAP, /* HW offload for decap, encap in SW */
196  IPSEC_SECURITY_GW_ESP_OFFLOAD_NONE, /* encap and decap both done in SW */
197 };
198 
199 /* IPsec Security Gateway perf mode */
201  IPSEC_SECURITY_GW_PERF_NONE, /* avoid any performance measurement */
202  IPSEC_SECURITY_GW_PERF_INSERTION_RATE, /* print insertion rate results */
203  IPSEC_SECURITY_GW_PERF_BW, /* optimize the pipeline for bandwidth measure */
204  IPSEC_SECURITY_GW_PERF_BOTH, /* both insertion rate measure and bw optimize */
205 };
206 
207 /* IPsec Security Gateway forward bad syndrome type */
209  IPSEC_SECURITY_GW_FWD_SYNDROME_DROP, /* drop bad syndrome packets */
210  IPSEC_SECURITY_GW_FWD_SYNDROME_RSS, /* forward bad syndrome packets to app */
211 };
212 
213 /* IPsec Security Gateway device information */
215  char pci_addr[DOCA_DEVINFO_PCI_ADDR_SIZE]; /* PCI address */
216  char iface_name[DOCA_DEVINFO_IFACE_NAME_SIZE]; /* interface name */
217  bool open_by_pci; /* true if user sent PCI address */
218  bool open_by_name; /* true if user sent interface name */
219  struct doca_dev *doca_dev; /* DOCA device */
220  bool has_device; /* true if the user sent PCI address or interface name */
221 };
222 
223 /* IPsec Security Gateway DOCA objects */
225  struct ipsec_security_gw_dev_info secured_dev; /* DOCA device for secured network */
226  struct ipsec_security_gw_dev_info unsecured_dev; /* DOCA device for unsecured network */
227 };
228 
229 /* IPsec Security Gateway DOCA socket context */
231  int fd; /* Socket file descriptor */
232  int connfd; /* Connection file descriptor */
233  char socket_path[MAX_SOCKET_PATH_NAME]; /* Socket file path */
234  bool socket_conf; /* If IPC mode is enabled */
235 };
236 
237 /* IPsec Security Gateway configuration structure */
239  bool sw_sn_inc_enable; /* true for doing sn increment in software */
240  bool sw_antireplay; /* true for doing anti-replay in software */
241  bool debug_mode; /* run in debug mode */
242  bool vxlan_encap; /* True for vxlan encap / decap */
243  bool marker_encap; /* insert/remove non-ESP marker header */
244  enum ipsec_security_gw_mode mode; /* application mode */
245  enum ipsec_security_gw_flow_mode flow_mode; /* DOCA Flow mode */
246  enum ipsec_security_gw_esp_offload offload; /* ESP offload */
247  enum ipsec_security_gw_perf perf_measurement; /* performance measurement mode */
248  enum ipsec_security_gw_fwd_syndrome syndrome_fwd; /* fwd type for bad syndrome packets */
249  uint64_t sn_initial; /* set the initial sequence number */
250  char json_path[MAX_FILE_NAME]; /* Path to the JSON file with rules */
251  struct rte_hash *ip6_table; /* IPV6 addresses hash table */
252  struct application_dpdk_config *dpdk_config; /* DPDK configuration struct */
253  struct decrypt_pipes decrypt_pipes; /* Decryption DOCA flow pipes */
254  struct encrypt_pipes encrypt_pipes; /* Encryption DOCA flow pipes */
255  struct switch_pipes switch_pipes; /* Encryption DOCA flow pipes */
256  struct ipsec_security_gw_rules app_rules; /* Application encryption/decryption rules */
257  struct ipsec_security_gw_doca_objects objects; /* Application DOCA objects */
258  struct ipsec_security_gw_socket_ctx socket_ctx; /* Application DOCA socket context */
259  uint8_t nb_cores; /* number of cores to DPDK -l flag */
260  uint32_t vni; /* vni to use when vxlan encap is true */
261  enum doca_flow_crypto_icv_len icv_length; /* Supported icv (Integrity Check Value) length */
264 };
265 
266 /*
267  * Open DOCA devices according to the pci-address input and probe dpdk ports
268  *
269  * @app_cfg [in/out]: application configuration structure
270  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
271  */
273 
274 /*
275  * Close DOCA devices
276  *
277  * @app_cfg [in]: application configuration structure
278  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
279  */
281 
282 /*
283  * Get dpdk port ID and check if its encryption port or decryption, based on
284  * user PCI input and DOCA device devinfo
285  *
286  * @app_cfg [in]: application configuration structure
287  * @port_id [in]: port ID
288  * @connected_dev [in]: doca device that connected to this port id
289  * @idx [out]: index for ports array - 0 for secured network index and 1 for unsecured
290  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
291  */
293  int port_id,
294  struct doca_dev **connected_dev,
295  int *idx);
296 
297 /*
298  * Get dpdk port ID and check if its encryption port or decryption, by checking if the port is representor
299  * representor port is the unsecured port
300  *
301  * @port_id [in]: port ID
302  * @idx [out]: index for ports array - 0 for secured network index and 1 for unsecured
303  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
304  */
306 
307 #ifdef __cplusplus
308 } /* extern "C" */
309 #endif
310 
311 #endif /* IPSEC_CTX_H_ */
static struct app_gpu_cfg app_cfg
#define DOCA_DEVINFO_IFACE_NAME_SIZE
Buffer size to hold network interface name. Including a null terminator.
Definition: doca_dev.h:305
#define DOCA_DEVINFO_PCI_ADDR_SIZE
Buffer size to hold PCI BDF format: "XXXX:XX:XX.X". Including a null terminator.
Definition: doca_dev.h:313
enum doca_error doca_error_t
DOCA API return codes.
doca_flow_crypto_icv_len
doca flow crypto ICV length
doca_flow_crypto_key_type
doca flow crypto key type
doca_flow_l4_type_ext
doca flow layer 4 packet extend type
doca_flow_l3_type
doca flow layer 3 packet type
uint32_t doca_be32_t
Definition: doca_types.h:121
doca_error_t ipsec_security_gw_init_devices(struct ipsec_security_gw_config *app_cfg)
Definition: ipsec_ctx.c:221
ipsec_security_gw_fwd_syndrome
Definition: ipsec_ctx.h:208
@ IPSEC_SECURITY_GW_FWD_SYNDROME_DROP
Definition: ipsec_ctx.h:209
@ IPSEC_SECURITY_GW_FWD_SYNDROME_RSS
Definition: ipsec_ctx.h:210
ipsec_security_gw_mode
Definition: ipsec_ctx.h:179
@ IPSEC_SECURITY_GW_UDP_TRANSPORT
Definition: ipsec_ctx.h:182
@ IPSEC_SECURITY_GW_TUNNEL
Definition: ipsec_ctx.h:180
@ IPSEC_SECURITY_GW_TRANSPORT
Definition: ipsec_ctx.h:181
doca_error_t find_port_action_type_vnf(const struct ipsec_security_gw_config *app_cfg, int port_id, struct doca_dev **connected_dev, int *idx)
Definition: ipsec_ctx.c:117
doca_error_t find_port_action_type_switch(int port_id, int *idx)
Definition: ipsec_ctx.c:43
#define NUM_OF_SYNDROMES
Definition: ipsec_ctx.h:43
ipsec_security_gw_flow_mode
Definition: ipsec_ctx.h:186
@ IPSEC_SECURITY_GW_VNF
Definition: ipsec_ctx.h:187
@ IPSEC_SECURITY_GW_SWITCH
Definition: ipsec_ctx.h:188
ipsec_security_gw_esp_offload
Definition: ipsec_ctx.h:192
@ IPSEC_SECURITY_GW_ESP_OFFLOAD_ENCAP
Definition: ipsec_ctx.h:194
@ IPSEC_SECURITY_GW_ESP_OFFLOAD_DECAP
Definition: ipsec_ctx.h:195
@ IPSEC_SECURITY_GW_ESP_OFFLOAD_BOTH
Definition: ipsec_ctx.h:193
@ IPSEC_SECURITY_GW_ESP_OFFLOAD_NONE
Definition: ipsec_ctx.h:196
ipsec_security_gw_perf
Definition: ipsec_ctx.h:200
@ IPSEC_SECURITY_GW_PERF_NONE
Definition: ipsec_ctx.h:201
@ IPSEC_SECURITY_GW_PERF_BW
Definition: ipsec_ctx.h:203
@ IPSEC_SECURITY_GW_PERF_BOTH
Definition: ipsec_ctx.h:204
@ IPSEC_SECURITY_GW_PERF_INSERTION_RATE
Definition: ipsec_ctx.h:202
#define MAX_KEY_LEN
Definition: ipsec_ctx.h:42
#define MAX_SOCKET_PATH_NAME
Definition: ipsec_ctx.h:38
#define MAX_FILE_NAME
Definition: ipsec_ctx.h:39
doca_error_t ipsec_security_gw_close_devices(const struct ipsec_security_gw_config *app_cfg)
Definition: ipsec_ctx.c:170
#define MAX_NAME_LEN
Definition: ipsec_ctx.h:46
uint64_t bitmap
Definition: ipsec_ctx.h:69
uint32_t window_size
Definition: ipsec_ctx.h:67
uint32_t end_win_sn
Definition: ipsec_ctx.h:68
Definition: ipsec_ctx.h:60
uint32_t previous_stats
Definition: ipsec_ctx.h:62
struct doca_flow_pipe_entry * entry
Definition: ipsec_ctx.h:61
struct security_gateway_pipe_info decrypt_ipv4_pipe
Definition: ipsec_ctx.h:153
struct security_gateway_pipe_info vxlan_decap_ipv6_pipe
Definition: ipsec_ctx.h:158
struct security_gateway_pipe_info marker_remove_pipe
Definition: ipsec_ctx.h:152
struct security_gateway_pipe_info decrypt_ipv6_pipe
Definition: ipsec_ctx.h:154
struct security_gateway_pipe_info decrypt_root
Definition: ipsec_ctx.h:151
struct security_gateway_pipe_info bad_syndrome_pipe
Definition: ipsec_ctx.h:156
struct security_gateway_pipe_info decap_pipe
Definition: ipsec_ctx.h:155
struct security_gateway_pipe_info vxlan_decap_ipv4_pipe
Definition: ipsec_ctx.h:157
enum doca_flow_l3_type inner_l3_type
Definition: ipsec_ctx.h:87
doca_be32_t dst_ip6[4]
Definition: ipsec_ctx.h:84
doca_be32_t esp_spi
Definition: ipsec_ctx.h:86
doca_be32_t dst_ip4
Definition: ipsec_ctx.h:83
enum doca_flow_l3_type l3_type
Definition: ipsec_ctx.h:81
struct ipsec_security_gw_sa_attrs sa_attrs
Definition: ipsec_ctx.h:88
struct bad_syndrome_entry entries[NUM_OF_SYNDROMES]
Definition: ipsec_ctx.h:89
struct security_gateway_pipe_info ipv4_encrypt_pipe
Definition: ipsec_ctx.h:137
struct security_gateway_pipe_info ipv6_tcp_pipe
Definition: ipsec_ctx.h:141
struct security_gateway_pipe_info ipv6_src_udp_pipe
Definition: ipsec_ctx.h:144
struct security_gateway_pipe_info ipv4_udp_pipe
Definition: ipsec_ctx.h:140
struct security_gateway_pipe_info encrypt_root
Definition: ipsec_ctx.h:135
struct security_gateway_pipe_info egress_ip_classifier
Definition: ipsec_ctx.h:136
struct security_gateway_pipe_info marker_insert_pipe
Definition: ipsec_ctx.h:146
struct security_gateway_pipe_info ipv6_udp_pipe
Definition: ipsec_ctx.h:142
struct security_gateway_pipe_info vxlan_encap_pipe
Definition: ipsec_ctx.h:145
struct security_gateway_pipe_info ipv6_src_tcp_pipe
Definition: ipsec_ctx.h:143
struct security_gateway_pipe_info ipv6_encrypt_pipe
Definition: ipsec_ctx.h:138
struct security_gateway_pipe_info ipv4_tcp_pipe
Definition: ipsec_ctx.h:139
enum doca_flow_l4_type_ext protocol
Definition: ipsec_ctx.h:108
struct ipsec_security_gw_sa_attrs sa_attrs
Definition: ipsec_ctx.h:122
uint32_t current_sn
Definition: ipsec_ctx.h:121
doca_be32_t encap_dst_ip4
Definition: ipsec_ctx.h:117
struct ipsec_security_gw_ip6 ip6
Definition: ipsec_ctx.h:111
doca_be32_t esp_spi
Definition: ipsec_ctx.h:120
enum doca_flow_l3_type encap_l3_type
Definition: ipsec_ctx.h:115
doca_be32_t encap_dst_ip6[4]
Definition: ipsec_ctx.h:118
struct ipsec_security_gw_ip4 ip4
Definition: ipsec_ctx.h:110
enum doca_flow_l3_type l3_type
Definition: ipsec_ctx.h:107
user context struct that will be used in entries process callback
Definition: flow_common.h:78
enum ipsec_security_gw_mode mode
Definition: ipsec_ctx.h:244
enum ipsec_security_gw_flow_mode flow_mode
Definition: ipsec_ctx.h:245
struct ipsec_security_gw_rules app_rules
Definition: ipsec_ctx.h:256
struct ipsec_security_gw_socket_ctx socket_ctx
Definition: ipsec_ctx.h:258
enum ipsec_security_gw_fwd_syndrome syndrome_fwd
Definition: ipsec_ctx.h:248
struct application_dpdk_config * dpdk_config
Definition: ipsec_ctx.h:252
enum doca_flow_crypto_icv_len icv_length
Definition: ipsec_ctx.h:261
char json_path[MAX_FILE_NAME]
Definition: ipsec_ctx.h:250
struct rte_hash * ip6_table
Definition: ipsec_ctx.h:251
enum ipsec_security_gw_perf perf_measurement
Definition: ipsec_ctx.h:247
enum ipsec_security_gw_esp_offload offload
Definition: ipsec_ctx.h:246
struct entries_status * secured_status
Definition: ipsec_ctx.h:262
struct entries_status * unsecured_status
Definition: ipsec_ctx.h:263
struct ipsec_security_gw_doca_objects objects
Definition: ipsec_ctx.h:257
struct doca_dev * doca_dev
Definition: ipsec_ctx.h:219
char pci_addr[DOCA_DEVINFO_PCI_ADDR_SIZE]
Definition: ipsec_ctx.h:215
char iface_name[DOCA_DEVINFO_IFACE_NAME_SIZE]
Definition: ipsec_ctx.h:216
struct ipsec_security_gw_dev_info unsecured_dev
Definition: ipsec_ctx.h:226
struct ipsec_security_gw_dev_info secured_dev
Definition: ipsec_ctx.h:225
doca_be32_t dst_ip
Definition: ipsec_ctx.h:96
doca_be32_t src_ip
Definition: ipsec_ctx.h:95
doca_be32_t src_ip[4]
Definition: ipsec_ctx.h:101
doca_be32_t dst_ip[4]
Definition: ipsec_ctx.h:102
struct decrypt_rule * decrypt_rules
Definition: ipsec_ctx.h:170
struct encrypt_rule * encrypt_rules
Definition: ipsec_ctx.h:169
uint8_t enc_key_data[MAX_KEY_LEN]
Definition: ipsec_ctx.h:52
enum doca_flow_crypto_key_type key_type
Definition: ipsec_ctx.h:51
char socket_path[MAX_SOCKET_PATH_NAME]
Definition: ipsec_ctx.h:233
Definition: ipsec_ctx.h:73
char name[MAX_NAME_LEN+1]
Definition: ipsec_ctx.h:74
struct doca_flow_pipe_entry * entry
Definition: ipsec_ctx.h:75
uint32_t prev_stats
Definition: ipsec_ctx.h:76
struct doca_flow_pipe * pipe
Definition: ipsec_ctx.h:128
char name[MAX_NAME_LEN+1]
Definition: ipsec_ctx.h:127
struct security_gateway_entry_info * entries_info
Definition: ipsec_ctx.h:130
struct security_gateway_pipe_info pkt_meta_pipe
Definition: ipsec_ctx.h:164
struct security_gateway_pipe_info rss_pipe
Definition: ipsec_ctx.h:163