DPDK  24.03.0-rc1
Enumerations | Functions
rte_pmd_cnxk.h File Reference
#include <rte_compat.h>
#include <rte_ethdev.h>
#include <rte_ether.h>
#include <rte_security.h>

Go to the source code of this file.

Enumerations

enum  rte_pmd_cnxk_sec_action_alg {
  RTE_PMD_CNXK_SEC_ACTION_ALG0, RTE_PMD_CNXK_SEC_ACTION_ALG1, RTE_PMD_CNXK_SEC_ACTION_ALG2, RTE_PMD_CNXK_SEC_ACTION_ALG3,
  RTE_PMD_CNXK_SEC_ACTION_ALG4
}
 

Functions

__rte_experimental int rte_pmd_cnxk_hw_sa_read (void *device, struct rte_security_session *sess, void *data, uint32_t len)
 
__rte_experimental int rte_pmd_cnxk_hw_sa_write (void *device, struct rte_security_session *sess, void *data, uint32_t len)
 
__rte_experimental void * rte_pmd_cnxk_inl_ipsec_res (struct rte_mbuf *mbuf)
 

Detailed Description

CNXK PMD specific functions.

Definition in file rte_pmd_cnxk.h.

Enumeration Type Documentation

◆ rte_pmd_cnxk_sec_action_alg

Algorithm type to be used with security action to calculate SA_index

Enumerator
RTE_PMD_CNXK_SEC_ACTION_ALG0 

No swizzling of SPI bits into SA index. SA_index is from SA_XOR if enabled.

RTE_PMD_CNXK_SEC_ACTION_ALG1 

SPI<31:28> has 4 upper bits which segment the sequence number space. Initial SA_index is from SA_XOR if enabled. SA_alg = { 4'b0, SA_mcam[27:0] + SPI[31:28]}

RTE_PMD_CNXK_SEC_ACTION_ALG2 

SPI<27:25> segment the sequence number space. Initial SA_index is from SA_XOR if enabled. SA_alg = { 7'b0, SA_mcam[24:0] + SPI[27:25]}

RTE_PMD_CNXK_SEC_ACTION_ALG3 

SPI<28:25> segment the sequence number space. Initial SA_index is from SA_XOR if enabled. SA_alg = { 7'b0, SA_mcam[24:0] + SPI[28:25]}

RTE_PMD_CNXK_SEC_ACTION_ALG4 

The inbound SPI maybe "random", therefore we want the MCAM to be capable of remapping the SPI to an arbitrary SA_index. SPI to SA is done using a lookup in NIX/NPC cam entry with key as SPI, MATCH_ID, LFID.

Definition at line 22 of file rte_pmd_cnxk.h.

Function Documentation

◆ rte_pmd_cnxk_hw_sa_read()

__rte_experimental int rte_pmd_cnxk_hw_sa_read ( void *  device,
struct rte_security_session *  sess,
void *  data,
uint32_t  len 
)

Read HW SA context from session.

Parameters
devicePort identifier of Ethernet device.
sessHandle of the security session.
[out]dataDestination pointer to copy SA context for application.
lenLength of SA context to copy into data parameter.
Returns
0 on success, a negative errno value otherwise.

◆ rte_pmd_cnxk_hw_sa_write()

__rte_experimental int rte_pmd_cnxk_hw_sa_write ( void *  device,
struct rte_security_session *  sess,
void *  data,
uint32_t  len 
)

Write HW SA context to session.

Parameters
devicePort identifier of Ethernet device.
sessHandle of the security session.
[in]dataSource data pointer from application to copy SA context into session.
lenLength of SA context to copy from data parameter.
Returns
0 on success, a negative errno value otherwise.

◆ rte_pmd_cnxk_inl_ipsec_res()

__rte_experimental void* rte_pmd_cnxk_inl_ipsec_res ( struct rte_mbuf mbuf)

Get pointer to CPT result info for inline inbound processed pkt.

It is recommended to use this API only when mbuf indicates packet was processed with inline IPsec and there was a failure with the same i.e mbuf->ol_flags indicates (RTE_MBUF_F_RX_SEC_OFFLOAD | RTE_MBUF_F_RX_SEC_OFFLOAD_FAILED).

Parameters
mbufPointer to packet that was just received and was processed with Inline IPsec.
Returns
  • Pointer to mbuf location where CPT result info is stored on success.
  • NULL on failure.