DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] vhost/crypto: fix condition check
@ 2018-04-27 14:06 Fan Zhang
  2018-04-27 14:21 ` Maxime Coquelin
  0 siblings, 1 reply; 3+ messages in thread
From: Fan Zhang @ 2018-04-27 14:06 UTC (permalink / raw)
  To: dev; +Cc: roy.fan.zhang, maxime.coquelin, ferruh.yigit

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

This patch fix final condition check while moving virtqueue
descriptors.

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

diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
index c38eb3bb5..4126c3bc1 100644
--- a/lib/librte_vhost/vhost_crypto.c
+++ b/lib/librte_vhost/vhost_crypto.c
@@ -506,7 +506,7 @@ move_desc(struct vring_desc *head, struct vring_desc **cur_desc,
 		left -= desc->len;
 	}
 
-	if (unlikely(left < 0)) {
+	if (unlikely(left > 0)) {
 		VC_LOG_ERR("Incorrect virtio descriptor");
 		return -1;
 	}
@@ -553,7 +553,7 @@ copy_data(void *dst_data, struct vring_desc *head, struct rte_vhost_memory *mem,
 		left -= to_copy;
 	}
 
-	if (unlikely(left < 0)) {
+	if (unlikely(left > 0)) {
 		VC_LOG_ERR("Incorrect virtio descriptor");
 		return -1;
 	}
-- 
2.13.6

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

* Re: [dpdk-dev] [PATCH] vhost/crypto: fix condition check
  2018-04-27 14:06 [dpdk-dev] [PATCH] vhost/crypto: fix condition check Fan Zhang
@ 2018-04-27 14:21 ` Maxime Coquelin
  2018-04-27 17:43   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Maxime Coquelin @ 2018-04-27 14:21 UTC (permalink / raw)
  To: Fan Zhang, dev; +Cc: ferruh.yigit



On 04/27/2018 04:06 PM, Fan Zhang wrote:
> Fixes: 3bb595ecd682 ("vhost/crypto: add request handler")
> 
> This patch fix final condition check while moving virtqueue
> descriptors.
> 
> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> ---
>   lib/librte_vhost/vhost_crypto.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 

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

Thanks,
Maxime

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

* Re: [dpdk-dev] [PATCH] vhost/crypto: fix condition check
  2018-04-27 14:21 ` Maxime Coquelin
@ 2018-04-27 17:43   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2018-04-27 17:43 UTC (permalink / raw)
  To: Fan Zhang; +Cc: dev, Maxime Coquelin, ferruh.yigit

27/04/2018 16:21, Maxime Coquelin:
> 
> On 04/27/2018 04:06 PM, Fan Zhang wrote:
> > Fixes: 3bb595ecd682 ("vhost/crypto: add request handler")
> > 
> > This patch fix final condition check while moving virtqueue
> > descriptors.
> > 
> > Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> > ---
> >   lib/librte_vhost/vhost_crypto.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> 
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Applied as a hot fix for RC1, thanks

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

end of thread, other threads:[~2018-04-27 17:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-27 14:06 [dpdk-dev] [PATCH] vhost/crypto: fix condition check Fan Zhang
2018-04-27 14:21 ` Maxime Coquelin
2018-04-27 17:43   ` Thomas Monjalon

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