NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
PSP_GatewayFlows Class Reference

The entity which owns all the doca flow shared resources and flow pipes (but not sessions). More...

#include </opt/mellanox/doca/applications/psp_gateway/psp_gw_flows.h>

Data Structures

struct  pipe_query
 

Public Member Functions

 PSP_GatewayFlows (psp_pf_dev *pf, uint16_t vf_port_id, psp_gw_app_config *app_config)
 Constructs the object. This operation cannot fail. More...
 
virtual ~PSP_GatewayFlows (void)
 
psp_pf_devpf (void)
 
doca_error_t init (void)
 Initialized the DOCA resources. More...
 
doca_error_t add_encrypt_entry (psp_session_t *session, const void *encrypt_key)
 Adds a flow pipe entry to perform encryption on a new flow to the indicated peer. The caller is responsible for negotiating the SPI and key, and assigning a unique crypto_id. More...
 
doca_error_t add_ingress_acl_entry (psp_session_t *session)
 Adds an ingress ACL entry for the given session to accept the combination of src_vip and SPI. More...
 
doca_error_t remove_encrypt_entry (psp_session_t *session)
 Removes the indicated flow entry. More...
 
void show_static_flow_counts (void)
 Shows flow counters for pipes which have a fixed number of entries, if any counter values have changed since the last invocation. More...
 
void show_session_flow_count (const session_key session_vips_pair, psp_session_t &session)
 Shows flow counters for the given tunnel, if they have changed since the last invocation. More...
 

Detailed Description

The entity which owns all the doca flow shared resources and flow pipes (but not sessions).

Definition at line 87 of file psp_gw_flows.h.

Constructor & Destructor Documentation

◆ PSP_GatewayFlows()

PSP_GatewayFlows::PSP_GatewayFlows ( psp_pf_dev pf,
uint16_t  vf_port_id,
psp_gw_app_config app_config 
)

Constructs the object. This operation cannot fail.

Parameters
[in]pfThe Host PF object, already opened and probed, but not started, by DOCA, of the device which sends and receives encrypted packets
[in]vf_port_idThe port_id of the device which sends and received plaintext packets.

Definition at line 115 of file psp_gw_flows.cpp.

◆ ~PSP_GatewayFlows()

PSP_GatewayFlows::~PSP_GatewayFlows ( void  )
virtual

Deallocates all associated DOCA objects. In case of failure, an error is logged and progress continues.

Definition at line 133 of file psp_gw_flows.cpp.

Member Function Documentation

◆ add_encrypt_entry()

doca_error_t PSP_GatewayFlows::add_encrypt_entry ( psp_session_t session,
const void *  encrypt_key 
)

Adds a flow pipe entry to perform encryption on a new flow to the indicated peer. The caller is responsible for negotiating the SPI and key, and assigning a unique crypto_id.

@session [in]: the session for which an encryption flow should be created @encrypt_key [in]: the encryption key to use for the session

Returns
: DOCA_SUCCESS on success and DOCA_ERROR otherwise

Definition at line 961 of file psp_gw_flows.cpp.

◆ add_ingress_acl_entry()

doca_error_t PSP_GatewayFlows::add_ingress_acl_entry ( psp_session_t session)

Adds an ingress ACL entry for the given session to accept the combination of src_vip and SPI.

@session [in]: the session for which an ingress ACL flow should be created

Returns
: DOCA_SUCCESS on success and DOCA_ERROR otherwise

Definition at line 726 of file psp_gw_flows.cpp.

◆ init()

doca_error_t PSP_GatewayFlows::init ( void  )

Initialized the DOCA resources.

Returns
: DOCA_SUCCESS on success and DOCA_ERROR otherwise

Definition at line 145 of file psp_gw_flows.cpp.

◆ pf()

psp_pf_dev* PSP_GatewayFlows::pf ( void  )
inline

Exposes the host PF device. (Used by the benchmarking functions)

Definition at line 108 of file psp_gw_flows.h.

◆ remove_encrypt_entry()

doca_error_t PSP_GatewayFlows::remove_encrypt_entry ( psp_session_t session)

Removes the indicated flow entry.

@session [in]: The session whose associated flows should be removed

Returns
: DOCA_SUCCESS on success and DOCA_ERROR otherwise

Definition at line 1133 of file psp_gw_flows.cpp.

◆ show_session_flow_count()

void PSP_GatewayFlows::show_session_flow_count ( const session_key  session_vips_pair,
psp_session_t session 
)

Shows flow counters for the given tunnel, if they have changed since the last invocation.

@session_vips_pair [in]: the pair of VIPs which identify the session @session [in/out]: the object which holds the flow entries

Definition at line 1934 of file psp_gw_flows.cpp.

◆ show_static_flow_counts()

void PSP_GatewayFlows::show_static_flow_counts ( void  )

Shows flow counters for pipes which have a fixed number of entries, if any counter values have changed since the last invocation.

Definition at line 1872 of file psp_gw_flows.cpp.


The documentation for this class was generated from the following files: