DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] vhost: add some log for vhost message VHOST_USER_SET_VRING_BASE
@ 2022-01-14  7:18 Andy Pei
  2022-01-14  7:39 ` Xia, Chenbo
  2022-01-14  7:57 ` [PATCH v2] vhost: add log for VHOST_USER_SET_VRING_BASE Andy Pei
  0 siblings, 2 replies; 5+ messages in thread
From: Andy Pei @ 2022-01-14  7:18 UTC (permalink / raw)
  To: dev; +Cc: chenbo.xia

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] 5+ messages in thread

* RE: [PATCH] vhost: add some log for vhost message VHOST_USER_SET_VRING_BASE
  2022-01-14  7:18 [PATCH] vhost: add some log for vhost message VHOST_USER_SET_VRING_BASE Andy Pei
@ 2022-01-14  7:39 ` Xia, Chenbo
  2022-01-14  7:59   ` Pei, Andy
  2022-01-14  7:57 ` [PATCH v2] vhost: add log for VHOST_USER_SET_VRING_BASE Andy Pei
  1 sibling, 1 reply; 5+ messages in thread
From: Xia, Chenbo @ 2022-01-14  7:39 UTC (permalink / raw)
  To: Pei, Andy, dev

> -----Original Message-----
> From: Pei, Andy <andy.pei@intel.com>
> Sent: Friday, January 14, 2022 3:19 PM
> To: dev@dpdk.org
> Cc: Xia, Chenbo <chenbo.xia@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@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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2] vhost: add log for VHOST_USER_SET_VRING_BASE
  2022-01-14  7:18 [PATCH] vhost: add some log for vhost message VHOST_USER_SET_VRING_BASE Andy Pei
  2022-01-14  7:39 ` Xia, Chenbo
@ 2022-01-14  7:57 ` Andy Pei
  2022-01-17  2:29   ` Xia, Chenbo
  1 sibling, 1 reply; 5+ messages in thread
From: Andy Pei @ 2022-01-14  7:57 UTC (permalink / raw)
  To: dev; +Cc: chenbo.xia

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] vhost: add some log for vhost message VHOST_USER_SET_VRING_BASE
  2022-01-14  7:39 ` Xia, Chenbo
@ 2022-01-14  7:59   ` Pei, Andy
  0 siblings, 0 replies; 5+ messages in thread
From: Pei, Andy @ 2022-01-14  7:59 UTC (permalink / raw)
  To: Xia, Chenbo, dev

Hi Chenbo,

Thanks for you reply.
I will send a V2 patch to address it.

-----Original Message-----
From: Xia, Chenbo <chenbo.xia@intel.com> 
Sent: Friday, January 14, 2022 3:40 PM
To: Pei, Andy <andy.pei@intel.com>; dev@dpdk.org
Subject: RE: [PATCH] vhost: add some log for vhost message VHOST_USER_SET_VRING_BASE

> -----Original Message-----
> From: Pei, Andy <andy.pei@intel.com>
> Sent: Friday, January 14, 2022 3:19 PM
> To: dev@dpdk.org
> Cc: Xia, Chenbo <chenbo.xia@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@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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH v2] vhost: add log for VHOST_USER_SET_VRING_BASE
  2022-01-14  7:57 ` [PATCH v2] vhost: add log for VHOST_USER_SET_VRING_BASE Andy Pei
@ 2022-01-17  2:29   ` Xia, Chenbo
  0 siblings, 0 replies; 5+ messages in thread
From: Xia, Chenbo @ 2022-01-17  2:29 UTC (permalink / raw)
  To: Pei, Andy, dev

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-01-17  2:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-14  7:18 [PATCH] vhost: add some log for vhost message VHOST_USER_SET_VRING_BASE Andy Pei
2022-01-14  7:39 ` Xia, Chenbo
2022-01-14  7:59   ` Pei, Andy
2022-01-14  7:57 ` [PATCH v2] vhost: add log for VHOST_USER_SET_VRING_BASE Andy Pei
2022-01-17  2:29   ` Xia, Chenbo

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git