cryptodev: add session-less feature flag
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Thu, 16 Apr 2020 09:25:29 +0000 (10:25 +0100)
committerAkhil Goyal <akhil.goyal@nxp.com>
Sun, 19 Apr 2020 20:45:11 +0000 (22:45 +0200)
Add feature flag for symmetric sessionless support,
so it can be checked by applications.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Tested-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
25 files changed:
doc/guides/cryptodevs/features/aesni_gcm.ini
doc/guides/cryptodevs/features/aesni_mb.ini
doc/guides/cryptodevs/features/armv8.ini
doc/guides/cryptodevs/features/caam_jr.ini
doc/guides/cryptodevs/features/ccp.ini
doc/guides/cryptodevs/features/default.ini
doc/guides/cryptodevs/features/kasumi.ini
doc/guides/cryptodevs/features/octeontx.ini
doc/guides/cryptodevs/features/octeontx2.ini
doc/guides/cryptodevs/features/openssl.ini
doc/guides/cryptodevs/features/snow3g.ini
doc/guides/cryptodevs/features/zuc.ini
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
drivers/crypto/armv8/rte_armv8_pmd.c
drivers/crypto/ccp/rte_ccp_pmd.c
drivers/crypto/kasumi/rte_kasumi_pmd.c
drivers/crypto/null/null_crypto_pmd.c
drivers/crypto/octeontx/otx_cryptodev_ops.c
drivers/crypto/octeontx2/otx2_cryptodev.c
drivers/crypto/openssl/rte_openssl_pmd.c
drivers/crypto/snow3g/rte_snow3g_pmd.c
drivers/crypto/zuc/rte_zuc_pmd.c
lib/librte_cryptodev/rte_cryptodev.c
lib/librte_cryptodev/rte_cryptodev.h

index 949d6a0..c592298 100644 (file)
@@ -15,6 +15,7 @@ In Place SGL           = Y
 OOP SGL In LB  Out     = Y
 OOP LB  In LB  Out     = Y
 CPU crypto             = Y
+Symmetric sessionless  = Y
 ;
 ; Supported crypto algorithms of the 'aesni_gcm' crypto driver.
 ;
index 6cc4c82..49cb82a 100644 (file)
@@ -13,6 +13,7 @@ CPU AVX512             = Y
 CPU AESNI              = Y
 OOP LB  In LB  Out     = Y
 CPU crypto             = Y
+Symmetric sessionless  = Y
 
 ;
 ; Supported crypto algorithms of the 'aesni_mb' crypto driver.
index e588f90..beb40c0 100644 (file)
@@ -8,6 +8,7 @@ Symmetric crypto       = Y
 Sym operation chaining = Y
 CPU NEON               = Y
 CPU ARM CE             = Y
+Symmetric sessionless  = Y
 
 ;
 ; Supported crypto algorithms of the 'armv8' crypto driver.
index c64bd35..8d55cdb 100644 (file)
@@ -48,4 +48,4 @@ AES GCM (256) = Y
 ;
 ; Supported Asymmetric algorithms of the 'dpaa2_sec' crypto driver.
 ;
-[Asymmetric]
\ No newline at end of file
+[Asymmetric]
index 2970076..866d4c5 100644 (file)
@@ -7,6 +7,7 @@
 Symmetric crypto       = Y
 Sym operation chaining = Y
 HW Accelerated         = Y
+Symmetric sessionless  = Y
 
 ;
 ; Supported crypto algorithms of the 'ccp' crypto driver.
@@ -61,4 +62,4 @@ AES GCM (256) = Y
 ;
 ; Supported Asymmetric algorithms of the 'ccp' crypto driver.
 ;
-[Asymmetric]
\ No newline at end of file
+[Asymmetric]
index db427af..118479d 100644 (file)
@@ -28,6 +28,7 @@ RSA PRIV OP KEY QT     =
 Digest encrypted       =
 Asymmetric sessionless =
 CPU crypto             =
+Symmetric sessionless  =
 
 ;
 ; Supported crypto algorithms of a default crypto driver.
index f3d0610..99ded04 100644 (file)
@@ -6,6 +6,7 @@
 [Features]
 Symmetric crypto       = Y
 Sym operation chaining = Y
