M(CPT_STATS, 0xA05, cpt_sts_get, cpt_sts_req, cpt_sts_rsp) \
M(CPT_RXC_TIME_CFG, 0xA06, cpt_rxc_time_cfg, cpt_rxc_time_cfg_req, \
msg_rsp) \
+ M(CPT_CTX_CACHE_SYNC, 0xA07, cpt_ctx_cache_sync, msg_req, msg_rsp) \
M(CPT_RX_INLINE_LF_CFG, 0xBFE, cpt_rx_inline_lf_cfg, \
cpt_rx_inline_lf_cfg_msg, msg_rsp) \
M(CPT_GET_CAPS, 0xBFD, cpt_caps_get, msg_req, cpt_caps_rsp_msg) \
return mbox_process(mbox);
}
+int
+roc_nix_cpt_ctx_cache_sync(struct roc_nix *roc_nix)
+{
+ struct nix *nix = roc_nix_to_nix_priv(roc_nix);
+ struct mbox *mbox = (&nix->dev)->mbox;
+ struct msg_req *req;
+
+ req = mbox_alloc_msg_cpt_ctx_cache_sync(mbox);
+ if (req == NULL)
+ return -ENOSPC;
+
+ return mbox_process(mbox);
+}
+
int
roc_nix_max_pkt_len(struct roc_nix *roc_nix)
{
int __roc_api roc_nix_lf_free(struct roc_nix *roc_nix);
int __roc_api roc_nix_lf_inl_ipsec_cfg(struct roc_nix *roc_nix,
struct roc_nix_ipsec_cfg *cfg, bool enb);
+int __roc_api roc_nix_cpt_ctx_cache_sync(struct roc_nix *roc_nix);
/* Debug */
int __roc_api roc_nix_lf_get_reg_count(struct roc_nix *roc_nix);
nix->inl_inb_ena = false;
+ /* Flush Inbound CTX cache entries */
+ roc_nix_cpt_ctx_cache_sync(roc_nix);
+
/* Disable Inbound SA */
return nix_inl_sa_tbl_release(roc_nix);
}
return rc;
}
+static int
+nix_inl_cpt_ctx_cache_sync(struct nix_inl_dev *inl_dev)
+{
+ struct mbox *mbox = (&inl_dev->dev)->mbox;
+ struct msg_req *req;
+
+ req = mbox_alloc_msg_cpt_ctx_cache_sync(mbox);
+ if (req == NULL)
+ return -ENOSPC;
+
+ return mbox_process(mbox);
+}
+
static int
nix_inl_nix_ipsec_cfg(struct nix_inl_dev *inl_dev, bool ena)
{
inl_dev = idev->nix_inl_dev;
pci_dev = inl_dev->pci_dev;
+ /* Flush Inbound CTX cache entries */
+ nix_inl_cpt_ctx_cache_sync(inl_dev);
+
/* Release SSO */
rc = nix_inl_sso_release(inl_dev);
roc_nix_inl_ctx_write;
roc_nix_inl_inb_sa_init;
roc_nix_inl_outb_sa_init;
+ roc_nix_cpt_ctx_cache_sync;
roc_nix_is_lbk;
roc_nix_is_pf;
roc_nix_is_sdp;