From: Ankur Dwivedi <adwivedi@marvell.com>
To: <dev@dpdk.org>
Cc: <declan.doherty@intel.com>, <pablo.de.lara.guarch@intel.com>,
<akhil.goyal@nxp.com>, <anoobj@marvell.com>,
Ankur Dwivedi <adwivedi@marvell.com>
Subject: [dpdk-dev] [PATCH] app/test: set null cipher iv length to zero
Date: Wed, 6 May 2020 15:07:26 +0530 [thread overview]
Message-ID: <1588757846-14349-1-git-send-email-adwivedi@marvell.com> (raw)
For null cipher the iv length should be set to zero.
Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
---
app/test/test_cryptodev_blockcipher.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/test/test_cryptodev_blockcipher.c b/app/test/test_cryptodev_blockcipher.c
index 473dad9..909b615 100644
--- a/app/test/test_cryptodev_blockcipher.c
+++ b/app/test/test_cryptodev_blockcipher.c
@@ -379,7 +379,11 @@
cipher_xform->cipher.key.data = cipher_key;
cipher_xform->cipher.key.length = tdata->cipher_key.len;
cipher_xform->cipher.iv.offset = IV_OFFSET;
- cipher_xform->cipher.iv.length = tdata->iv.len;
+
+ if (tdata->crypto_algo == RTE_CRYPTO_CIPHER_NULL)
+ cipher_xform->cipher.iv.length = 0;
+ else
+ cipher_xform->cipher.iv.length = tdata->iv.len;
sym_op->cipher.data.offset = tdata->cipher_offset;
sym_op->cipher.data.length = tdata->ciphertext.len -
--
1.9.3
next reply other threads:[~2020-05-06 9:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-06 9:37 Ankur Dwivedi [this message]
2020-05-07 5:11 ` Anoob Joseph
2020-05-07 10:37 ` Trahe, Fiona
2020-05-09 22:00 ` Akhil Goyal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1588757846-14349-1-git-send-email-adwivedi@marvell.com \
--to=adwivedi@marvell.com \
--cc=akhil.goyal@nxp.com \
--cc=anoobj@marvell.com \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=pablo.de.lara.guarch@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).