vhost: fix missing increment of log cache count
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Fri, 15 Jun 2018 13:48:46 +0000 (15:48 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 2 Jul 2018 23:35:58 +0000 (01:35 +0200)
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 <xnhp0320@icloud.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
lib/librte_vhost/vhost.h

index 528e01c..786a74f 100644 (file)
@@ -429,6 +429,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