crypto/virtio: fix iv offset
Subsystems (3)
PATCH 1/1 crypto/virtio: fix iv offset
This patch fixes the incorrect iv offset calculation.
--- drivers/crypto/virtio/virtio_rxtx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/crypto/virtio/virtio_rxtx.c +2 -2
@@ -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(
Signature · 1 line
2.14.5
PATCH v2 1/1 crypto/virtio: fix iv offset
This patch fixes the incorrect iv offset calculation.
---
v2:
fixed a typo
drivers/crypto/virtio/virtio_rxtx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/crypto/virtio/virtio_rxtx.c +2 -2
@@ -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(
Signature · 1 line
2.14.5
Quoted 28 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Fan Zhang
Sent: Friday, April 5, 2019 5:04 PM
To: [email protected]
Cc: [email protected]; Zhang, Roy Fan <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH v2]crypto/virtio: fix iv offsetThis patch fixes the incorrect iv offset calculation.
Fixes b063e843fa03 ("crypto/virtio: fix IV physical address")Signed-off-by Fan Zhang <[email protected]>---
v2:
fixed a typodrivers/crypto/virtio/virtio_rxtx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/crypto/virtio/virtio_rxtx.c +0
-0@@ -203,8 +203,8 @@ virtqueue_crypto_sym_enqueue_xmit(uint16_t req_data_len =sizeof (struct virtio_crypto_op_data_req );
drivers/crypto/virtio/virtio_rxtx.c virtqueue_crypto_sym_enqueue_xmit(
Quoted 10 lines
drivers/crypto/virtio/virtio_rxtx.c +2
-3uint32_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( --
Quoted 1 line
2.14.5
Quoted 5 lines · Fan Zhang
This patch fixes the incorrect iv offset calculation.
Fixes b063e843fa03 ("crypto/virtio: fix IV physical address")
Quoted 7 lines
Signed-off-by Fan Zhang <[email protected]>---
v2:
fixed a typodrivers/crypto/virtio/virtio_rxtx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Thanks,
Maxime
Maxime Coquelin
AppliedQuoted 5 lines · Fan Zhang
This patch fixes the incorrect iv offset calculation.
Fixes b063e843fa03 ("crypto/virtio: fix IV physical address")
Quoted 8 lines
Signed-off-by Fan Zhang <[email protected]>---
v2:
fixed a typodrivers/crypto/virtio/virtio_rxtx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to dpdk-next-virtio/master.
Thanks,
Maxime