]> git.droids-corp.org - dpdk.git/commitdiff
cryptodev: add feature flag for non-byte aligned data
authorAkhil Goyal <akhil.goyal@nxp.com>
Sat, 9 May 2020 23:12:09 +0000 (04:42 +0530)
committerAkhil Goyal <akhil.goyal@nxp.com>
Mon, 11 May 2020 11:17:43 +0000 (13:17 +0200)
Some wireless algos like SNOW, ZUC may support input
data in bits which are not byte aligned. However, not
all PMDs can support this requirement. Hence added a
new feature flag RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA
to identify which all PMDs can support non-byte aligned
data.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
doc/guides/cryptodevs/features/default.ini
doc/guides/cryptodevs/features/kasumi.ini
doc/guides/cryptodevs/features/snow3g.ini
doc/guides/cryptodevs/features/zuc.ini
drivers/crypto/kasumi/rte_kasumi_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 118479db52d97b39b506ae4323c48f3389a2ef96..fb1ddca71ed0ad0971c09e19ad1039f497d00067 100644 (file)
@@ -29,6 +29,7 @@ Digest encrypted       =
 Asymmetric sessionless =
 CPU crypto             =
 Symmetric sessionless  =
+Non-Byte aligned data  =
 
 ;
 ; Supported crypto algorithms of a default crypto driver.
index 99ded0401d38923886e025c08eeffe9e6339c4c6..8380a57655a489ecc051f93bd4c39cd41bbe0eb2 100644 (file)
@@ -7,6 +7,7 @@
 Symmetric crypto       = Y
 Sym operation chaining = Y
 Symmetric sessionless  = Y
+Non-Byte aligned data  = Y
 
 ;
 ; Supported crypto algorithms of the 'kasumi' crypto driver.
index 8b971cc1da106bda16d5a7749c16d477c9263e11..b2caefe3a2e82e4cd423e6c52b9729dd5bdacbd9 100644 (file)
@@ -7,6 +7,7 @@
 Symmetric crypto       = Y
 Sym operation chaining = Y
 Symmetric sessionless  = Y
+Non-Byte aligned data  = Y
 
 ;
 ; Supported crypto algorithms of the 'snow3g' crypto driver.
index f7bff4291ca3c5c6d8269df528c1823e638f61fa..21d074f9b2fd69f8f45abffc6a983bf3b108ab0d 100644 (file)
@@ -7,6 +7,7 @@
 Symmetric crypto       = Y
 Sym operation chaining = Y
 Symmetric sessionless  = Y
+Non-Byte aligned data  = Y
 
 ;
 ; Supported crypto algorithms of the 'zuc' crypto driver.
index a20921249bfc4bc646dda3af0d25ae92eab2cc78..73077e3d9dee3a7a9a4ee9be3bb62bded88c5d02 100644 (file)
@@ -551,6 +551,7 @@ cryptodev_kasumi_create(const char *name,
 
        dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
                        RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
+                       RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA |
                        RTE_CRYPTODEV_FF_SYM_SESSIONLESS;
 
        mgr = alloc_mb_mgr(0);
index 8e82dde55206be0bf5d16fcb98b2befa1fad4c50..c939064d5f6e4e9b135039cbf9675adb24735355 100644 (file)
@@ -563,6 +563,7 @@ cryptodev_snow3g_create(const char *name,
 
        dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
                        RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
+                       RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA |
                        RTE_CRYPTODEV_FF_SYM_SESSIONLESS;
 
        mgr = alloc_mb_mgr(0);
index 17926b4714cbf831a1711450012de3024efdf6b7..45988187355e32fa6cda0e9add6afac915cc43ed 100644 (file)
@@ -470,6 +470,7 @@ cryptodev_zuc_create(const char *name,
 
        dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
                        RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
+                       RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA |
                        RTE_CRYPTODEV_FF_SYM_SESSIONLESS;
 
        mb_mgr = alloc_mb_mgr(0);
index 7693eb69cde93be440c2e4733a463f7ada6be875..f30e3cbff556010c4d571bce7de48eebded2947d 100644 (file)
@@ -500,6 +500,8 @@ rte_cryptodev_get_feature_name(uint64_t flag)
                return "ASYM_SESSIONLESS";
        case RTE_CRYPTODEV_FF_SYM_SESSIONLESS:
                return "SYM_SESSIONLESS";
+       case RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA:
+               return "NON_BYTE_ALIGNED_DATA";
        default:
                return NULL;
        }
index 3dbb5ceb23283ff9034c869b0f840b5ee53c7ad7..257840ea454f24d4b1709e28067008867671e23e 100644 (file)
@@ -456,6 +456,8 @@ rte_cryptodev_asym_get_xform_enum(enum rte_crypto_asym_xform_type *xform_enum,
 /**< Support symmetric cpu-crypto processing */
 #define RTE_CRYPTODEV_FF_SYM_SESSIONLESS               (1ULL << 22)
 /**< Support symmetric session-less operations */
+#define RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA         (1ULL << 23)
+/**< Support operations on data which is not byte aligned */
 
 
 /**