vhost/crypto: fix condition check
PATCH 1/1 vhost/crypto: fix condition check
Fixes 3bb595ecd682 ("vhost/crypto: add request handler")
This patch fix final condition check while moving virtqueue descriptors.
Signed-off-by Fan Zhang <[email protected]>
--- lib/librte_vhost/vhost_crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
lib/librte_vhost/vhost_crypto.c +2 -2
@@ -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 ; }
Signature · 1 line
2.13.6
Quoted 10 lines · Fan Zhang
Fixes 3bb595ecd682 ("vhost/crypto: add request handler")This patch fix final condition check while moving virtqueue descriptors.
Signed-off-by Fan Zhang <[email protected]>--- lib/librte_vhost/vhost_crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by Maxime Coquelin <[email protected]>
Thanks,
Maxime
Thomas Monjalon
Applied27/04/2018 16:21, Maxime Coquelin:
Quoted 7 lines · Fan Zhang
Quoted 5 lines
Fixes 3bb595ecd682 ("vhost/crypto: add request handler")This patch fix final condition check while moving virtqueue descriptors.
Quoted 7 lines
Quoted 5 lines
Signed-off-by Fan Zhang <[email protected]>--- lib/librte_vhost/vhost_crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)Reviewed-by Maxime Coquelin <[email protected]>
Applied as a hot fix for RC1, thanks