DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 3/3] vhost: add some log for vhost message VHOST_USER_SET_VRING_BASE
@ 2021-12-13  4:29 Andy Pei
  0 siblings, 0 replies; only message in thread
From: Andy Pei @ 2021-12-13  4:29 UTC (permalink / raw)
  To: dev; +Cc: andy.pei, chenbo.xia, maxime.coquelin

Usually the last avail index and last used index is 0, but for target
device of live migration, the last avail index and last used index is
not 0. So I think some log is helpful.

Signed-off-by: Andy Pei <andy.pei@intel.com>
---
 lib/vhost/vhost_user.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
index a781346..3cb13fb 100644
--- a/lib/vhost/vhost_user.c
+++ b/lib/vhost/vhost_user.c
@@ -973,6 +973,11 @@
 		vq->last_avail_idx = msg->payload.state.num;
 	}
 
+	VHOST_LOG_CONFIG(INFO,
+		"vring base idx:%d last_used_idx:%u last_avail_idx:%u.\n",
+		msg->payload.state.index, vq->last_used_idx,
+		vq->last_avail_idx);
+
 	return RTE_VHOST_MSG_RESULT_OK;
 }
 
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-13  5:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-13  4:29 [PATCH 3/3] vhost: add some log for vhost message VHOST_USER_SET_VRING_BASE Andy Pei

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).