DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] vhost: fix vDPA set features
@ 2018-04-25  2:18 Xiao Wang
  2018-04-26  5:51 ` Wang, Zhihong
  2018-04-26  8:07 ` Maxime Coquelin
  0 siblings, 2 replies; 4+ messages in thread
From: Xiao Wang @ 2018-04-25  2:18 UTC (permalink / raw)
  To: maxime.coquelin; +Cc: jianfeng.tan, zhihong.wang, dev, Xiao Wang

We should call set_features callback after setting features in virtio_net
structure, otherwise vDPA driver cannot get the right features.

Fixes: 07718b4f87aa ("vhost: adapt library for selective datapath")

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
---
 lib/librte_vhost/vhost_user.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 90194bf09..7244e1c06 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -214,11 +214,6 @@ vhost_user_set_features(struct virtio_net *dev, uint64_t features)
 			dev->notify_ops->features_changed(dev->vid, features);
 	}
 
-	did = dev->vdpa_dev_id;
-	vdpa_dev = rte_vdpa_get_device(did);
-	if (vdpa_dev && vdpa_dev->ops->set_features)
-		vdpa_dev->ops->set_features(dev->vid);
-
 	dev->features = features;
 	if (dev->features &
 		((1 << VIRTIO_NET_F_MRG_RXBUF) | (1ULL << VIRTIO_F_VERSION_1))) {
@@ -252,6 +247,11 @@ vhost_user_set_features(struct virtio_net *dev, uint64_t features)
 		}
 	}
 
+	did = dev->vdpa_dev_id;
+	vdpa_dev = rte_vdpa_get_device(did);
+	if (vdpa_dev && vdpa_dev->ops->set_features)
+		vdpa_dev->ops->set_features(dev->vid);
+
 	return 0;
 }
 
-- 
2.15.1

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

* Re: [dpdk-dev] [PATCH] vhost: fix vDPA set features
  2018-04-25  2:18 [dpdk-dev] [PATCH] vhost: fix vDPA set features Xiao Wang
@ 2018-04-26  5:51 ` Wang, Zhihong
  2018-04-26  8:07 ` Maxime Coquelin
  1 sibling, 0 replies; 4+ messages in thread
From: Wang, Zhihong @ 2018-04-26  5:51 UTC (permalink / raw)
  To: Wang, Xiao W, maxime.coquelin; +Cc: Tan, Jianfeng, dev



> -----Original Message-----
> From: Wang, Xiao W
> Sent: Wednesday, April 25, 2018 10:18 AM
> To: maxime.coquelin@redhat.com
> Cc: Tan, Jianfeng <jianfeng.tan@intel.com>; Wang, Zhihong
> <zhihong.wang@intel.com>; dev@dpdk.org; Wang, Xiao W
> <xiao.w.wang@intel.com>
> Subject: [PATCH] vhost: fix vDPA set features
> 
> We should call set_features callback after setting features in virtio_net
> structure, otherwise vDPA driver cannot get the right features.
> 
> Fixes: 07718b4f87aa ("vhost: adapt library for selective datapath")
> 
> Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>

Acked-by: Zhihong Wang <zhihong.wang@intel.com>

Thanks for fixing it!

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

* Re: [dpdk-dev] [PATCH] vhost: fix vDPA set features
  2018-04-25  2:18 [dpdk-dev] [PATCH] vhost: fix vDPA set features Xiao Wang
  2018-04-26  5:51 ` Wang, Zhihong
@ 2018-04-26  8:07 ` Maxime Coquelin
  2018-04-27 14:54   ` Ferruh Yigit
  1 sibling, 1 reply; 4+ messages in thread
From: Maxime Coquelin @ 2018-04-26  8:07 UTC (permalink / raw)
  To: Xiao Wang; +Cc: jianfeng.tan, zhihong.wang, dev



On 04/25/2018 04:18 AM, Xiao Wang wrote:
> We should call set_features callback after setting features in virtio_net
> structure, otherwise vDPA driver cannot get the right features.
> 
> Fixes: 07718b4f87aa ("vhost: adapt library for selective datapath")
> 
> Signed-off-by: Xiao Wang<xiao.w.wang@intel.com>
> ---
>   lib/librte_vhost/vhost_user.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)

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

Thanks!
Maxime

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

* Re: [dpdk-dev] [PATCH] vhost: fix vDPA set features
  2018-04-26  8:07 ` Maxime Coquelin
@ 2018-04-27 14:54   ` Ferruh Yigit
  0 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2018-04-27 14:54 UTC (permalink / raw)
  To: Maxime Coquelin, Xiao Wang; +Cc: jianfeng.tan, zhihong.wang, dev

On 4/26/2018 9:07 AM, Maxime Coquelin wrote:
> 
> 
> On 04/25/2018 04:18 AM, Xiao Wang wrote:
>> We should call set_features callback after setting features in virtio_net
>> structure, otherwise vDPA driver cannot get the right features.
>>
>> Fixes: 07718b4f87aa ("vhost: adapt library for selective datapath")
>>
>> Signed-off-by: Xiao Wang<xiao.w.wang@intel.com>
>> ---
>>   lib/librte_vhost/vhost_user.c | 10 +++++-----
>>   1 file changed, 5 insertions(+), 5 deletions(-)
> 

Acked-by: Zhihong Wang <zhihong.wang@intel.com>

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

Applied to dpdk-next-net/master, thanks.

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

end of thread, other threads:[~2018-04-27 14:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-25  2:18 [dpdk-dev] [PATCH] vhost: fix vDPA set features Xiao Wang
2018-04-26  5:51 ` Wang, Zhihong
2018-04-26  8:07 ` Maxime Coquelin
2018-04-27 14:54   ` Ferruh Yigit

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