From 4da3dd488511698364bc64477af3d836406ed9c5 Mon Sep 17 00:00:00 2001 From: Marvin Liu Date: Mon, 4 Nov 2019 19:15:47 +0800 Subject: [PATCH] vhost: fix dirty page logging missing Packets data are directly copied when doing batch enqueue, add missed dirty page logging after memory copy. Fixes: ef861692c398 ("vhost: add packed ring batch enqueue") Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin --- lib/librte_vhost/virtio_net.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c index cde7498c76..cb54ebe18c 100644 --- a/lib/librte_vhost/virtio_net.c +++ b/lib/librte_vhost/virtio_net.c @@ -1108,6 +1108,10 @@ virtio_dev_rx_batch_packed(struct virtio_net *dev, pkts[i]->pkt_len); } + vhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE) + vhost_log_cache_write_iova(dev, vq, descs[avail_idx + i].addr, + lens[i]); + vhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE) ids[i] = descs[avail_idx + i].id; -- 2.20.1