DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] vhost: fix return avail ring position in get vring base
@ 2018-02-09 17:28 Tomasz Kulasek
  2018-02-11  4:09 ` Tan, Jianfeng
  2018-02-21  8:29 ` Maxime Coquelin
  0 siblings, 2 replies; 4+ messages in thread
From: Tomasz Kulasek @ 2018-02-09 17:28 UTC (permalink / raw)
  To: yliu; +Cc: dev, huawei.xie, stable, Pawel Wodkowski

According to the "Vhost-user Protocol" document,
VHOST_USER_GET_VRING_BASE should get the available vring base offset.

Fixes: 8f972312b8f4 ("vhost: support vhost-user")
Cc: huawei.xie@intel.com
Cc: stable@dpdk.org

Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
---
 lib/librte_vhost/vhost_user.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 65ee33919..04eee3a3a 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -881,8 +881,8 @@ vhost_user_get_vring_base(struct virtio_net *dev,
 
 	dev->flags &= ~VIRTIO_DEV_READY;
 
-	/* Here we are safe to get the last used index */
-	msg->payload.state.num = vq->last_used_idx;
+	/* Here we are safe to get the last avail index */
+	msg->payload.state.num = vq->last_avail_idx;
 
 	RTE_LOG(INFO, VHOST_CONFIG,
 		"vring base idx:%d file:%d\n", msg->payload.state.index,
-- 
2.14.1

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

* Re: [dpdk-dev] [PATCH] vhost: fix return avail ring position in get vring base
  2018-02-09 17:28 [dpdk-dev] [PATCH] vhost: fix return avail ring position in get vring base Tomasz Kulasek
@ 2018-02-11  4:09 ` Tan, Jianfeng
  2018-02-21  8:29 ` Maxime Coquelin
  1 sibling, 0 replies; 4+ messages in thread
From: Tan, Jianfeng @ 2018-02-11  4:09 UTC (permalink / raw)
  To: Kulasek, TomaszX, yliu; +Cc: dev, Xie, Huawei, stable, Wodkowski, PawelX



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Tomasz Kulasek
> Sent: Saturday, February 10, 2018 1:28 AM
> To: yliu@fridaylinux.org
> Cc: dev@dpdk.org; Xie, Huawei; stable@dpdk.org; Wodkowski, PawelX
> Subject: [dpdk-dev] [PATCH] vhost: fix return avail ring position in get vring
> base
> 
> According to the "Vhost-user Protocol" document,
> VHOST_USER_GET_VRING_BASE should get the available vring base offset.
> 
> Fixes: 8f972312b8f4 ("vhost: support vhost-user")
> Cc: huawei.xie@intel.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
> Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>

Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>

Nice catch!

> ---
>  lib/librte_vhost/vhost_user.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
> index 65ee33919..04eee3a3a 100644
> --- a/lib/librte_vhost/vhost_user.c
> +++ b/lib/librte_vhost/vhost_user.c
> @@ -881,8 +881,8 @@ vhost_user_get_vring_base(struct virtio_net *dev,
> 
>  	dev->flags &= ~VIRTIO_DEV_READY;
> 
> -	/* Here we are safe to get the last used index */
> -	msg->payload.state.num = vq->last_used_idx;
> +	/* Here we are safe to get the last avail index */
> +	msg->payload.state.num = vq->last_avail_idx;
> 
>  	RTE_LOG(INFO, VHOST_CONFIG,
>  		"vring base idx:%d file:%d\n", msg->payload.state.index,
> --
> 2.14.1

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

* Re: [dpdk-dev] [PATCH] vhost: fix return avail ring position in get vring base
  2018-02-09 17:28 [dpdk-dev] [PATCH] vhost: fix return avail ring position in get vring base Tomasz Kulasek
  2018-02-11  4:09 ` Tan, Jianfeng
@ 2018-02-21  8:29 ` Maxime Coquelin
  2018-03-02 11:09   ` Maxime Coquelin
  1 sibling, 1 reply; 4+ messages in thread
From: Maxime Coquelin @ 2018-02-21  8:29 UTC (permalink / raw)
  To: Tomasz Kulasek, yliu; +Cc: dev, huawei.xie, stable, Pawel Wodkowski



On 02/09/2018 06:28 PM, Tomasz Kulasek wrote:
> According to the "Vhost-user Protocol" document,
> VHOST_USER_GET_VRING_BASE should get the available vring base offset.
> 
> Fixes: 8f972312b8f4 ("vhost: support vhost-user")
> Cc:huawei.xie@intel.com
> Cc:stable@dpdk.org
> 
> Signed-off-by: Pawel Wodkowski<pawelx.wodkowski@intel.com>
> Signed-off-by: Tomasz Kulasek<tomaszx.kulasek@intel.com>
> ---
>   lib/librte_vhost/vhost_user.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

And applied to dpdk-next-virtio/master.

Thanks!
Maxime

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

* Re: [dpdk-dev] [PATCH] vhost: fix return avail ring position in get vring base
  2018-02-21  8:29 ` Maxime Coquelin
@ 2018-03-02 11:09   ` Maxime Coquelin
  0 siblings, 0 replies; 4+ messages in thread
From: Maxime Coquelin @ 2018-03-02 11:09 UTC (permalink / raw)
  To: Tomasz Kulasek, yliu; +Cc: dev, huawei.xie, stable, Pawel Wodkowski



On 02/21/2018 09:29 AM, Maxime Coquelin wrote:
> 
> 
> On 02/09/2018 06:28 PM, Tomasz Kulasek wrote:
>> According to the "Vhost-user Protocol" document,
>> VHOST_USER_GET_VRING_BASE should get the available vring base offset.
>>
>> Fixes: 8f972312b8f4 ("vhost: support vhost-user")
>> Cc:huawei.xie@intel.com
>> Cc:stable@dpdk.org
>>
>> Signed-off-by: Pawel Wodkowski<pawelx.wodkowski@intel.com>
>> Signed-off-by: Tomasz Kulasek<tomaszx.kulasek@intel.com>
>> ---
>>   lib/librte_vhost/vhost_user.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> 
> And applied to dpdk-next-virtio/master.

I changed the commit title to:
vhost: return the right ring index to the master on stop


Please let me know if this is ok for you.

Thanks,
Maxime

> Thanks!
> Maxime

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

end of thread, other threads:[~2018-03-02 11:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-09 17:28 [dpdk-dev] [PATCH] vhost: fix return avail ring position in get vring base Tomasz Kulasek
2018-02-11  4:09 ` Tan, Jianfeng
2018-02-21  8:29 ` Maxime Coquelin
2018-03-02 11:09   ` Maxime Coquelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).