[dpdk-dev,3/3] cryptodev: reorder auth transform

Message ID 20170717082953.74995-3-pablo.de.lara.guarch@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Pablo de Lara Guarch
Headers

Checks

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

Commit Message

De Lara Guarch, Pablo July 17, 2017, 8:29 a.m. UTC
  IV was positioned differently in authentication
transform structure, compared to the other two
transforms (cipher and AEAD).
To keep consistency, digest length is moved to
the end of the transform.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 lib/librte_cryptodev/rte_crypto_sym.h | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
  

Comments

Fiona Trahe July 18, 2017, 8:19 a.m. UTC | #1
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Monday, July 17, 2017 9:30 AM
> To: Doherty, Declan <declan.doherty@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Subject: [dpdk-dev] [PATCH 3/3] cryptodev: reorder auth transform
> 
> IV was positioned differently in authentication
> transform structure, compared to the other two
> transforms (cipher and AEAD).
> To keep consistency, digest length is moved to
> the end of the transform.
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
  
De Lara Guarch, Pablo July 18, 2017, 1:49 p.m. UTC | #2
> -----Original Message-----
> From: Trahe, Fiona
> Sent: Tuesday, July 18, 2017 9:20 AM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Doherty,
> Declan <declan.doherty@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>
> Subject: RE: [dpdk-dev] [PATCH 3/3] cryptodev: reorder auth transform
> 
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> > Sent: Monday, July 17, 2017 9:30 AM
> > To: Doherty, Declan <declan.doherty@intel.com>
> > Cc: dev@dpdk.org; De Lara Guarch, Pablo
> > <pablo.de.lara.guarch@intel.com>
> > Subject: [dpdk-dev] [PATCH 3/3] cryptodev: reorder auth transform
> >
> > IV was positioned differently in authentication transform structure,
> > compared to the other two transforms (cipher and AEAD).
> > To keep consistency, digest length is moved to the end of the
> > transform.
> >
> > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> Acked-by: Fiona Trahe <fiona.trahe@intel.com>

Applied to dpdk-next-crypto.

Pablo
  

Patch

diff --git a/lib/librte_cryptodev/rte_crypto_sym.h b/lib/librte_cryptodev/rte_crypto_sym.h
index ea58cef..58a33b8 100644
--- a/lib/librte_cryptodev/rte_crypto_sym.h
+++ b/lib/librte_cryptodev/rte_crypto_sym.h
@@ -315,17 +315,6 @@  struct rte_crypto_auth_xform {
 	 * (for example RFC 2104, FIPS 198a).
 	 */
 
-	uint16_t digest_length;
-	/**< Length of the digest to be returned. If the verify option is set,
-	 * this specifies the length of the digest to be compared for the
-	 * session.
-	 *
-	 * It is the caller's responsibility to ensure that the
-	 * digest length is compliant with the hash algorithm being used.
-	 * If the value is less than the maximum length allowed by the hash,
-	 * the result shall be truncated.
-	 */
-
 	struct {
 		uint16_t offset;
 		/**< Starting point for Initialisation Vector or Counter,
@@ -353,6 +342,17 @@  struct rte_crypto_auth_xform {
 		 *
 		 */
 	} iv;	/**< Initialisation vector parameters */
+
+	uint16_t digest_length;
+	/**< Length of the digest to be returned. If the verify option is set,
+	 * this specifies the length of the digest to be compared for the
+	 * session.
+	 *
+	 * It is the caller's responsibility to ensure that the
+	 * digest length is compliant with the hash algorithm being used.
+	 * If the value is less than the maximum length allowed by the hash,
+	 * the result shall be truncated.
+	 */
 };