NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
flow_common.c File Reference
#include <stdlib.h>
#include <rte_ethdev.h>
#include <doca_log.h>
#include <doca_flow.h>
#include <doca_flow_tune_server.h>
#include <doca_bitfield.h>
#include "utils.h"
#include "flow_common.h"
#include "flow_decrypt.h"
#include "flow_encrypt.h"
Include dependency graph for flow_common.c:

Go to the source code of this file.

Functions

 DOCA_LOG_REGISTER (IPSEC_SECURITY_GW::flow_common)
 
static void check_for_valid_entry (struct doca_flow_pipe_entry *entry, uint16_t pipe_queue, enum doca_flow_entry_status status, enum doca_flow_entry_op op, void *user_ctx)
 
doca_error_t process_entries (struct doca_flow_port *port, struct entries_status *status, int timeout, uint16_t pipe_queue)
 
static doca_error_t create_doca_flow_port (int port_id, struct doca_dev *dev, bool sn_offload_disable, struct doca_flow_port **port)
 
doca_error_t ipsec_security_gw_init_doca_flow (const struct ipsec_security_gw_config *app_cfg, int nb_queues, struct ipsec_security_gw_ports_map *ports[])
 
doca_error_t ipsec_security_gw_init_status (struct ipsec_security_gw_config *app_cfg, int nb_queues)
 
doca_error_t ipsec_security_gw_bind (struct ipsec_security_gw_ports_map *ports[], struct ipsec_security_gw_config *app_cfg)
 
void doca_flow_cleanup (int nb_ports, struct ipsec_security_gw_ports_map *ports[])
 
uint32_t get_icv_len_int (enum doca_flow_crypto_icv_len icv_len)
 
doca_error_t create_rss_pipe (struct ipsec_security_gw_config *app_cfg, struct doca_flow_port *port, uint16_t nb_queues, struct doca_flow_pipe **rss_pipe)
 
void create_hairpin_pipe_fwd (struct ipsec_security_gw_config *app_cfg, int port_id, bool encrypt, uint16_t *rss_queues, uint32_t rss_flags, struct doca_flow_fwd *fwd)
 
static doca_error_t create_switch_port_meta_pipe (struct doca_flow_pipe **pipe)
 
static doca_error_t add_switch_port_meta_entries (struct ipsec_security_gw_ports_map *ports[], struct doca_flow_pipe *encrypt_root, struct doca_flow_pipe *decrypt_root, struct doca_flow_pipe *pipe, struct ipsec_security_gw_config *app_cfg)
 
static doca_error_t create_switch_pkt_meta_pipe (struct doca_flow_pipe **pipe)
 
static doca_error_t add_switch_pkt_meta_entries (struct ipsec_security_gw_ports_map *ports[], struct doca_flow_pipe *encrypt_pipe, struct doca_flow_pipe *pipe, struct ipsec_security_gw_config *app_cfg)
 
doca_error_t create_switch_ingress_root_pipes (struct ipsec_security_gw_ports_map *ports[], struct ipsec_security_gw_config *app_cfg)
 
doca_error_t create_switch_egress_root_pipes (struct ipsec_security_gw_ports_map *ports[], struct ipsec_security_gw_config *app_cfg)
 
void remove_ethernet_padding (struct rte_mbuf **m)
 
static void security_gateway_free_encrypt_resources (struct encrypt_pipes *encrypt_pipes)
 
static void security_gateway_free_decrypt_resources (struct decrypt_pipes *decrypt_pipes)
 
void security_gateway_free_status_entries (struct ipsec_security_gw_config *app_cfg)
 
void security_gateway_free_resources (struct ipsec_security_gw_config *app_cfg)
 

Function Documentation

◆ add_switch_pkt_meta_entries()

static doca_error_t add_switch_pkt_meta_entries ( struct ipsec_security_gw_ports_map ports[],
struct doca_flow_pipe *  encrypt_pipe,
struct doca_flow_pipe *  pipe,
struct ipsec_security_gw_config app_cfg 
)
static

Definition at line 752 of file flow_common.c.

◆ add_switch_port_meta_entries()

static doca_error_t add_switch_port_meta_entries ( struct ipsec_security_gw_ports_map ports[],
struct doca_flow_pipe *  encrypt_root,
struct doca_flow_pipe *  decrypt_root,
struct doca_flow_pipe *  pipe,
struct ipsec_security_gw_config app_cfg 
)
static

Definition at line 615 of file flow_common.c.

◆ check_for_valid_entry()

