From: Fan Zhang <roy.fan.zhang@intel.com>
To: dev@dpdk.org
Cc: akhil.goyal@nxp.com, Fan Zhang <roy.fan.zhang@intel.com>,
stable@dpdk.org
Subject: [dpdk-dev] [PATCH] crypto/virtio: fix iv offset
Date: Fri, 5 Apr 2019 16:31:12 +0100 [thread overview]
Message-ID: <20190405153112.60248-1-roy.fan.zhang@intel.com> (raw)
Message-ID: <20190405153112.O3Sf5pGgwBXBUmi1R2XGivmc3wDf_LgjWpPbLXiujsg@z> (raw)
This patch fixes the incorrect iv offset calculation.
Fixes: b063e843fa03 ("crypto/virtio: fix IV physical address")
Cc: stable@dpdk.org
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---
drivers/crypto/virtio/virtio_rxtx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/virtio/virtio_rxtx.c b/drivers/crypto/virtio/virtio_rxtx.c
index e32a1ecd6..dcb0055b4 100644
--- a/drivers/crypto/virtio/virtio_rxtx.c
+++ b/drivers/crypto/virtio/virtio_rxtx.c
@@ -203,8 +203,8 @@ virtqueue_crypto_sym_enqueue_xmit(
uint16_t req_data_len = sizeof(struct virtio_crypto_op_data_req);
uint32_t indirect_vring_addr_offset = req_data_len +
sizeof(struct virtio_crypto_inhdr);
- uint32_t indirect_iv_addr_offset = indirect_vring_addr_offset +
- sizeof(struct vring_desc) * NUM_ENTRY_VIRTIO_CRYPTO_OP;
+ uint32_t indirect_iv_addr_offset =
+ offsetof(struct virtio_crypto_op_cookie *, iv);
struct rte_crypto_sym_op *sym_op = cop->sym;
struct virtio_crypto_session *session =
(struct virtio_crypto_session *)get_sym_session_private_data(
--
2.14.5
next reply other threads:[~2019-04-05 15:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-05 15:31 Fan Zhang [this message]
2019-04-05 15:31 ` Fan Zhang
2019-04-05 16:04 ` [dpdk-dev] [PATCH v2] " Fan Zhang
2019-04-05 16:04 ` Fan Zhang
2019-04-06 12:37 ` Ananyev, Konstantin
2019-04-06 12:37 ` Ananyev, Konstantin
2019-04-17 7:14 ` Maxime Coquelin
2019-04-17 7:14 ` Maxime Coquelin
2019-04-17 7:57 ` Maxime Coquelin
2019-04-17 7:57 ` Maxime Coquelin
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=20190405153112.60248-1-roy.fan.zhang@intel.com \
--to=roy.fan.zhang@intel.com \
--cc=akhil.goyal@nxp.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
/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).