NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
ipsec_ctx.h File Reference
#include <doca_dev.h>
#include <doca_flow.h>
#include <dpdk_utils.h>
Include dependency graph for ipsec_ctx.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ipsec_security_gw_sa_attrs
 
struct  bad_syndrome_entry
 
struct  antireplay_state
 
struct  security_gateway_entry_info
 
struct  decrypt_rule
 
struct  ipsec_security_gw_ip4
 
struct  ipsec_security_gw_ip6
 
struct  encrypt_rule
 
struct  security_gateway_pipe_info
 
struct  encrypt_pipes
 
struct  decrypt_pipes
 
struct  switch_pipes
 
struct  ipsec_security_gw_rules
 
struct  ipsec_security_gw_dev_info
 
struct  ipsec_security_gw_doca_objects
 
struct  ipsec_security_gw_socket_ctx
 
struct  ipsec_security_gw_config
 

Macros

#define MAX_SOCKET_PATH_NAME   (108) /* Maximum socket file name length */
 
#define MAX_FILE_NAME   (255) /* Maximum file name length */
 
#define MAX_NB_RULES   (1048576) /* Maximal number of rules == 2^20 */
 
#define DYN_RESERVED_RULES   (1024) /* Reserved rules for dynamic rules */
 
#define MAX_KEY_LEN   (32) /* Maximal GCM key size is 256bit==32B */
 
#define NUM_OF_SYNDROMES   (4) /* Number of bad syndromes */
 
#define SW_WINDOW_SIZE   64 /* The size of the replay window when anti replay is done by SW */
 
#define HW_WINDOW_SIZE   128 /* The size of the replay window when anti replay is done by HW*/
 
#define MAX_NAME_LEN   (20) /* Max pipe and entry name length */
 
#define MAX_ACTIONS_MEM_SIZE   (8388608 * 64) /* 2^23 * size of max_entry */
 

Enumerations

enum  ipsec_security_gw_mode { IPSEC_SECURITY_GW_TUNNEL , IPSEC_SECURITY_GW_TRANSPORT , IPSEC_SECURITY_GW_UDP_TRANSPORT }
 
enum  ipsec_security_gw_flow_mode { IPSEC_SECURITY_GW_VNF , IPSEC_SECURITY_GW_SWITCH }
 
enum  ipsec_security_gw_esp_offload { IPSEC_SECURITY_GW_ESP_OFFLOAD_BOTH , IPSEC_SECURITY_GW_ESP_OFFLOAD_ENCAP , IPSEC_SECURITY_GW_ESP_OFFLOAD_DECAP , IPSEC_SECURITY_GW_ESP_OFFLOAD_NONE }
 
enum  ipsec_security_gw_perf { IPSEC_SECURITY_GW_PERF_NONE , IPSEC_SECURITY_GW_PERF_INSERTION_RATE , IPSEC_SECURITY_GW_PERF_BW , IPSEC_SECURITY_GW_PERF_BOTH }
 
enum  ipsec_security_gw_fwd_syndrome { IPSEC_SECURITY_GW_FWD_SYNDROME_DROP , IPSEC_SECURITY_GW_FWD_SYNDROME_RSS }
 

Functions

doca_error_t ipsec_security_gw_init_devices (struct ipsec_security_gw_config *app_cfg)
 
doca_error_t ipsec_security_gw_close_devices (const struct ipsec_security_gw_config *app_cfg)
 
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)
 
doca_error_t find_port_action_type_switch (int port_id, int *idx)
 

Macro Definition Documentation

◆ DYN_RESERVED_RULES

#define DYN_RESERVED_RULES   (1024) /* Reserved rules for dynamic rules */

Definition at line 41 of file ipsec_ctx.h.

◆ HW_WINDOW_SIZE

#define HW_WINDOW_SIZE   128 /* The size of the replay window when anti replay is done by HW*/

Definition at line 45 of file ipsec_ctx.h.