static void check_for_valid_entry ( struct doca_flow_pipe_entry *  entry,
uint16_t  pipe_queue,
enum doca_flow_entry_status  status,
enum doca_flow_entry_op  op,
void *  user_ctx 
)
static

Definition at line 50 of file flow_common.c.

◆ create_doca_flow_port()

static doca_error_t create_doca_flow_port ( int  port_id,
struct doca_dev *  dev,
bool  sn_offload_disable,
struct doca_flow_port **  port 
)
static

Definition at line 106 of file flow_common.c.

◆ create_hairpin_pipe_fwd()

void create_hairpin_pipe_fwd ( struct ipsec_security_gw_config app_cfg,
int  port_id,
bool  encrypt,
uint16_t *  rss_queues,
uint32_t  rss_flags,
struct doca_flow_fwd fwd 
)

Definition at line 512 of file flow_common.c.

◆ create_rss_pipe()

doca_error_t create_rss_pipe ( struct ipsec_security_gw_config app_cfg,
struct doca_flow_port *  port,
uint16_t  nb_queues,
struct doca_flow_pipe **  rss_pipe 
)

Definition at line 384 of file flow_common.c.

◆ create_switch_egress_root_pipes()

doca_error_t create_switch_egress_root_pipes ( struct ipsec_security_gw_ports_map ports[],
struct ipsec_security_gw_config app_cfg 
)

Definition at line 840 of file flow_common.c.

◆ create_switch_ingress_root_pipes()

doca_error_t create_switch_ingress_root_pipes ( struct ipsec_security_gw_ports_map ports[],
struct ipsec_security_gw_config app_cfg 
)

Definition at line 815 of file flow_common.c.

◆ create_switch_pkt_meta_pipe()

static doca_error_t create_switch_pkt_meta_pipe ( struct doca_flow_pipe **  pipe)
static

Definition at line 686 of file flow_common.c.

◆ create_switch_port_meta_pipe()

static doca_error_t create_switch_port_meta_pipe ( struct doca_flow_pipe **  pipe)
static

Definition at line 562 of file flow_common.c.

◆ doca_flow_cleanup()

void doca_flow_cleanup ( int  nb_ports,
struct ipsec_security_gw_ports_map ports[] 
)

Definition at line 360 of file flow_common.c.

◆ DOCA_LOG_REGISTER()

DOCA_LOG_REGISTER ( IPSEC_SECURITY_GW::flow_common  )

◆ get_icv_len_int()

uint32_t get_icv_len_int ( enum doca_flow_crypto_icv_len  icv_len)

Definition at line 374 of file flow_common.c.

◆ ipsec_security_gw_bind()

doca_error_t ipsec_security_gw_bind ( struct ipsec_security_gw_ports_map ports[],
struct ipsec_security_gw_config app_cfg 
)

Definition at line 333 of file flow_common.c.

◆ ipsec_security_gw_init_doca_flow()

doca_error_t ipsec_security_gw_init_doca_flow ( const struct ipsec_security_gw_config app_cfg,
int  nb_queues,
struct ipsec_security_gw_ports_map ports[] 
)

Definition at line 163 of file flow_common.c.

◆ ipsec_security_gw_init_status()

doca_error_t ipsec_security_gw_init_status ( struct ipsec_security_gw_config app_cfg,
int  nb_queues 
)

Definition at line 315 of file flow_common.c.

◆ process_entries()

doca_error_t process_entries ( struct doca_flow_port *  port,
struct entries_status status,
int  timeout,
uint16_t  pipe_queue 
)

Definition at line 78 of file flow_common.c.

◆ remove_ethernet_padding()

void remove_ethernet_padding ( struct rte_mbuf **  m)

Definition at line 870 of file flow_common.c.

◆ security_gateway_free_decrypt_resources()

static void security_gateway_free_decrypt_resources ( struct decrypt_pipes decrypt_pipes)
static

Definition at line 936 of file flow_common.c.

◆ security_gateway_free_encrypt_resources()

static void security_gateway_free_encrypt_resources ( struct encrypt_pipes encrypt_pipes)
static

Definition at line 903 of file flow_common.c.

◆ security_gateway_free_resources()

void security_gateway_free_resources ( struct ipsec_security_gw_config app_cfg)

Definition at line 960 of file flow_common.c.

◆ security_gateway_free_status_entries()

void security_gateway_free_status_entries ( struct ipsec_security_gw_config app_cfg)

Definition at line 954 of file flow_common.c.