[dpdk-dev] vhost/crypto: fix descriptor move

Message ID 20180509140839.85818-1-roy.fan.zhang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Maxime Coquelin
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Fan Zhang May 9, 2018, 2:08 p.m. UTC
  This patch fixes the redundant descriptor move in the copy mode
of vhost crypto. Originally the redundant descriptor move will
cause the message parsing error.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 lib/librte_vhost/vhost_crypto.c | 5 -----
 1 file changed, 5 deletions(-)
  

Comments

Maxime Coquelin May 16, 2018, 6:11 a.m. UTC | #1
Hi Fan,

On 05/09/2018 04:08 PM, Fan Zhang wrote:
> This patch fixes the redundant descriptor move in the copy mode
> of vhost crypto. Originally the redundant descriptor move will
> cause the message parsing error.

As it is a fix, we need to specify which commit it fixes.
In this case it is:

Fixes: 3bb595ecd682 ("vhost/crypto: add request handler")

I'll add it when applying, no need to resubmit.

> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> ---
>   lib/librte_vhost/vhost_crypto.c | 5 -----
>   1 file changed, 5 deletions(-)


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

Thanks,
Maxime
  
Maxime Coquelin May 16, 2018, 10:54 a.m. UTC | #2
On 05/09/2018 04:08 PM, Fan Zhang wrote:
> This patch fixes the redundant descriptor move in the copy mode
> of vhost crypto. Originally the redundant descriptor move will
> cause the message parsing error.
> 
> Signed-off-by: Fan Zhang<roy.fan.zhang@intel.com>
> ---
>   lib/librte_vhost/vhost_crypto.c | 5 -----
>   1 file changed, 5 deletions(-)

Applied to dpdk-next-virtio.

Thanks,
Maxime
  

Patch

diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
index 04ff8cd48..4c256284e 100644
--- a/lib/librte_vhost/vhost_crypto.c
+++ b/lib/librte_vhost/vhost_crypto.c
@@ -853,11 +853,6 @@  prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
 		op->sym->auth.digest.data = digest_addr;
 		op->sym->auth.digest.phys_addr = rte_pktmbuf_iova_offset(m_dst,
 				digest_offset);
-		if (unlikely(move_desc(head, &desc,
-				chain->para.hash_result_len) < 0)) {
-			ret = VIRTIO_CRYPTO_ERR;
-			goto error_exit;
-		}
 		break;
 	default:
 		ret = VIRTIO_CRYPTO_BADMSG;