[PATCH] vdpa: update used->flags in used ring relay

BillXiang xiangwencheng at dayudpu.com
Wed Jul 17 05:24:47 CEST 2024


From: BillXiang <xiangwencheng at dayudpu.com>

The vDPA device will work incorrectly if flags such as
VRING_USED_F_NO_NOTIFY are not updated correctly.

Signed-off-by: BillXiang <xiangwencheng at dayudpu.com>
---
 lib/vhost/vdpa.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/vhost/vdpa.c b/lib/vhost/vdpa.c
index a1dd5a753b..8abb073675 100644
--- a/lib/vhost/vdpa.c
+++ b/lib/vhost/vdpa.c
@@ -174,6 +174,7 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)
 	idx = vq->used->idx;
 	idx_m = s_vring->used->idx;
 	ret = (uint16_t)(idx_m - idx);
+	vq->used->flags = s_vring->used->flags;
 
 	while (idx != idx_m) {
 		/* copy used entry, used ring logging is not covered here */
-- 
2.30.0


More information about the dev mailing list