From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id EBB21A04AE; Tue, 5 May 2020 00:19:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BC8D71D587; Tue, 5 May 2020 00:19:24 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id A911E1D585 for ; Tue, 5 May 2020 00:19:23 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 4038C2004C1; Tue, 5 May 2020 00:19:23 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 1F99C2003DD; Tue, 5 May 2020 00:19:17 +0200 (CEST) Received: from GDB1.ap.freescale.net (gdb1.ap.freescale.net [10.232.132.179]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 52DBC402A8; Tue, 5 May 2020 06:19:09 +0800 (SGT) From: Akhil Goyal To: dev@dpdk.org Cc: Ruifeng.Wang@arm.com, declan.doherty@intel.com, asomalap@amd.com, anoobj@marvell.com, roy.fan.zhang@intel.com, fiona.trahe@intel.com, tdu@semihalf.com, rnagadheeraj@marvell.com, adwivedi@marvell.com, G.Singh@nxp.com, hemant.agrawal@nxp.com, jianjay.zhou@huawei.com, pablo.de.lara.guarch@intel.com, Akhil Goyal Date: Tue, 5 May 2020 03:28:03 +0530 Message-Id: <20200504215811.15951-2-akhil.goyal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200504215811.15951-1-akhil.goyal@nxp.com> References: <20200504215811.15951-1-akhil.goyal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 1/9] cryptodev: add feature flag for non-byte aligned data X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- doc/guides/cryptodevs/features/default.ini | 1 + doc/guides/cryptodevs/features/kasumi.ini | 1 + doc/guides/cryptodevs/features/snow3g.ini | 1 + doc/guides/cryptodevs/features/zuc.ini | 1 + drivers/crypto/kasumi/rte_kasumi_pmd.c | 1 + drivers/crypto/snow3g/rte_snow3g_pmd.c | 1 + drivers/crypto/zuc/rte_zuc_pmd.c | 1 + lib/librte_cryptodev/rte_cryptodev.c | 2 ++ lib/librte_cryptodev/rte_cryptodev.h | 2 ++ 9 files changed, 11 insertions(+) diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini index 118479db5..fb1ddca71 100644 --- a/doc/guides/cryptodevs/features/default.ini +++ b/doc/guides/cryptodevs/features/default.ini @@ -29,6 +29,7 @@ Digest encrypted = Asymmetric sessionless = CPU crypto = Symmetric sessionless = +Non-Byte aligned data = ; ; Supported crypto algorithms of a default crypto driver. diff --git a/doc/guides/cryptodevs/features/kasumi.ini b/doc/guides/cryptodevs/features/kasumi.ini index 99ded0401..8380a5765 100644 --- a/doc/guides/cryptodevs/features/kasumi.ini +++ b/doc/guides/cryptodevs/features/kasumi.ini @@ -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. diff --git a/doc/guides/cryptodevs/features/snow3g.ini b/doc/guides/cryptodevs/features/snow3g.ini index 8b971cc1d..b2caefe3a 100644 --- a/doc/guides/cryptodevs/features/snow3g.ini +++ b/doc/guides/cryptodevs/features/snow3g.ini @@ -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. diff --git a/doc/guides/cryptodevs/features/zuc.ini b/doc/guides/cryptodevs/features/zuc.ini index f7bff4291..21d074f9b 100644 --- a/doc/guides/cryptodevs/features/zuc.ini +++ b/doc/guides/cryptodevs/features/zuc.ini @@ -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. diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c index a20921249..73077e3d9 100644 --- a/drivers/crypto/kasumi/rte_kasumi_pmd.c +++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c @@ -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); diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c index 8e82dde55..c939064d5 100644 --- a/drivers/crypto/snow3g/rte_snow3g_pmd.c +++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c @@ -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); diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c index 17926b471..459881873 100644 --- a/drivers/crypto/zuc/rte_zuc_pmd.c +++ b/drivers/crypto/zuc/rte_zuc_pmd.c @@ -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); diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c index 7693eb69c..f30e3cbff 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -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; } diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h index 3dbb5ceb2..257840ea4 100644 --- a/lib/librte_cryptodev/rte_cryptodev.h +++ b/lib/librte_cryptodev/rte_cryptodev.h @@ -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 */ /** -- 2.17.1