◆ MAX_ACTIONS_MEM_SIZE

#define MAX_ACTIONS_MEM_SIZE   (8388608 * 64) /* 2^23 * size of max_entry */

Definition at line 47 of file ipsec_ctx.h.

◆ MAX_FILE_NAME

#define MAX_FILE_NAME   (255) /* Maximum file name length */

Definition at line 39 of file ipsec_ctx.h.

◆ MAX_KEY_LEN

#define MAX_KEY_LEN   (32) /* Maximal GCM key size is 256bit==32B */

Definition at line 42 of file ipsec_ctx.h.

◆ MAX_NAME_LEN

#define MAX_NAME_LEN   (20) /* Max pipe and entry name length */

Definition at line 46 of file ipsec_ctx.h.

◆ MAX_NB_RULES

#define MAX_NB_RULES   (1048576) /* Maximal number of rules == 2^20 */

Definition at line 40 of file ipsec_ctx.h.

◆ MAX_SOCKET_PATH_NAME

#define MAX_SOCKET_PATH_NAME   (108) /* Maximum socket file name length */

Definition at line 38 of file ipsec_ctx.h.

◆ NUM_OF_SYNDROMES

#define NUM_OF_SYNDROMES   (4) /* Number of bad syndromes */

Definition at line 43 of file ipsec_ctx.h.

◆ SW_WINDOW_SIZE

#define SW_WINDOW_SIZE   64 /* The size of the replay window when anti replay is done by SW */

Definition at line 44 of file ipsec_ctx.h.

Enumeration Type Documentation

◆ ipsec_security_gw_esp_offload

Enumerator
IPSEC_SECURITY_GW_ESP_OFFLOAD_BOTH 
IPSEC_SECURITY_GW_ESP_OFFLOAD_ENCAP 
IPSEC_SECURITY_GW_ESP_OFFLOAD_DECAP 
IPSEC_SECURITY_GW_ESP_OFFLOAD_NONE 

Definition at line 192 of file ipsec_ctx.h.

◆ ipsec_security_gw_flow_mode

Enumerator
IPSEC_SECURITY_GW_VNF 
IPSEC_SECURITY_GW_SWITCH 

Definition at line 186 of file ipsec_ctx.h.

◆ ipsec_security_gw_fwd_syndrome

Enumerator
IPSEC_SECURITY_GW_FWD_SYNDROME_DROP 
IPSEC_SECURITY_GW_FWD_SYNDROME_RSS 

Definition at line 208 of file ipsec_ctx.h.

◆ ipsec_security_gw_mode

Enumerator
IPSEC_SECURITY_GW_TUNNEL 
IPSEC_SECURITY_GW_TRANSPORT 
IPSEC_SECURITY_GW_UDP_TRANSPORT 

Definition at line 179 of file ipsec_ctx.h.

◆ ipsec_security_gw_perf

Enumerator
IPSEC_SECURITY_GW_PERF_NONE 
IPSEC_SECURITY_GW_PERF_INSERTION_RATE 
IPSEC_SECURITY_GW_PERF_BW 
IPSEC_SECURITY_GW_PERF_BOTH 

Definition at line 200 of file ipsec_ctx.h.

Function Documentation

◆ find_port_action_type_switch()

doca_error_t find_port_action_type_switch ( int  port_id,
int *  idx 
)

Definition at line 43 of file ipsec_ctx.c.

◆ find_port_action_type_vnf()

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 at line 117 of file ipsec_ctx.c.

◆ ipsec_security_gw_close_devices()

doca_error_t ipsec_security_gw_close_devices ( const struct ipsec_security_gw_config app_cfg)

Definition at line 170 of file ipsec_ctx.c.

◆ ipsec_security_gw_init_devices()

doca_error_t ipsec_security_gw_init_devices ( struct ipsec_security_gw_config app_cfg)

Definition at line 221 of file ipsec_ctx.c.