]> git.droids-corp.org - dpdk.git/commitdiff
vhost: fix statistics update in async dequeue
authorXuan Ding <xuan.ding@intel.com>
Thu, 16 Jun 2022 09:44:32 +0000 (09:44 +0000)
committerMaxime Coquelin <maxime.coquelin@redhat.com>
Fri, 17 Jun 2022 13:57:55 +0000 (15:57 +0200)
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@intel.com>
Tested-by: Wei Ling <weix.ling@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
lib/vhost/virtio_net.c

index ec2c82104249b373a136496ca9703b492b6a3d9c..4a054a29bbf12553a3b48bdb1e03c9fd91115344 100644 (file)
@@ -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))