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 85293A0588; Thu, 16 Apr 2020 15:26:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 95B4B1DCB6; Thu, 16 Apr 2020 15:26:15 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 998171DCAD for ; Thu, 16 Apr 2020 15:26:12 +0200 (CEST) IronPort-SDR: 7G7sWHDp8MCr8Va1Svw4YIxc09A+sPksRS32RXZpyB290zYqTUQVnEIOarPB/ec/wacfjugDms 8b37dS2v9+5Q== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2020 06:26:12 -0700 IronPort-SDR: qVc4iRLi9LPEpMMrglT4GFbFgw0Alb3qYt7yheJ1RkeDYJvbsyIartztVigil549zaAglXXkH7 7Bt6uWkDmyyA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,391,1580803200"; d="scan'208";a="244396648" Received: from silpixa00400565.ir.intel.com (HELO silpixa00400565.ger.corp.intel.com) ([10.237.222.249]) by fmsmga007.fm.intel.com with ESMTP; 16 Apr 2020 06:26:09 -0700 From: Pablo de Lara To: declan.doherty@intel.com, ravi1.kumar@amd.com, ruifeng.wang@arm.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 Cc: dev@dpdk.org, akhil.goyal@nxp.com, Pablo de Lara , Adam Dybkowski Date: Thu, 16 Apr 2020 10:25:29 +0100 Message-Id: <20200416092532.1922099-2-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200416092532.1922099-1-pablo.de.lara.guarch@intel.com> References: <1586887459-222433-1-git-send-email-pablo.de.lara.guarch@intel.com> <20200416092532.1922099-1-pablo.de.lara.guarch@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 1/4] cryptodev: add sessionless support feature flag 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" Add feature flag for symmetric sessionless support, so it can be checked by applications. Signed-off-by: Pablo de Lara Acked-by: Adam Dybkowski --- doc/guides/cryptodevs/features/aesni_gcm.ini | 1 + doc/guides/cryptodevs/features/aesni_mb.ini | 1 + doc/guides/cryptodevs/features/armv8.ini | 1 + doc/guides/cryptodevs/features/caam_jr.ini | 2 +- doc/guides/cryptodevs/features/ccp.ini | 3 ++- doc/guides/cryptodevs/features/default.ini | 1 + doc/guides/cryptodevs/features/kasumi.ini | 3 ++- doc/guides/cryptodevs/features/octeontx.ini | 1 + doc/guides/cryptodevs/features/octeontx2.ini | 1 + doc/guides/cryptodevs/features/openssl.ini | 1 + doc/guides/cryptodevs/features/snow3g.ini | 3 ++- doc/guides/cryptodevs/features/zuc.ini | 1 + drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 3 ++- drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 3 ++- drivers/crypto/armv8/rte_armv8_pmd.c | 3 ++- drivers/crypto/ccp/rte_ccp_pmd.c | 3 ++- drivers/crypto/kasumi/rte_kasumi_pmd.c | 3 ++- drivers/crypto/null/null_crypto_pmd.c | 3 ++- drivers/crypto/octeontx/otx_cryptodev_ops.c | 3 ++- drivers/crypto/octeontx2/otx2_cryptodev.c | 3 ++- drivers/crypto/openssl/rte_openssl_pmd.c | 3 ++- drivers/crypto/snow3g/rte_snow3g_pmd.c | 3 ++- drivers/crypto/zuc/rte_zuc_pmd.c | 3 ++- lib/librte_cryptodev/rte_cryptodev.c | 2 ++ lib/librte_cryptodev/rte_cryptodev.h | 2 ++ 25 files changed, 41 insertions(+), 15 deletions(-) diff --git a/doc/guides/cryptodevs/features/aesni_gcm.ini b/doc/guides/cryptodevs/features/aesni_gcm.ini index 949d6a088..c59229866 100644 --- a/doc/guides/cryptodevs/features/aesni_gcm.ini +++ b/doc/guides/cryptodevs/features/aesni_gcm.ini @@ -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. ; diff --git a/doc/guides/cryptodevs/features/aesni_mb.ini b/doc/guides/cryptodevs/features/aesni_mb.ini index ee6a07460..6be00bc61 100644 --- a/doc/guides/cryptodevs/features/aesni_mb.ini +++ b/doc/guides/cryptodevs/features/aesni_mb.ini @@ -12,6 +12,7 @@ CPU AVX2 = Y CPU AVX512 = Y CPU AESNI = Y OOP LB In LB Out = Y +Symmetric sessionless = Y ; ; Supported crypto algorithms of the 'aesni_mb' crypto driver. diff --git a/doc/guides/cryptodevs/features/armv8.ini b/doc/guides/cryptodevs/features/armv8.ini index e588f9021..beb40c057 100644 --- a/doc/guides/cryptodevs/features/armv8.ini +++ b/doc/guides/cryptodevs/features/armv8.ini @@ -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. diff --git a/doc/guides/cryptodevs/features/caam_jr.ini b/doc/guides/cryptodevs/features/caam_jr.ini index c64bd35da..8d55cdb6c 100644 --- a/doc/guides/cryptodevs/features/caam_jr.ini +++ b/doc/guides/cryptodevs/features/caam_jr.ini @@ -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] diff --git a/doc/guides/cryptodevs/features/ccp.ini b/doc/guides/cryptodevs/features/ccp.ini index 2970076b8..866d4c52e 100644 --- a/doc/guides/cryptodevs/features/ccp.ini +++ b/doc/guides/cryptodevs/features/ccp.ini @@ -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] diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini index db427af28..118479db5 100644 --- a/doc/guides/cryptodevs/features/default.ini +++ b/doc/guides/cryptodevs/features/default.ini @@ -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. diff --git a/doc/guides/cryptodevs/features/kasumi.ini b/doc/guides/cryptodevs/features/kasumi.ini index f3d061009..99ded0401 100644 --- a/doc/guides/cryptodevs/features/kasumi.ini +++ b/doc/guides/cryptodevs/features/kasumi.ini @@ -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] diff --git a/doc/guides/cryptodevs/features/octeontx.ini b/doc/guides/cryptodevs/features/octeontx.ini index f0ed3ed78..4ce4ff169 100644 --- a/doc/guides/cryptodevs/features/octeontx.ini +++ b/doc/guides/cryptodevs/features/octeontx.ini @@ -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. diff --git a/doc/guides/cryptodevs/features/octeontx2.ini b/doc/guides/cryptodevs/features/octeontx2.ini index 469345886..e9ce26cfe 100644 --- a/doc/guides/cryptodevs/features/octeontx2.ini +++ b/doc/guides/cryptodevs/features/octeontx2.ini @@ -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. diff --git a/doc/guides/cryptodevs/features/openssl.ini b/doc/guides/cryptodevs/features/openssl.ini index 30ffb111d..74bb987ec 100644 --- a/doc/guides/cryptodevs/features/openssl.ini +++ b/doc/guides/cryptodevs/features/openssl.ini @@ -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. diff --git a/doc/guides/cryptodevs/features/snow3g.ini b/doc/guides/cryptodevs/features/snow3g.ini index ec2daf6c6..8b971cc1d 100644 --- a/doc/guides/cryptodevs/features/snow3g.ini +++ b/doc/guides/cryptodevs/features/snow3g.ini @@ -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] diff --git a/doc/guides/cryptodevs/features/zuc.ini b/doc/guides/cryptodevs/features/zuc.ini index 9b6a4287e..f7bff4291 100644 --- a/doc/guides/cryptodevs/features/zuc.ini +++ b/doc/guides/cryptodevs/features/zuc.ini @@ -6,6 +6,7 @@ [Features] Symmetric crypto = Y Sym operation chaining = Y +Symmetric sessionless = Y ; ; Supported crypto algorithms of the 'zuc' crypto driver. diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c index a1caab993..2ca3faff0 100644 --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c @@ -742,7 +742,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)) diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c index 33f416745..14b8ba0eb 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c @@ -1276,7 +1276,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_OOP_LB_IN_LB_OUT | + RTE_CRYPTODEV_FF_SYM_SESSIONLESS; /* Check CPU for support for AES instruction set */ if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AES)) diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c index d2b7ab5e0..8b212772f 100644 --- a/drivers/crypto/armv8/rte_armv8_pmd.c +++ b/drivers/crypto/armv8/rte_armv8_pmd.c @@ -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; diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c index f6ea00844..000b2f4fe 100644 --- a/drivers/crypto/ccp/rte_ccp_pmd.c +++ b/drivers/crypto/ccp/rte_ccp_pmd.c @@ -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; diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c index baad5b4e7..8d2b44267 100644 --- a/drivers/crypto/kasumi/rte_kasumi_pmd.c +++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c @@ -549,7 +549,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) diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c index f11636c5f..7b0b9d42b 100644 --- a/drivers/crypto/null/null_crypto_pmd.c +++ b/drivers/crypto/null/null_crypto_pmd.c @@ -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; diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c b/drivers/crypto/octeontx/otx_cryptodev_ops.c index 51520e753..c2fb5d608 100644 --- a/drivers/crypto/octeontx/otx_cryptodev_ops.c +++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c @@ -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 */ diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.c b/drivers/crypto/octeontx2/otx2_cryptodev.c index 417eda6de..7cda077e1 100644 --- a/drivers/crypto/octeontx2/otx2_cryptodev.c +++ b/drivers/crypto/octeontx2/otx2_cryptodev.c @@ -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; diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c index c295dd2ef..4ce0d6055 100644 --- a/drivers/crypto/openssl/rte_openssl_pmd.c +++ b/drivers/crypto/openssl/rte_openssl_pmd.c @@ -2206,7 +2206,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; diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c index d72112b5f..787efa8a6 100644 --- a/drivers/crypto/snow3g/rte_snow3g_pmd.c +++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c @@ -561,7 +561,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) diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c index 9e06ab7c9..160bd93fc 100644 --- a/drivers/crypto/zuc/rte_zuc_pmd.c +++ b/drivers/crypto/zuc/rte_zuc_pmd.c @@ -468,7 +468,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) diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c index f2ade83d3..2849b2e7d 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -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; } diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h index 437b8a9b3..f4846d2a7 100644 --- a/lib/librte_cryptodev/rte_cryptodev.h +++ b/lib/librte_cryptodev/rte_cryptodev.h @@ -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 */ /** -- 2.25.2