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

* [dpdk-dev] [PATCH] crypto/virtio: fix iv offset
  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
  1 sibling, 0 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

* [dpdk-dev] [PATCH v2] crypto/virtio: fix iv offset
  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 ` Fan Zhang
  2019-04-05 16:04   ` Fan Zhang
                     ` (3 more replies)
  1 sibling, 4 replies; 10+ messages in thread
From: Fan Zhang @ 2019-04-05 16:04 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>
---
v2:
  fixed a typo

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

* [dpdk-dev] [PATCH v2] crypto/virtio: fix iv offset
  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
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Fan Zhang @ 2019-04-05 16:04 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>
---
v2:
  fixed a typo

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

* Re: [dpdk-dev] [PATCH v2] crypto/virtio: fix iv offset
  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:57   ` Maxime Coquelin
  3 siblings, 1 reply; 10+ messages in thread
From: Ananyev, Konstantin @ 2019-04-06 12:37 UTC (permalink / raw)
  To: Zhang, Roy Fan, dev; +Cc: akhil.goyal, Zhang, Roy Fan, stable



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Fan Zhang
> Sent: Friday, April 5, 2019 5:04 PM
> To: dev@dpdk.org
> Cc: akhil.goyal@nxp.com; Zhang, Roy Fan <roy.fan.zhang@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH v2] crypto/virtio: fix iv offset
> 
> 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>
> ---
> v2:
>   fixed a typo
> 
>  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..e9a63cb5a 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(
> --

Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

> 2.14.5

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

* Re: [dpdk-dev] [PATCH v2] crypto/virtio: fix iv offset
  2019-04-06 12:37   ` Ananyev, Konstantin
@ 2019-04-06 12:37     ` Ananyev, Konstantin
  0 siblings, 0 replies; 10+ messages in thread
From: Ananyev, Konstantin @ 2019-04-06 12:37 UTC (permalink / raw)
  To: Zhang, Roy Fan, dev; +Cc: akhil.goyal, Zhang, Roy Fan, stable



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Fan Zhang
> Sent: Friday, April 5, 2019 5:04 PM
> To: dev@dpdk.org
> Cc: akhil.goyal@nxp.com; Zhang, Roy Fan <roy.fan.zhang@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH v2] crypto/virtio: fix iv offset
> 
> 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>
> ---
> v2:
>   fixed a typo
> 
>  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..e9a63cb5a 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(
> --

Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

> 2.14.5


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

* Re: [dpdk-dev] [PATCH v2] crypto/virtio: fix iv offset
  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-17  7:14   ` Maxime Coquelin
  2019-04-17  7:14     ` Maxime Coquelin
  2019-04-17  7:57   ` Maxime Coquelin
  3 siblings, 1 reply; 10+ messages in thread
From: Maxime Coquelin @ 2019-04-17  7:14 UTC (permalink / raw)
  To: Fan Zhang, dev; +Cc: akhil.goyal, stable



On 4/5/19 6:04 PM, Fan Zhang wrote:
> 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>
> ---
> v2:
>    fixed a typo
> 
>   drivers/crypto/virtio/virtio_rxtx.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime

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

* Re: [dpdk-dev] [PATCH v2] crypto/virtio: fix iv offset
  2019-04-17  7:14   ` Maxime Coquelin
@ 2019-04-17  7:14     ` Maxime Coquelin
  0 siblings, 0 replies; 10+ messages in thread
From: Maxime Coquelin @ 2019-04-17  7:14 UTC (permalink / raw)
  To: Fan Zhang, dev; +Cc: akhil.goyal, stable



On 4/5/19 6:04 PM, Fan Zhang wrote:
> 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>
> ---
> v2:
>    fixed a typo
> 
>   drivers/crypto/virtio/virtio_rxtx.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime

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

* Re: [dpdk-dev] [PATCH v2] crypto/virtio: fix iv offset
  2019-04-05 16:04 ` [dpdk-dev] [PATCH v2] " Fan Zhang
                     ` (2 preceding siblings ...)
  2019-04-17  7:14   ` Maxime Coquelin
@ 2019-04-17  7:57   ` Maxime Coquelin
  2019-04-17  7:57     ` Maxime Coquelin
  3 siblings, 1 reply; 10+ messages in thread
From: Maxime Coquelin @ 2019-04-17  7:57 UTC (permalink / raw)
  To: Fan Zhang, dev; +Cc: akhil.goyal, stable



On 4/5/19 6:04 PM, Fan Zhang wrote:
> 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>
> ---
> v2:
>    fixed a typo
> 
>   drivers/crypto/virtio/virtio_rxtx.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 

Applied to dpdk-next-virtio/master.

Thanks,
Maxime

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

* Re: [dpdk-dev] [PATCH v2] crypto/virtio: fix iv offset
  2019-04-17  7:57   ` Maxime Coquelin
@ 2019-04-17  7:57     ` Maxime Coquelin
  0 siblings, 0 replies; 10+ messages in thread
From: Maxime Coquelin @ 2019-04-17  7:57 UTC (permalink / raw)
  To: Fan Zhang, dev; +Cc: akhil.goyal, stable



On 4/5/19 6:04 PM, Fan Zhang wrote:
> 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>
> ---
> v2:
>    fixed a typo
> 
>   drivers/crypto/virtio/virtio_rxtx.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 

Applied to dpdk-next-virtio/master.

Thanks,
Maxime

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