[PATCH v2] vhost: fix missing statistics update
xuan.ding at intel.com
xuan.ding at intel.com
Thu Jun 16 11:44:32 CEST 2022
From: Xuan Ding <xuan.ding at intel.com>
This patch adds missing per-virtqueue statistics in async dequeue path.
Fixes: 84d5204310d7("vhost: support async dequeue for split ring")
Signed-off-by: Xuan Ding <xuan.ding at intel.com>
---
v2:
* Since this issue was introduced and fixed in same release,
no need to add cc stable.
---
lib/vhost/virtio_net.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
index 68a26eb17d..a5e510c51e 100644
--- a/lib/vhost/virtio_net.c
+++ b/lib/vhost/virtio_net.c
@@ -3538,6 +3538,7 @@ rte_vhost_async_try_dequeue_burst(int vid, uint16_t queue_id,
* learning table will get updated first.
*/
pkts[0] = rarp_mbuf;
+ vhost_queue_stats_update(dev, vq, pkts, 1);
pkts++;
count -= 1;
}
@@ -3562,6 +3563,7 @@ rte_vhost_async_try_dequeue_burst(int vid, uint16_t queue_id,
count, dma_id, vchan_id);
*nr_inflight = vq->async->pkts_inflight_n;
+ vhost_queue_stats_update(dev, vq, pkts, count);
out:
if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))
--
2.17.1
More information about the dev
mailing list