+Symmetric sessionless  = Y
 
 ;
 ; Supported crypto algorithms of the 'kasumi' crypto driver.
@@ -26,4 +27,4 @@ KASUMI F9 = Y
 ;
 ; Supported Asymmetric algorithms of the 'kasumi' crypto driver.
 ;
-[Asymmetric]
\ No newline at end of file
+[Asymmetric]
index f0ed3ed..4ce4ff1 100644 (file)
@@ -12,6 +12,7 @@ In Place SGL           = Y
 OOP SGL In LB  Out     = Y
 OOP SGL In SGL Out     = Y
 RSA PRIV OP KEY QT     = Y
+Symmetric sessionless  = Y
 
 ;
 ; Supported crypto algorithms of 'octeontx' crypto driver.
index 4693458..e9ce26c 100644 (file)
@@ -12,6 +12,7 @@ In Place SGL           = Y
 OOP SGL In LB  Out     = Y
 OOP SGL In SGL Out     = Y
 RSA PRIV OP KEY QT     = Y
+Symmetric sessionless  = Y
 
 ;
 ; Supported crypto algorithms of 'octeontx2' crypto driver.
index 30ffb11..74bb987 100644 (file)
@@ -12,6 +12,7 @@ OOP LB  In LB  Out     = Y
 Asymmetric crypto      = Y
 RSA PRIV OP KEY EXP    = Y
 RSA PRIV OP KEY QT     = Y
+Symmetric sessionless  = Y
 
 ;
 ; Supported crypto algorithms of the 'openssl' crypto driver.
index ec2daf6..8b971cc 100644 (file)
@@ -6,6 +6,7 @@
 [Features]
 Symmetric crypto       = Y
 Sym operation chaining = Y
+Symmetric sessionless  = Y
 
 ;
 ; Supported crypto algorithms of the 'snow3g' crypto driver.
@@ -26,4 +27,4 @@ SNOW3G UIA2 = Y
 ;
 ; Supported Asymmetric algorithms of the 'snow3g' crypto driver.
 ;
-[Asymmetric]
\ No newline at end of file
+[Asymmetric]
index 9b6a428..f7bff42 100644 (file)
@@ -6,6 +6,7 @@
 [Features]
 Symmetric crypto       = Y
 Sym operation chaining = Y
+Symmetric sessionless  = Y
 
 ;
 ; Supported crypto algorithms of the 'zuc' crypto driver.
index 475d523..d213d05 100644 (file)
@@ -744,7 +744,8 @@ aesni_gcm_create(const char *name,
                        RTE_CRYPTODEV_FF_IN_PLACE_SGL |
                        RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT |
                        RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT |
-                       RTE_CRYPTODEV_FF_SYM_CPU_CRYPTO;
+                       RTE_CRYPTODEV_FF_SYM_CPU_CRYPTO |
+                       RTE_CRYPTODEV_FF_SYM_SESSIONLESS;
 
        /* Check CPU for support for AES instruction set */
        if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AES))
index 8609717..a1d59e8 100644 (file)
@@ -1621,7 +1621,8 @@ cryptodev_aesni_mb_create(const char *name,
        dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
                        RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
                        RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT |
-                       RTE_CRYPTODEV_FF_SYM_CPU_CRYPTO;
+                       RTE_CRYPTODEV_FF_SYM_CPU_CRYPTO |
+                       RTE_CRYPTODEV_FF_SYM_SESSIONLESS;
 
        /* Check CPU for support for AES instruction set */
        if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AES))
