crypto/openssl: fix CMAC auth context update

Message ID 20241129202023.1203341-1-wathsala.vithanage@arm.com (mailing list archive)
State Accepted
Delegated to: akhil goyal
Headers
Series crypto/openssl: fix CMAC auth context update |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-marvell-Functional success Functional Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-amd64-testing warning Testing issues
ci/iol-sample-apps-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS

Commit Message

Wathsala Vithanage Nov. 29, 2024, 8:20 p.m. UTC
This patch removes an unnecessary cleanup of the shared CMAC context at
the end of the CMAC authentication function, which causes subsequent
calls to it to fail.

Fixes: 17d5bc6135af ("crypto/openssl: make per-QP auth context clones")
Cc: stable@dpdk.org

Signed-off-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
Reviewed-by: Jack Bond-Preston <jack.bond-preston@foss.arm.com>

---
 drivers/crypto/openssl/rte_openssl_pmd.c | 3 ---
 1 file changed, 3 deletions(-)

--
2.43.0
  

Comments

Hemant Agrawal Dec. 5, 2024, 11:33 a.m. UTC | #1
> This patch removes an unnecessary cleanup of the shared CMAC context at
> the end of the CMAC authentication function, which causes subsequent calls
> to it to fail.
> 
> Fixes: 17d5bc6135af ("crypto/openssl: make per-QP auth context clones")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
> Reviewed-by: Jack Bond-Preston <jack.bond-preston@foss.arm.com>

Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
  
Akhil Goyal Jan. 8, 2025, 10:31 a.m. UTC | #2
> > This patch removes an unnecessary cleanup of the shared CMAC context at
> > the end of the CMAC authentication function, which causes subsequent calls
> > to it to fail.
> >
> > Fixes: 17d5bc6135af ("crypto/openssl: make per-QP auth context clones")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
> > Reviewed-by: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
> 
> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

Applied to dpdk-next-crypto
Thanks.
  

Patch

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index d2cf20c059..b090611bd0 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1595,9 +1595,6 @@  process_openssl_auth_cmac(struct rte_mbuf *mbuf_src, uint8_t *dst, int offset,
 process_auth_final:
 	if (CMAC_Final(ctx, dst, (size_t *)&dstlen) != 1)
 		goto process_auth_err;
-
-	CMAC_CTX_cleanup(ctx);
-
 	return 0;

 process_auth_err: