]> git.droids-corp.org - dpdk.git/commitdiff
common/cnxk: allow force use of SSO device for outb inline
authorNithin Dabilpuram <ndabilpuram@marvell.com>
Tue, 22 Feb 2022 19:35:00 +0000 (01:05 +0530)
committerJerin Jacob <jerinj@marvell.com>
Wed, 23 Feb 2022 16:35:58 +0000 (17:35 +0100)
Allow force use of SSO device even when inline dev is available
so that in case driver needs events directly delivered to
event device.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
drivers/common/cnxk/roc_nix.h
drivers/common/cnxk/roc_nix_inl.c

index 0ced7fb8d0c41717293ddf095e252797863a96e3..9546315761c6fb41e49c69730d0c1f80abeb1155 100644 (file)
@@ -397,6 +397,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;
index ac17e95cd007c309811b84d569ced9a47148058a..003f972aeba86b438e09f4979bbf932753fd8609 100644 (file)
@@ -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;