index d2b7ab5..8b21277 100644 (file)
@@ -792,7 +792,8 @@ cryptodev_armv8_crypto_create(const char *name,
        dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
                        RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
                        RTE_CRYPTODEV_FF_CPU_NEON |
-                       RTE_CRYPTODEV_FF_CPU_ARM_CE;
+                       RTE_CRYPTODEV_FF_CPU_ARM_CE |
+                       RTE_CRYPTODEV_FF_SYM_SESSIONLESS;
 
        internals = dev->data->dev_private;
 
index f6ea008..000b2f4 100644 (file)
@@ -352,7 +352,8 @@ cryptodev_ccp_create(const char *name,
 
        dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
                        RTE_CRYPTODEV_FF_HW_ACCELERATED |
-                       RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING;
+                       RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
+                       RTE_CRYPTODEV_FF_SYM_SESSIONLESS;
 
        internals = dev->data->dev_private;
 
index d672648..a209212 100644 (file)
@@ -550,7 +550,8 @@ cryptodev_kasumi_create(const char *name,
        dev->enqueue_burst = kasumi_pmd_enqueue_burst;
 
        dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
-                       RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING;
+                       RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
+                       RTE_CRYPTODEV_FF_SYM_SESSIONLESS;
 
        mgr = alloc_mb_mgr(0);
        if (mgr == NULL)
index f11636c..7b0b9d4 100644 (file)
@@ -178,7 +178,8 @@ cryptodev_null_create(const char *name,
 
        dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
                        RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
-                       RTE_CRYPTODEV_FF_IN_PLACE_SGL;
+                       RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+                       RTE_CRYPTODEV_FF_SYM_SESSIONLESS;
 
        internals = dev->data->dev_private;
 
index 120e7fc..3fbf5d5 100644 (file)
@@ -967,7 +967,8 @@ otx_cpt_dev_create(struct rte_cryptodev *c_dev)
                                RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
                                RTE_CRYPTODEV_FF_IN_PLACE_SGL |
                                RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT |
-                               RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT;
+                               RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
+                               RTE_CRYPTODEV_FF_SYM_SESSIONLESS;
                break;
        default:
                /* Feature not supported. Abort */
index 417eda6..7cda077 100644 (file)
@@ -103,7 +103,8 @@ otx2_cpt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
                             RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT |
                             RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
                             RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO |
-                            RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT;
+                            RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT |
+                            RTE_CRYPTODEV_FF_SYM_SESSIONLESS;
 
        return 0;
 
index c294f60..bb9fb87 100644 (file)
@@ -2207,7 +2207,8 @@ cryptodev_openssl_create(const char *name,
                        RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT |
                        RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO |
                        RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP |
-                       RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT;
+                       RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT |
+                       RTE_CRYPTODEV_FF_SYM_SESSIONLESS;
 
        internals = dev->data->dev_private;
 
index 8101eaa..8e82dde 100644 (file)
@@ -562,7 +562,8 @@ cryptodev_snow3g_create(const char *name,
        dev->enqueue_burst = snow3g_pmd_enqueue_burst;
 
        dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
-                       RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING;
+                       RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
+                       RTE_CRYPTODEV_FF_SYM_SESSIONLESS;
 
        mgr = alloc_mb_mgr(0);
        if (mgr == NULL)
index f47a788..17926b4 100644 (file)
@@ -469,7 +469,8 @@ cryptodev_zuc_create(const char *name,
        }
 
        dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
-                       RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING;
+                       RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
+                       RTE_CRYPTODEV_FF_SYM_SESSIONLESS;
 
        mb_mgr = alloc_mb_mgr(0);
        if (mb_mgr == NULL)
index f2ade83..2849b2e 100644 (file)
@@ -497,6 +497,8 @@ rte_cryptodev_get_feature_name(uint64_t flag)
                return "SYM_CPU_CRYPTO";
        case RTE_CRYPTODEV_FF_ASYM_SESSIONLESS:
                return "ASYM_SESSIONLESS";
+       case RTE_CRYPTODEV_FF_SYM_SESSIONLESS:
+               return "SYM_SESSIONLESS";
        default:
                return NULL;
        }
index 437b8a9..f4846d2 100644 (file)
@@ -452,6 +452,8 @@ rte_cryptodev_asym_get_xform_enum(enum rte_crypto_asym_xform_type *xform_enum,
 /**< Support asymmetric session-less operations */
 #define        RTE_CRYPTODEV_FF_SYM_CPU_CRYPTO                 (1ULL << 21)
 /**< Support symmetric cpu-crypto processing */
+#define RTE_CRYPTODEV_FF_SYM_SESSIONLESS               (1ULL << 22)
+/**< Support symmetric session-less operations */
 
 
 /**