.TH "rte_pmd_cnxk.h" 3 "Version 25.11.0" "DPDK" \" -*- nroff -*-
.ad l
.nh
.SH NAME
rte_pmd_cnxk.h
.SH SYNOPSIS
.br
.PP
\fR#include <rte_compat\&.h>\fP
.br
\fR#include <rte_ethdev\&.h>\fP
.br
\fR#include <rte_ether\&.h>\fP
.br
\fR#include <rte_security\&.h>\fP
.br

.SS "Data Structures"

.in +1c
.ti -1c
.RI "struct \fBrte_pmd_cnxk_cpt_q_stats\fP"
.br
.ti -1c
.RI "union \fBrte_pmd_cnxk_ipsec_outer_ip_hdr\fP"
.br
.ti -1c
.RI "struct \fBrte_pmd_cnxk_ipsec_inb_ctx_update_reg\fP"
.br
.ti -1c
.RI "union \fBrte_pmd_cnxk_ipsec_outb_iv\fP"
.br
.ti -1c
.RI "struct \fBrte_pmd_cnxk_ipsec_outb_ctx_update_reg\fP"
.br
.ti -1c
.RI "struct \fBrte_pmd_cnxk_ipsec_inb_sa\fP"
.br
.ti -1c
.RI "struct \fBrte_pmd_cnxk_ipsec_outb_sa\fP"
.br
.ti -1c
.RI "union \fBrte_pmd_cnxk_ipsec_hw_sa\fP"
.br
.ti -1c
.RI "union \fBrte_pmd_cnxk_cpt_res_s\fP"
.br
.ti -1c
.RI "struct \fBrte_pmd_cnxk_cpt_res_s::rte_pmd_cpt_cn10k_res_s\fP"
.br
.ti -1c
.RI "struct \fBrte_pmd_cnxk_cpt_res_s::rte_pmd_cpt_cn9k_res_s\fP"
.br
.ti -1c
.RI "struct \fBrte_pmd_cnxk_ipsec_inb_cfg\fP"
.br
.in -1c
.SS "Macros"

.in +1c
.ti -1c
.RI "#define \fBRTE_PMD_CNXK_AR_WIN_SIZE_MIN\fP   64"
.br
.ti -1c
.RI "#define \fBRTE_PMD_CNXK_AR_WINBITS_SZ\fP   (\fBRTE_ALIGN_CEIL\fP(RTE_PMD_CNXK_AR_WIN_SIZE_MAX, 64) / 64)"
.br
.in -1c
.SS "Enumerations"

