From b7c2ecbacbe0c1cd50b608d2173cc1cab059d784 Mon Sep 17 00:00:00 2001 From: Xuan Ding Date: Thu, 16 Jun 2022 09:44:32 +0000 Subject: [PATCH] vhost: fix statistics update in async dequeue 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 Tested-by: Wei Ling Reviewed-by: David Marchand --- 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 ec2c821042..4a054a29bb 100644 --- a/lib/vhost/virtio_net.c +++ b/lib/vhost/virtio_net.c @@ -3796,6 +3796,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; } @@ -3817,6 +3818,7 @@ rte_vhost_async_try_dequeue_burst(int vid, uint16_t queue_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.39.5