Skip to contentSkip to conversation

vhost: fix missing statistics update

PATCH Superseded [email protected] 4 participants 5 messages Jun 16, 2022 – Jun 17, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vhost: fix missing statistics update

From: Xuan Ding <[email protected]>

This patch adds missing per-virtqueue statistics in async dequeue path.

Fixes 84d5204310d7("vhost: support async dequeue for split ring")
---
 lib/vhost/virtio_net.c | 2 ++
 1 file changed, 2 insertions(+)
lib/vhost/virtio_net.c +2 -0
index 68a26eb17d..a5e510c51e 100644
@@ -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))
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 1/1 vhost: fix missing statistics update

From: Xuan Ding <[email protected]>

This patch adds missing per-virtqueue statistics in async dequeue path.

Fixes 84d5204310d7("vhost: support async dequeue for split ring")

---

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(+)
lib/vhost/virtio_net.c +2 -0
index 68a26eb17d..a5e510c51e 100644
@@ -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))
Signature · 1 line
2.17.1
Tested-by on v2 1/1
#2 lore raw
Quoted 14 lines

-----Original Message-----
From: [email protected] <[email protected]>
Sent: Thursday, June 16, 2022 5:45 PM
To: [email protected]; Xia, Chenbo <[email protected]>
Cc: [email protected]; Hu, Jiayu <[email protected]>; Ma, WenwuX <[email protected]>; Ding, Xuan <[email protected]>
Subject: [PATCH v2] vhost: fix missing statistics update

From: Xuan Ding <[email protected]>

This patch adds missing per-virtqueue statistics in async dequeue path.

Fixes 84d5204310d7("vhost: support async dequeue for split ring")
Quoted 7 lines

---

v2:
* Since this issue was introduced and fixed in same release, no need to add cc stable.
---

Reviewed-by on v2 1/1
#3 lore raw
In reply to [email protected]
Quoted 4 lines · On Thu, Jun 16, 2022 at 11:47 AM <[email protected]> wrote:

From: Xuan Ding <[email protected]>

This patch adds missing per-virtqueue statistics in async dequeue path.

This would not happen if the async code was better integrated with the sync code.

Quoted 4 lines
Fixes 84d5204310d7("vhost: support async dequeue for split ring")
Signature · 1 line
David Marchand
#4 lore raw
In reply to [email protected]
Quoted 7 lines · On 6/16/22 11:44, [email protected] wrote:

From: Xuan Ding <[email protected]>

This patch adds missing per-virtqueue statistics in async dequeue path.

Fixes 84d5204310d7("vhost: support async dequeue for split ring")
Quoted 9 lines

---

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(+)

Applied to dpdk-next-virtio/main.

Thanks,
Maxime