From ed06ea24dc419a55fd5e9a1601f1144434360eda Mon Sep 17 00:00:00 2001 From: Maxime Coquelin Date: Fri, 15 Jun 2018 15:48:46 +0200 Subject: [PATCH] vhost: fix missing increment of log cache count The log_cache_nb_elem was never incremented, resulting in all dirty pages to be missed during live migration. Fixes: c16915b87109 ("vhost: improve dirty pages logging performance") Cc: stable@dpdk.org Reported-by: Peng He Signed-off-by: Maxime Coquelin Acked-by: Ilya Maximets Reviewed-by: Tiwei Bie (cherry picked from commit 511b413bbcbd711dcf582485a72213fa90595cbe) --- lib/librte_vhost/vhost.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index e0ab65e0c..429b974db 100644 --- a/lib/librte_vhost/vhost.h +++ b/lib/librte_vhost/vhost.h @@ -387,6 +387,7 @@ vhost_log_cache_page(struct virtio_net *dev, struct vhost_virtqueue *vq, vq->log_cache[i].offset = offset; vq->log_cache[i].val = (1UL << bit_nr); + vq->log_cache_nb_elem++; } static __rte_always_inline void -- 2.17.1