patches for DPDK stable branches
 help / color / Atom feed
* [dpdk-stable] [PATCH] app/crypto-perf: fix incorrect input data for AEAD decrypt
@ 2019-11-21 11:14 Archana Muniganti
  2019-11-21 12:43 ` Anoob Joseph
  0 siblings, 1 reply; 3+ messages in thread
From: Archana Muniganti @ 2019-11-21 11:14 UTC (permalink / raw)
  To: akhil.goyal, pablo.de.lara.guarch
  Cc: Archana Muniganti, anoobj, jerinj, dev, stable

In AEAD decrypt(verify mode), test data should point to
cipher text instead of plain text

Fixes: 5b2b0a740fba ("app/crypto-perf: overwrite mbuf when verifying")

Signed-off-by: Archana Muniganti <marchana@marvell.com>
---
 app/test-crypto-perf/cperf_test_verify.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-perf/cperf_test_verify.c
index bbdf37d..833bc9a 100644
--- a/app/test-crypto-perf/cperf_test_verify.c
+++ b/app/test-crypto-perf/cperf_test_verify.c
@@ -203,11 +203,19 @@ struct cperf_op_result {
 {
 	uint32_t segment_sz = options->segment_sz;
 	uint8_t *mbuf_data;
-	uint8_t *test_data =
-			(options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT) ?
+	uint8_t *test_data;
+	uint32_t remaining_bytes = options->max_buffer_size;
+
+	if (options->op_type == CPERF_AEAD) {
+		test_data = (options->aead_op == RTE_CRYPTO_AEAD_OP_ENCRYPT) ?
 					test_vector->plaintext.data :
 					test_vector->ciphertext.data;
-	uint32_t remaining_bytes = options->max_buffer_size;
+	} else {
+		test_data =
+			(options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT) ?
+				test_vector->plaintext.data :
+				test_vector->ciphertext.data;
+	}
 
 	while (remaining_bytes) {
 		mbuf_data = rte_pktmbuf_mtod(mbuf, uint8_t *);
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [PATCH] app/crypto-perf: fix incorrect input data for AEAD decrypt
  2019-11-21 11:14 [dpdk-stable] [PATCH] app/crypto-perf: fix incorrect input data for AEAD decrypt Archana Muniganti
@ 2019-11-21 12:43 ` Anoob Joseph
  2019-11-25 10:18   ` Akhil Goyal
  0 siblings, 1 reply; 3+ messages in thread
From: Anoob Joseph @ 2019-11-21 12:43 UTC (permalink / raw)
  To: Archana Muniganti, akhil.goyal, pablo.de.lara.guarch
  Cc: Archana Muniganti, Jerin Jacob Kollanukkaran, dev, stable

> -----Original Message-----
> From: Archana Muniganti <marchana@marvell.com>
> Sent: Thursday, November 21, 2019 4:44 PM
> To: akhil.goyal@nxp.com; pablo.de.lara.guarch@intel.com
> Cc: Archana Muniganti <marchana@marvell.com>; Anoob Joseph
> <anoobj@marvell.com>; Jerin Jacob Kollanukkaran <jerinj@marvell.com>;
> dev@dpdk.org; stable@dpdk.org
> Subject: [PATCH] app/crypto-perf: fix incorrect input data for AEAD decrypt
> 
> In AEAD decrypt(verify mode), test data should point to cipher text instead of
> plain text
> 
> Fixes: 5b2b0a740fba ("app/crypto-perf: overwrite mbuf when verifying")
> 
> Signed-off-by: Archana Muniganti <marchana@marvell.com>

Acked-by: Anoob Joseph <anoobj@marvell.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [PATCH] app/crypto-perf: fix incorrect input data for AEAD decrypt
  2019-11-21 12:43 ` Anoob Joseph
@ 2019-11-25 10:18   ` Akhil Goyal
  0 siblings, 0 replies; 3+ messages in thread
From: Akhil Goyal @ 2019-11-25 10:18 UTC (permalink / raw)
  To: Anoob Joseph, Archana Muniganti, pablo.de.lara.guarch
  Cc: Archana Muniganti, Jerin Jacob Kollanukkaran, dev, stable

> >
> > In AEAD decrypt(verify mode), test data should point to cipher text instead of
> > plain text
> >
> > Fixes: 5b2b0a740fba ("app/crypto-perf: overwrite mbuf when verifying")
> >
> > Signed-off-by: Archana Muniganti <marchana@marvell.com>
> 
> Acked-by: Anoob Joseph <anoobj@marvell.com>

Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

Applied to dpdk-next-crypto

Thanks.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-21 11:14 [dpdk-stable] [PATCH] app/crypto-perf: fix incorrect input data for AEAD decrypt Archana Muniganti
2019-11-21 12:43 ` Anoob Joseph
2019-11-25 10:18   ` Akhil Goyal

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/ public-inbox