diff mbox series

[v2] vhost: add log for VHOST_USER_SET_VRING_BASE

Message ID 1642147027-203645-1-git-send-email-andy.pei@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Maxime Coquelin
Headers show
Series [v2] vhost: add log for VHOST_USER_SET_VRING_BASE | expand

Checks

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

Commit Message

Pei, Andy Jan. 14, 2022, 7:57 a.m. UTC
This patch adds log for vring related info in handling of vhost message
VHOST_USER_SET_VRING_BASE, which will be useful in live migration case.

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

Comments

Xia, Chenbo Jan. 17, 2022, 2:29 a.m. UTC | #1
> -----Original Message-----
> From: Pei, Andy <andy.pei@intel.com>
> Sent: Friday, January 14, 2022 3:57 PM
> To: dev@dpdk.org
> Cc: Xia, Chenbo <chenbo.xia@intel.com>
> Subject: [PATCH v2] vhost: add log for VHOST_USER_SET_VRING_BASE
> 
> This patch adds log for vring related info in handling of vhost message
> VHOST_USER_SET_VRING_BASE, which will be useful in live migration case.
> 
> 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..cd8c7bc 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:%u 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

Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Xia, Chenbo Jan. 27, 2022, 5:32 a.m. UTC | #2
> -----Original Message-----
> From: Pei, Andy <andy.pei@intel.com>
> Sent: Friday, January 14, 2022 3:57 PM
> To: dev@dpdk.org
> Cc: Xia, Chenbo <chenbo.xia@intel.com>
> Subject: [PATCH v2] vhost: add log for VHOST_USER_SET_VRING_BASE
> 
> This patch adds log for vring related info in handling of vhost message
> VHOST_USER_SET_VRING_BASE, which will be useful in live migration case.
> 
> 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..cd8c7bc 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:%u 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

Applied to next-virtio/main, thanks.
diff mbox series

Patch

diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
index a781346..cd8c7bc 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:%u 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;
 }