DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] vhost: cleanup vq resubmit info when set_inflight_fd
@ 2024-03-21  9:57 Haoqian He
  2024-04-03  5:08 ` Haoqian He
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Haoqian He @ 2024-03-21  9:57 UTC (permalink / raw)
  To: dev; +Cc: Maxime Coquelin, Chenbo Xia

We should cleanup vq resubmit info when set_inflight_fd
before set_vring_kick which will check if there is any
inflight io waiting for resubmission.

Otherwise, when the vm is rebooting immediately after
reconnecting to the vhost target (inflight io has not
been resubmitted yet), the vhost backend still use the
old resubmit info set when reconnection.

Signed-off-by: Haoqian He <haoqian.he@smartx.com>
---
 lib/vhost/vhost_user.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
index 414192500e..7c54afc5fb 100644
--- a/lib/vhost/vhost_user.c
+++ b/lib/vhost/vhost_user.c
@@ -1871,6 +1871,7 @@ vhost_user_set_inflight_fd(struct virtio_net **pdev,
 		if (!vq)
 			continue;
 
+		cleanup_vq_inflight(dev, vq);
 		if (vq_is_packed(dev)) {
 			vq->inflight_packed = addr;
 			vq->inflight_packed->desc_num = queue_size;
-- 
2.41.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-06-12  8:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-21  9:57 [PATCH] vhost: cleanup vq resubmit info when set_inflight_fd Haoqian He
2024-04-03  5:08 ` Haoqian He
2024-04-12  8:10 ` Haoqian He
2024-04-25 13:12 ` Maxime Coquelin
2024-04-26 11:09   ` [PATCH v2] vhost: cleanup resubmit info before inflight setup Haoqian He
2024-04-26 21:28     ` Patrick Robb
2024-05-21  8:55     ` Haoqian He
2024-06-07 13:50     ` Maxime Coquelin
2024-06-12  8:30 ` [PATCH] vhost: cleanup vq resubmit info when set_inflight_fd Maxime Coquelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).