.in +1c
.ti -1c
.RI "enum \fBrte_pmd_cnxk_sec_action_alg\fP { \fBRTE_PMD_CNXK_SEC_ACTION_ALG0\fP, \fBRTE_PMD_CNXK_SEC_ACTION_ALG1\fP, \fBRTE_PMD_CNXK_SEC_ACTION_ALG2\fP, \fBRTE_PMD_CNXK_SEC_ACTION_ALG3\fP, \fBRTE_PMD_CNXK_SEC_ACTION_ALG4\fP }"
.br
.ti -1c
.RI "enum \fBrte_pmd_cnxk_cpt_q_stats_type\fP { \fBRTE_PMD_CNXK_CPT_Q_STATS_INL_DEV\fP, \fBRTE_PMD_CNXK_CPT_Q_STATS_KERNEL\fP, \fBRTE_PMD_CNXK_CPT_Q_STATS_ETHDEV\fP }"
.br
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "__rte_experimental int \fBrte_pmd_cnxk_hw_sa_read\fP (uint16_t portid, void *sess, union \fBrte_pmd_cnxk_ipsec_hw_sa\fP *data, uint32_t len, bool inb)"
.br
.ti -1c
.RI "__rte_experimental int \fBrte_pmd_cnxk_hw_sa_write\fP (uint16_t portid, void *sess, union \fBrte_pmd_cnxk_ipsec_hw_sa\fP *data, uint32_t len, bool inb)"
.br
.ti -1c
.RI "__rte_experimental union \fBrte_pmd_cnxk_cpt_res_s\fP * \fBrte_pmd_cnxk_inl_ipsec_res\fP (struct \fBrte_mbuf\fP *mbuf)"
.br
.ti -1c
.RI "__rte_experimental union \fBrte_pmd_cnxk_ipsec_hw_sa\fP * \fBrte_pmd_cnxk_hw_session_base_get\fP (uint16_t portid, bool inb)"
.br
.ti -1c
.RI "__rte_experimental int \fBrte_pmd_cnxk_sa_flush\fP (uint16_t portid, union \fBrte_pmd_cnxk_ipsec_hw_sa\fP *sess, bool inb)"
.br
.ti -1c
.RI "__rte_experimental struct rte_pmd_cnxk_inl_dev_q * \fBrte_pmd_cnxk_inl_dev_qptr_get\fP (void)"
.br
.ti -1c
.RI "__rte_experimental uint16_t \fBrte_pmd_cnxk_inl_dev_submit\fP (struct rte_pmd_cnxk_inl_dev_q *qptr, void *inst, uint16_t nb_inst)"
.br
.ti -1c
.RI "__rte_experimental int \fBrte_pmd_cnxk_cpt_q_stats_get\fP (uint16_t portid, enum \fBrte_pmd_cnxk_cpt_q_stats_type\fP type, struct \fBrte_pmd_cnxk_cpt_q_stats\fP *stats, uint16_t idx)"
.br
.ti -1c
.RI "__rte_experimental void \fBrte_pmd_cnxk_hw_inline_inb_cfg_set\fP (uint16_t portid, struct \fBrte_pmd_cnxk_ipsec_inb_cfg\fP *cfg)"
.br
.ti -1c
.RI "__rte_experimental const char * \fBrte_pmd_cnxk_model_str_get\fP (void)"
.br
.in -1c
.SH "Detailed Description"
.PP 
CNXK PMD specific functions\&. 
.PP
Definition in file \fBrte_pmd_cnxk\&.h\fP\&.
.SH "Macro Definition Documentation"
.PP 
.SS "#define RTE_PMD_CNXK_AR_WIN_SIZE_MIN   64"
Anti reply window size supported 
.PP
Definition at line \fB91\fP of file \fBrte_pmd_cnxk\&.h\fP\&.
.SS "#define RTE_PMD_CNXK_AR_WINBITS_SZ   (\fBRTE_ALIGN_CEIL\fP(RTE_PMD_CNXK_AR_WIN_SIZE_MAX, 64) / 64)"
u64 array size to fit anti replay window bits 
.PP
Definition at line \fB96\fP of file \fBrte_pmd_cnxk\&.h\fP\&.
.SH "Enumeration Type Documentation"
.PP 
.SS "enum \fBrte_pmd_cnxk_sec_action_alg\fP"
Algorithm type to be used with security action to calculate SA_index 
.PP
\fBEnumerator\fP
.in +1c
.TP
\f(BIRTE_PMD_CNXK_SEC_ACTION_ALG0 \fP
No swizzling of SPI bits into SA index\&. SA_index is from SA_XOR if enabled\&. 
.TP
\f(BIRTE_PMD_CNXK_SEC_ACTION_ALG1 \fP
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]} 
.TP
\f(BIRTE_PMD_CNXK_SEC_ACTION_ALG2 \fP
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]} 
.TP
\f(BIRTE_PMD_CNXK_SEC_ACTION_ALG3 \fP
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]} 
.TP
\f(BIRTE_PMD_CNXK_SEC_ACTION_ALG4 \fP
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\&. 
.PP
Definition at line \fB22\fP of file \fBrte_pmd_cnxk\&.h\fP\&.
.SS "enum \fBrte_pmd_cnxk_cpt_q_stats_type\fP"
CPT queue type for obtaining queue hardware statistics\&. 
.PP
\fBEnumerator\fP
.in +1c
.TP
\f(BIRTE_PMD_CNXK_CPT_Q_STATS_INL_DEV \fP
Type to get Inline Device queue(s) statistics 
.TP
\f(BIRTE_PMD_CNXK_CPT_Q_STATS_KERNEL \fP
Type to get Inline Inbound queue which is attached to kernel device statistics\&. 
.TP
\f(BIRTE_PMD_CNXK_CPT_Q_STATS_ETHDEV \fP
Type to get CPT queue which is attached to ethdev statistics 
.PP
Definition at line \fB51\fP of file \fBrte_pmd_cnxk\&.h\fP\&.
.SH "Function Documentation"
.PP 
.SS "__rte_experimental int rte_pmd_cnxk_hw_sa_read (uint16_t portid, void * sess, union \fBrte_pmd_cnxk_ipsec_hw_sa\fP * data, uint32_t len, bool inb)"
Read HW SA context from session\&.

.PP
\fBParameters\fP
.RS 4
\fIportid\fP Port identifier of Ethernet device\&. 
.br
\fIsess\fP Handle of the security session as void *\&. 
.br
\fIdata\fP Destination pointer to copy SA context for application\&. 
.br
\fIlen\fP Length of SA context to copy into data parameter\&. 
.br
\fIinb\fP Determines the type of specified SA\&.
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, a negative errno value otherwise\&. 
.RE
.PP

.SS "__rte_experimental int rte_pmd_cnxk_hw_sa_write (uint16_t portid, void * sess, union \fBrte_pmd_cnxk_ipsec_hw_sa\fP * data, uint32_t len, bool inb)"
Write HW SA context to session\&.

.PP
\fBParameters\fP
.RS 4
\fIportid\fP Port identifier of Ethernet device\&. 
.br
\fIsess\fP Handle of the security session as void *\&. 
.br
\fIdata\fP Source data pointer from application to copy SA context into session\&. 
.br
\fIlen\fP Length of SA context to copy from data parameter\&. 
.br
\fIinb\fP Determines the type of specified SA\&.
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, a negative errno value otherwise\&. 
.RE
.PP

.SS "__rte_experimental union \fBrte_pmd_cnxk_cpt_res_s\fP * rte_pmd_cnxk_inl_ipsec_res (struct \fBrte_mbuf\fP * mbuf)"
Get pointer to CPT result info for inline inbound processed pkt\&.

.PP
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)\&.

.PP
\fBParameters\fP
.RS 4
\fImbuf\fP Pointer to packet that was just received and was processed with Inline IPsec\&.
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
Pointer to mbuf location where \fRunion \fBrte_pmd_cnxk_cpt_res_s\fP\fP is stored on success\&.
.IP "\(bu" 2
NULL on failure\&. 
.PP
.RE
.PP

.SS "__rte_experimental union \fBrte_pmd_cnxk_ipsec_hw_sa\fP * rte_pmd_cnxk_hw_session_base_get (uint16_t portid, bool inb)"
Get pointer to the Inline Inbound or Outbound SA table base\&.

.PP
\fBParameters\fP
.RS 4
\fIportid\fP Port identifier of Ethernet device\&. 
.br
\fIinb\fP Determines the type of SA base to be returned\&. When inb is true, the method returns the Inbound SA base\&. When inb is false, the method returns the Outbound SA base\&.
.RE
.PP
\fBReturns\fP
.RS 4
Pointer to Inbound or Outbound SA base\&. 
.RE
.PP

.SS "__rte_experimental int rte_pmd_cnxk_sa_flush (uint16_t portid, union \fBrte_pmd_cnxk_ipsec_hw_sa\fP * sess, bool inb)"
Executes a CPT flush on the specified session\&.

.PP
\fBParameters\fP
.RS 4
\fIportid\fP Port identifier of Ethernet device\&. 
.br
\fIsess\fP Handle of the session on which the CPT flush will be executed\&. 
.br
\fIinb\fP Determines the type of SA to be flushed, Inbound or Outbound\&.
.RE
.PP
\fBReturns\fP
.RS 4
0 Upon success, a negative errno value otherwise\&. 
.RE
.PP

.SS "__rte_experimental struct rte_pmd_cnxk_inl_dev_q * rte_pmd_cnxk_inl_dev_qptr_get (void )"
Get queue pointer of Inline Device\&.

.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
Pointer to queue structure that would be the input to submit API\&.
.IP "\(bu" 2
NULL upon failure\&. 
.PP
.RE
.PP

.SS "__rte_experimental uint16_t rte_pmd_cnxk_inl_dev_submit (struct rte_pmd_cnxk_inl_dev_q * qptr, void * inst, uint16_t nb_inst)"
Submit CPT instruction(s) (cpt_inst_s) to Inline Device\&.

.PP
\fBParameters\fP
.RS 4
\fIqptr\fP Pointer obtained with \fR\fBrte_pmd_cnxk_inl_dev_qptr_get\fP\fP\&. 
.br
\fIinst\fP Pointer to an array of \fRcpt_inst_s\fP prapared by application\&. 
.br
\fInb_inst\fP Number of instructions to be processed\&.
.RE
.PP
\fBReturns\fP
.RS 4
Number of instructions processed\&. 
.RE
.PP

.SS "__rte_experimental int rte_pmd_cnxk_cpt_q_stats_get (uint16_t portid, enum \fBrte_pmd_cnxk_cpt_q_stats_type\fP type, struct \fBrte_pmd_cnxk_cpt_q_stats\fP * stats, uint16_t idx)"
Retrieves the hardware statistics of a given port and stats type\&.

.PP
\fBParameters\fP
.RS 4
\fIportid\fP Port identifier of Ethernet device\&. 
.br
\fItype\fP The type of hardware statistics to retrieve, as defined in the \fRenum \fBrte_pmd_cnxk_cpt_q_stats_type\fP\fP\&. 
.br
\fIstats\fP Pointer where the retrieved statistics will be stored\&. 
.br
\fIidx\fP The index of the queue of a given type\&.
.RE
.PP
\fBReturns\fP
.RS 4
0 Upon success, a negative errno value otherwise\&. 
.RE
.PP

.SS "__rte_experimental void rte_pmd_cnxk_hw_inline_inb_cfg_set (uint16_t portid, struct \fBrte_pmd_cnxk_ipsec_inb_cfg\fP * cfg)"
Set the configuration for hardware inline inbound IPsec processing\&. This API must be called before calling the \fR\fBrte_eth_dev_configure\fP\fP API\&.

.PP
\fBParameters\fP
.RS 4
\fIportid\fP Port identifier of Ethernet device\&. 
.br
\fIcfg\fP Pointer to the IPsec inbound configuration structure\&. 
.RE
.PP

.SS "__rte_experimental const char * rte_pmd_cnxk_model_str_get (void )"
Retrieves model name on which it is running as a string\&.

.PP
\fBReturns\fP
.RS 4
Returns model string, ex\&."cn10ka_a1" 
.RE
.PP

.SH "Author"
.PP 
Generated automatically by Doxygen for DPDK from the source code\&.
