[3/3] vhost: add some log for vhost message VHOST_USER_SET_VRING_BASE

Message ID 1639369785-103190-1-git-send-email-andy.pei@intel.com (mailing list archive)
State Rejected, archived
Delegated to: Maxime Coquelin
Headers
Series [1/3] vdpa/ifc: fix log info mismatch |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/github-robot: build success github build: passed
ci/intel-Testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-intel-Performance fail Performance Testing issues
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS

Commit Message

Pei, Andy Dec. 13, 2021, 4:29 a.m. UTC
  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(+)
  

Patch

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;
 }