]> git.droids-corp.org - dpdk.git/commitdiff
crypto/cnxk: add chained operation in session
authorArchana Muniganti <marchana@marvell.com>
Fri, 25 Jun 2021 05:56:22 +0000 (11:26 +0530)
committerAkhil Goyal <gakhil@marvell.com>
Wed, 7 Jul 2021 19:15:08 +0000 (21:15 +0200)
Add support for chained operations in session.

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
doc/guides/cryptodevs/features/cn10k.ini
doc/guides/cryptodevs/features/cn9k.ini
drivers/crypto/cnxk/cn10k_cryptodev.c
drivers/crypto/cnxk/cn9k_cryptodev.c
drivers/crypto/cnxk/cnxk_cryptodev_ops.c

index 7f433fa0d270579bed0d1722f2f764200781e959..175fbf77064c66f17432a6037630e92b738935c1 100644 (file)
@@ -5,8 +5,10 @@
 ;
 [Features]
 Symmetric crypto       = Y
+Sym operation chaining = Y
 HW Accelerated         = Y
 Symmetric sessionless  = Y
+Digest encrypted       = Y
 
 ;
 ; Supported crypto algorithms of 'cn10k' crypto driver.
index 9c9d54d2501af5bdd2af4140eff3aeae3d047abf..c22b25ca80f7d925a4294be38f3e5cf6adf7ebe6 100644 (file)
@@ -5,8 +5,10 @@
 ;
 [Features]
 Symmetric crypto       = Y
+Sym operation chaining = Y
 HW Accelerated         = Y
 Symmetric sessionless  = Y
+Digest encrypted       = Y
 
 ;
 ; Supported crypto algorithms of 'cn9k' crypto driver.
index 31addc08b4f814d2a17a451651756111b1784895..8a312901a3b17738178d4df812302555acfab17f 100644 (file)
@@ -82,7 +82,9 @@ cn10k_cpt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 
        dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
                             RTE_CRYPTODEV_FF_HW_ACCELERATED |
-                            RTE_CRYPTODEV_FF_SYM_SESSIONLESS;
+                            RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
+                            RTE_CRYPTODEV_FF_SYM_SESSIONLESS |
+                            RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED;
 
        cn10k_cpt_set_enqdeq_fns(dev);
 
index 7908896c56cd98d8b5c70910b5a2e631aa60bc42..6b5c9e3b100aed3219a0bf0a8efab0db960ad5db 100644 (file)
@@ -80,7 +80,9 @@ cn9k_cpt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 
        dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
                             RTE_CRYPTODEV_FF_HW_ACCELERATED |
-                            RTE_CRYPTODEV_FF_SYM_SESSIONLESS;
+                            RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
+                            RTE_CRYPTODEV_FF_SYM_SESSIONLESS |
+                            RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED;
 
        cn9k_cpt_set_enqdeq_fns(dev);
 
index acb9f1f4cef7b12ad8decb39813cf9d59c71d0c1..10bb191dba113a9dc5f67b1746810dac72da0704 100644 (file)
@@ -469,6 +469,20 @@ sym_session_configure(struct roc_cpt *roc_cpt, int driver_id,
        case CNXK_CPT_AEAD:
                ret = fill_sess_aead(xform, sess_priv);
                break;
+       case CNXK_CPT_CIPHER_ENC_AUTH_GEN:
+       case CNXK_CPT_CIPHER_DEC_AUTH_VRFY:
+               ret = fill_sess_cipher(xform, sess_priv);
+               if (ret < 0)
+                       break;
+               ret = fill_sess_auth(xform->next, sess_priv);
+               break;
+       case CNXK_CPT_AUTH_VRFY_CIPHER_DEC:
+       case CNXK_CPT_AUTH_GEN_CIPHER_ENC:
+               ret = fill_sess_auth(xform, sess_priv);
+               if (ret < 0)
+                       break;
+               ret = fill_sess_cipher(xform->next, sess_priv);
+               break;
        default:
                ret = -1;
        }