[v2,02/10] cryptodev: add digest encrypted feature flag

Message ID 20190607100608.16212-3-damianx.nowak@intel.com (mailing list archive)
State Superseded, archived
Delegated to: akhil goyal
Headers
Series cryptodev: support encrypted-digest use-cases |

Checks

Context Check Description
ci/Intel-compilation fail Compilation issues
ci/checkpatch success coding style OK

Commit Message

Damian Nowak June 7, 2019, 10:05 a.m. UTC
  Some PMDs can only support digest being
encrypted separately in auth-cipher operations.
Thus it is required to add feature flag in PMD
to reflect if it does support digest-appended
both: digest generation with encryption and
decryption with digest verification.

Signed-off-by: Damian Nowak <damianx.nowak@intel.com>
---
 lib/librte_cryptodev/rte_cryptodev.c | 2 ++
 lib/librte_cryptodev/rte_cryptodev.h | 2 ++
 2 files changed, 4 insertions(+)
  

Comments

Fiona Trahe June 13, 2019, 2:16 p.m. UTC | #1
Hi Damian,

> -----Original Message-----
> From: Nowak, DamianX
> Sent: Friday, June 7, 2019 11:06 AM
> To: dev@dpdk.org
> Cc: Trahe, Fiona <fiona.trahe@intel.com>; Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; Nowak,
> DamianX <damianx.nowak@intel.com>
> Subject: [PATCH v2 02/10] cryptodev: add digest encrypted feature flag
> 
> Some PMDs can only support digest being
> encrypted separately in auth-cipher operations.
> Thus it is required to add feature flag in PMD
> to reflect if it does support digest-appended
> both: digest generation with encryption and
> decryption with digest verification.
> 
> Signed-off-by: Damian Nowak <damianx.nowak@intel.com>
> ---
>  lib/librte_cryptodev/rte_cryptodev.c | 2 ++
>  lib/librte_cryptodev/rte_cryptodev.h | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
> index 00c2cf4..f657192 100644
> --- a/lib/librte_cryptodev/rte_cryptodev.c
> +++ b/lib/librte_cryptodev/rte_cryptodev.c
> @@ -490,6 +490,8 @@ rte_cryptodev_get_feature_name(uint64_t flag)
>  		return "RSA_PRIV_OP_KEY_EXP";
>  	case RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT:
>  		return "RSA_PRIV_OP_KEY_QT";
> +	case RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED:
> +		return "DIGEST_ENCRYPTED";
[Fiona] This feature flag should be added to the matrix here:
http://doc.dpdk.org/guides/cryptodevs/overview.html#supported-feature-flags
  

Patch

diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 00c2cf4..f657192 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -490,6 +490,8 @@  rte_cryptodev_get_feature_name(uint64_t flag)
 		return "RSA_PRIV_OP_KEY_EXP";
 	case RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT:
 		return "RSA_PRIV_OP_KEY_QT";
+	case RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED:
+		return "DIGEST_ENCRYPTED";
 	default:
 		return NULL;
 	}
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 2d4f6d7..c0d406e 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -442,6 +442,8 @@  rte_cryptodev_asym_get_xform_enum(enum rte_crypto_asym_xform_type *xform_enum,
 /**< Support RSA Private Key OP with exponent */
 #define RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT		(1ULL << 18)
 /**< Support RSA Private Key OP with CRT (quintuple) Keys */
+#define RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED		(1ULL << 19)
+/**< Support digest appended auth-cipher operations */
 
 
 /**