DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] crypto/virtio: fix iv offset
@ 2019-04-05 15:31 Fan Zhang
  2019-04-05 15:31 ` Fan Zhang
  2019-04-05 16:04 ` [dpdk-dev] [PATCH v2] " Fan Zhang
  0 siblings, 2 replies; 10+ messages in thread
From: Fan Zhang @ 2019-04-05 15:31 UTC (permalink / raw)
  To: dev; +Cc: akhil.goyal, Fan Zhang, stable

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

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

end of thread, other threads:[~2019-04-17  7:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-05 15:31 [dpdk-dev] [PATCH] crypto/virtio: fix iv offset Fan Zhang
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

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).