crypto/ipsec_mb: fix zuc256 maximum tag length
PATCH 1/1 crypto/ipsec_mb: fix zuc256 maximum tag length
The AESNI_MB PMD supports 8 and 16 byte tag lengths for ZUC256 when intel-ipsec-mb version is 1.3 or newer.
The conditional check to enable these tag lengths had the incorrect operator, which enabled 8 and 16 byte tag lengths for versions below 1.2, which is not supported.
--- drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 2 +- drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/crypto/ipsec_mb/pmd_aesni_mb.c +1 -1
@@ -199,7 +199,7 @@ aesni_mb_set_session_auth_parameters(const IMB_MGR *mb_mgr, } }else if (xform->auth.key.length ==32 ) { sess->auth.algo =IMB_AUTH_ZUC256_EIA3_BITLEN ; -#if IMB_VERSION (1 ,2 ,0 ) >IMB_VERSION_NUM +#if IMB_VERSION (1 ,2 ,0 ) <IMB_VERSION_NUM if (sess->auth.req_digest_len !=4 && sess->auth.req_digest_len !=8 && sess->auth.req_digest_len !=16 ) {
drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h +1 -1
@@ -566,7 +566,7 @@ static const struct rte_cryptodev_capabilities aesni_mb_capabilities[] = { }, .digest_size = { .min = 4, -#if IMB_VERSION (1 ,2 ,0 ) >IMB_VERSION_NUM +#if IMB_VERSION (1 ,2 ,0 ) <IMB_VERSION_NUM .max = 16, .increment = 4#else
Signature · 1 line
2.25.1
Hi Ciara,
Quoted 53 lines
-----Original Message-----
From: Ciara Power <[email protected]>
Sent: Tuesday 31 January 2023 17:20
To: Ji, Kai <[email protected]>; De Lara Guarch, Pablo <[email protected]>
Cc: [email protected]; Power, Ciara <[email protected]>
Subject: [PATCH]crypto/ipsec_mb: fix zuc256 maximum tag lengthThe
AESNI_MBPMD supports 8 and 16 byte tag lengths for ZUC256 when intel-ipsec-mb version is 1.3 or newer.
The conditional check to enable these tag lengths had the incorrect operator, which enabled 8 and 16 byte tag lengths for versions below 1.2, which is not supported.Fixes 7babda4316f9 ("crypto/ipsec_mb: support all tag sizes for ZUC-EIA3-256")
Cc: [email protected]Signed-off-by Ciara Power <[email protected]>--- drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 2 +- drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/crypto/ipsec_mb/pmd_aesni_mb.c +1
-1@@ -199,7 +199,7 @@ aesni_mb_set_session_auth_parameters(const IMB_MGR *mb_mgr, } }else if (xform->auth.key.length ==32 ) { sess->auth.algo =IMB_AUTH_ZUC256_EIA3_BITLEN ; -#if IMB_VERSION (1 ,2 ,0 ) >IMB_VERSION_NUM +#if IMB_VERSION (1 ,2 ,0 ) <IMB_VERSION_NUM if (sess->auth.req_digest_len != 4 && sess->auth.req_digest_len != 8 &&drivers/crypto/ipsec_mb/pmd_aesni_mb.c +0
-0sess->auth.req_digest_len != 16) {drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h +1
-1@@ -566,7 +566,7 @@ static const struct rte_cryptodev_capabilities aesni_mb_capabilities[] = { }, .digest_size = { .min =4 , -#if IMB_VERSION(1, 2, 0) > IMB_VERSION_NUM +#if IMB_VERSION(1, 2, 0) < IMB_VERSION_NUM .max =16 , .increment = 4
Quoted 3 lines
#else
--
2.25.1
Akhil Goyal
AppliedQuoted 7 lines
Quoted 7 lines
The
AESNI_MBPMD supports 8 and 16 byte tag lengths for ZUC256 when intel-ipsec-mb version is 1.3 or newer.
The conditional check to enable these tag lengths had the incorrect operator, which enabled 8 and 16 byte tag lengths for versions below 1.2, which is not supported.
Quoted 6 lines
Quoted 5 lines
Fixes 7babda4316f9 ("crypto/ipsec_mb: support all tag sizes for ZUC-EIA3-256")
Cc: [email protected]Signed-off-by Ciara Power <[email protected]>Reviewed-by Brian Dooley <[email protected]>
Applied to dpdk-next-crypto
Thanks.
Quoted 10 lines
Subject: RE: [PATCH]
crypto/ipsec_mb: fix zuc256 maximum tag lengthQuoted 4 lines
Quoted 4 lines
The
AESNI_MBPMD supports 8 and 16 byte tag lengths for ZUC256 when intel-ipsec-mb version is 1.3 or newer.
The conditional check to enable these tag lengths had the incorrectoperator,
Quoted 3 lines
Quoted 3 lines
which enabled 8 and 16 byte tag lengths for versions below 1.2, which is not supported.
Quoted 8 lines
Quoted 6 lines
Quoted 5 lines
Fixes 7babda4316f9 ("crypto/ipsec_mb: support all tag sizes for ZUC-EIA3-256")
Cc: [email protected]Signed-off-by Ciara Power <[email protected]>Reviewed-by Brian Dooley <[email protected]>Applied to dpdk-next-crypto