common/cnxk: update inbound inline IPsec config mailbox

Updates CPT inbound inline IPsec configuration mailbox
to provide opcode and CPT credit from VF.
This patch also adds mailbox for reading inbound IPsec
configuration.

Signed-off-by: Srujana Challa <schalla@marvell.com>
This commit is contained in:
Srujana Challa 2022-09-12 18:43:58 +05:30 committed by Jerin Jacob
parent 80608c805c
commit 37da585095
4 changed files with 27 additions and 3 deletions

View File

@ -260,6 +260,21 @@ roc_cpt_inline_ipsec_cfg(struct dev *cpt_dev, uint8_t lf_id,
return cpt_lf_outb_cfg(cpt_dev, sso_pf_func, nix_pf_func, lf_id, ena);
}
int
roc_cpt_inline_ipsec_inb_cfg_read(struct roc_cpt *roc_cpt,
struct nix_inline_ipsec_cfg *inb_cfg)
{
struct cpt *cpt = roc_cpt_to_cpt_priv(roc_cpt);
struct dev *dev = &cpt->dev;
struct msg_req *req;
req = mbox_alloc_msg_nix_read_inline_ipsec_cfg(dev->mbox);
if (req == NULL)
return -EIO;
return mbox_process_msg(dev->mbox, (void *)&inb_cfg);
}
int
roc_cpt_inline_ipsec_inb_cfg(struct roc_cpt *roc_cpt, uint16_t param1,
uint16_t param2)

View File

@ -158,6 +158,8 @@ int __roc_api roc_cpt_lf_ctx_flush(struct roc_cpt_lf *lf, void *cptr,
int __roc_api roc_cpt_lf_ctx_reload(struct roc_cpt_lf *lf, void *cptr);
int __roc_api roc_cpt_inline_ipsec_cfg(struct dev *dev, uint8_t slot,
struct roc_nix *nix);
int __roc_api roc_cpt_inline_ipsec_inb_cfg_read(
struct roc_cpt *roc_cpt, struct nix_inline_ipsec_cfg *inb_cfg);
int __roc_api roc_cpt_inline_ipsec_inb_cfg(struct roc_cpt *roc_cpt,
uint16_t param1, uint16_t param2);
int __roc_api roc_cpt_afs_print(struct roc_cpt *roc_cpt);

View File

@ -263,7 +263,9 @@ struct mbox_msghdr {
nix_bp_cfg_rsp) \
M(NIX_CPT_BP_DISABLE, 0x8021, nix_cpt_bp_disable, nix_bp_cfg_req, \
msg_rsp) \
M(NIX_RX_SW_SYNC, 0x8022, nix_rx_sw_sync, msg_req, msg_rsp)
M(NIX_RX_SW_SYNC, 0x8022, nix_rx_sw_sync, msg_req, msg_rsp) \
M(NIX_READ_INLINE_IPSEC_CFG, 0x8023, nix_read_inline_ipsec_cfg, \
msg_req, nix_inline_ipsec_cfg)
/* Messages initiated by AF (range 0xC00 - 0xDFF) */
#define MBOX_UP_CGX_MESSAGES \
@ -1161,7 +1163,9 @@ struct nix_inline_ipsec_cfg {
uint32_t __io cpt_credit;
struct {
uint8_t __io egrp;
uint8_t __io opcode;
uint16_t __io opcode;
uint16_t __io param1;
uint16_t __io param2;
} gen_cfg;
struct {
uint16_t __io cpt_pf_func;
@ -1465,7 +1469,9 @@ struct cpt_rx_inline_lf_cfg_msg {
uint16_t __io sso_pf_func;
uint16_t __io param1;
uint16_t __io param2;
uint16_t __io reserved;
uint16_t __io opcode;
uint32_t __io credit;
uint32_t __io reserved;
};
enum cpt_eng_type {

View File

@ -65,6 +65,7 @@ INTERNAL {
roc_cpt_dev_init;
roc_cpt_eng_grp_add;
roc_cpt_inline_ipsec_cfg;
roc_cpt_inline_ipsec_inb_cfg_read;
roc_cpt_inline_ipsec_inb_cfg;
roc_cpt_iq_disable;
roc_cpt_iq_enable;