Skip to contentSkip to conversation

vhost: add some log for vhost message VHOST_USER_SET_VRING_BASE

PATCH Superseded Andy Pei 1 participant 1 message Dec 13, 2021

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Andy Pei

author
#0 lore raw

PATCH 3/3 vhost: add some log for vhost message VHOST_USER_SET_VRING_BASE

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.

---
 lib/vhost/vhost_user.c | 5 +++++
 1 file changed, 5 insertions(+)
lib/vhost/vhost_user.c +5 -0
index a781346..3cb13fb 100644
@@ -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;
 }
 
Signature · 1 line
1.8.3.1