Allow force use of SSO pffunc even when inline dev is available
so that in case driver needs events directly delivered to
event device.

Signed-off-by: Nithin Dabilpuram <ndabilpu...@marvell.com>
---
 drivers/common/cnxk/roc_nix.h     | 1 +
 drivers/common/cnxk/roc_nix_inl.c | 7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/common/cnxk/roc_nix.h b/drivers/common/cnxk/roc_nix.h
index 0122b98..57a595f 100644
--- a/drivers/common/cnxk/roc_nix.h
+++ b/drivers/common/cnxk/roc_nix.h
@@ -386,6 +386,7 @@ struct roc_nix {
        uint16_t outb_nb_crypto_qs;
        uint16_t ipsec_in_max_spi;
        uint16_t ipsec_out_max_sa;
+       bool ipsec_out_sso_pffunc;
        /* End of input parameters */
        /* LMT line base for "Per Core Tx LMT line" mode*/
        uintptr_t lmt_base;
diff --git a/drivers/common/cnxk/roc_nix_inl.c 
b/drivers/common/cnxk/roc_nix_inl.c
index ac17e95..003f972 100644
--- a/drivers/common/cnxk/roc_nix_inl.c
+++ b/drivers/common/cnxk/roc_nix_inl.c
@@ -311,6 +311,10 @@ roc_nix_inl_outb_init(struct roc_nix *roc_nix)
        /* Retrieve inline device if present */
        inl_dev = idev->nix_inl_dev;
        sso_pffunc = inl_dev ? inl_dev->dev.pf_func : idev_sso_pffunc_get();
+       /* Use sso_pffunc if explicitly requested */
+       if (roc_nix->ipsec_out_sso_pffunc)
+               sso_pffunc = idev_sso_pffunc_get();
+
        if (!sso_pffunc) {
                plt_err("Failed to setup inline outb, need either "
                        "inline device or sso device");
@@ -328,7 +332,8 @@ roc_nix_inl_outb_init(struct roc_nix *roc_nix)
        eng_grpmask = (1ULL << ROC_CPT_DFLT_ENG_GRP_SE |
                       1ULL << ROC_CPT_DFLT_ENG_GRP_SE_IE |
                       1ULL << ROC_CPT_DFLT_ENG_GRP_AE);
-       rc = cpt_lfs_alloc(dev, eng_grpmask, blkaddr, true);
+       rc = cpt_lfs_alloc(dev, eng_grpmask, blkaddr,
+                          !roc_nix->ipsec_out_sso_pffunc);
        if (rc) {
                plt_err("Failed to alloc CPT LF resources, rc=%d", rc);
                goto lf_detach;
-- 
2.8.4

Reply via email to