[PATCH] vhost: add some log for vhost message VHOST_USER_SET_VRING_BASE
Xia, Chenbo
chenbo.xia at intel.com
Fri Jan 14 08:39:32 CET 2022
> -----Original Message-----
> From: Pei, Andy <andy.pei at intel.com>
> Sent: Friday, January 14, 2022 3:19 PM
> To: dev at dpdk.org
> Cc: Xia, Chenbo <chenbo.xia at intel.com>
> Subject: [PATCH] vhost: add some log for vhost message
> VHOST_USER_SET_VRING_BASE
I suggest the title be:
vhost: add log for 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.
Can simplify to:
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 at 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",
vring idx:%u
Thanks,
Chenbo
> + msg->payload.state.index, vq->last_used_idx,
> + vq->last_avail_idx);
> +
> return RTE_VHOST_MSG_RESULT_OK;
> }
>
> --
> 1.8.3.1
More information about the dev
mailing list