DPDK patches and discussions
 help / color / mirror / Atom feed
* Re: [dpdk-dev] [PATCH] vhost: fix ANY_LAYOUT declaration
  2018-01-19 19:02 [dpdk-dev] [PATCH] vhost: fix ANY_LAYOUT declaration Zhihong Wang
@ 2018-01-19 13:43 ` Maxime Coquelin
  2018-01-19 14:42 ` Yuanhan Liu
  1 sibling, 0 replies; 6+ messages in thread
From: Maxime Coquelin @ 2018-01-19 13:43 UTC (permalink / raw)
  To: Zhihong Wang, yliu; +Cc: dev, jianfeng.tan



On 01/19/2018 08:02 PM, Zhihong Wang wrote:
> The VIRTIO_F_ANY_LAYOUT feature indicates the device accepts arbitrary
> descriptor layouts. The vhost-user lib already supports it, but the
> feature declaration is missing. This patch fixes the mismatch.
> 
> Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
> ---
>   lib/librte_vhost/vhost.h | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
> index b2bf0e8..57a9bea 100644
> --- a/lib/librte_vhost/vhost.h
> +++ b/lib/librte_vhost/vhost.h
> @@ -170,6 +170,7 @@ struct vhost_msg {
>   
>   /* Features supported by this builtin vhost-user net driver. */
>   #define VIRTIO_NET_SUPPORTED_FEATURES ((1ULL << VIRTIO_NET_F_MRG_RXBUF) | \
> +				(1ULL << VIRTIO_F_ANY_LAYOUT) | \
>   				(1ULL << VIRTIO_NET_F_CTRL_VQ) | \
>   				(1ULL << VIRTIO_NET_F_CTRL_RX) | \
>   				(1ULL << VIRTIO_NET_F_GUEST_ANNOUNCE) | \
> 

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

Thanks,
Maxime

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

* Re: [dpdk-dev] [PATCH] vhost: fix ANY_LAYOUT declaration
  2018-01-19 19:02 [dpdk-dev] [PATCH] vhost: fix ANY_LAYOUT declaration Zhihong Wang
  2018-01-19 13:43 ` Maxime Coquelin
@ 2018-01-19 14:42 ` Yuanhan Liu
  2018-01-19 17:54   ` Tan, Jianfeng
  1 sibling, 1 reply; 6+ messages in thread
From: Yuanhan Liu @ 2018-01-19 14:42 UTC (permalink / raw)
  To: Zhihong Wang; +Cc: dev, jianfeng.tan

On Fri, Jan 19, 2018 at 02:02:50PM -0500, Zhihong Wang wrote:
> The VIRTIO_F_ANY_LAYOUT feature indicates the device accepts arbitrary
> descriptor layouts. The vhost-user lib already supports it, but the 
> feature declaration is missing. This patch fixes the mismatch.

I remembered there was a long discussion one year ago, that we can't
blindly set this feature, as this flag is reserved (thus should not
be set) for virtio 1.0.

We should set it when v1.0 is not enabled. However, as you know,
v1.0 is also enabled by default in DPDK vhost-user.

	--yliu
> 
> Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
> ---
>  lib/librte_vhost/vhost.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
> index b2bf0e8..57a9bea 100644
> --- a/lib/librte_vhost/vhost.h
> +++ b/lib/librte_vhost/vhost.h
> @@ -170,6 +170,7 @@ struct vhost_msg {
>  
>  /* Features supported by this builtin vhost-user net driver. */
>  #define VIRTIO_NET_SUPPORTED_FEATURES ((1ULL << VIRTIO_NET_F_MRG_RXBUF) | \
> +				(1ULL << VIRTIO_F_ANY_LAYOUT) | \
>  				(1ULL << VIRTIO_NET_F_CTRL_VQ) | \
>  				(1ULL << VIRTIO_NET_F_CTRL_RX) | \
>  				(1ULL << VIRTIO_NET_F_GUEST_ANNOUNCE) | \
> -- 
> 2.7.5

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

* Re: [dpdk-dev] [PATCH] vhost: fix ANY_LAYOUT declaration
  2018-01-19 14:42 ` Yuanhan Liu
@ 2018-01-19 17:54   ` Tan, Jianfeng
  2018-01-26 13:04     ` Yuanhan Liu
  0 siblings, 1 reply; 6+ messages in thread
From: Tan, Jianfeng @ 2018-01-19 17:54 UTC (permalink / raw)
  To: Yuanhan Liu, Zhihong Wang; +Cc: dev



On 1/19/2018 10:42 PM, Yuanhan Liu wrote:
> On Fri, Jan 19, 2018 at 02:02:50PM -0500, Zhihong Wang wrote:
>> The VIRTIO_F_ANY_LAYOUT feature indicates the device accepts arbitrary
>> descriptor layouts. The vhost-user lib already supports it, but the
>> feature declaration is missing. This patch fixes the mismatch.
> I remembered there was a long discussion one year ago, that we can't
> blindly set this feature, as this flag is reserved (thus should not
> be set) for virtio 1.0.

We might need to read that old thread again. But as you said, this flag 
is reserved for 1.0, but not used for other purpose yet. So that the 
feature is negotiated does not affect anything, no?

>
> We should set it when v1.0 is not enabled.

But in fact, vhost kernel reports supported feature bits consisting of 
ANY_LAYOUT and VERSION_1.

>   However, as you know, v1.0 is also enabled by default in DPDK vhost-user.

Even v1.0 is used, the feature negotiated between virtio-net (kernel) 
and vhost kernel indeed contains ANY_LAYOUT. I suppose we shall do as 
the de-facto way.

Thanks,
Jianfeng

>
> 	--yliu
>> Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
>> ---
>>   lib/librte_vhost/vhost.h | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
>> index b2bf0e8..57a9bea 100644
>> --- a/lib/librte_vhost/vhost.h
>> +++ b/lib/librte_vhost/vhost.h
>> @@ -170,6 +170,7 @@ struct vhost_msg {
>>   
>>   /* Features supported by this builtin vhost-user net driver. */
>>   #define VIRTIO_NET_SUPPORTED_FEATURES ((1ULL << VIRTIO_NET_F_MRG_RXBUF) | \
>> +				(1ULL << VIRTIO_F_ANY_LAYOUT) | \
>>   				(1ULL << VIRTIO_NET_F_CTRL_VQ) | \
>>   				(1ULL << VIRTIO_NET_F_CTRL_RX) | \
>>   				(1ULL << VIRTIO_NET_F_GUEST_ANNOUNCE) | \
>> -- 
>> 2.7.5

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

* [dpdk-dev] [PATCH] vhost: fix ANY_LAYOUT declaration
@ 2018-01-19 19:02 Zhihong Wang
  2018-01-19 13:43 ` Maxime Coquelin
  2018-01-19 14:42 ` Yuanhan Liu
  0 siblings, 2 replies; 6+ messages in thread
From: Zhihong Wang @ 2018-01-19 19:02 UTC (permalink / raw)
  To: yliu; +Cc: dev, jianfeng.tan, Zhihong Wang

The VIRTIO_F_ANY_LAYOUT feature indicates the device accepts arbitrary
descriptor layouts. The vhost-user lib already supports it, but the 
feature declaration is missing. This patch fixes the mismatch.

Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
---
 lib/librte_vhost/vhost.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index b2bf0e8..57a9bea 100644
--- a/lib/librte_vhost/vhost.h
+++ b/lib/librte_vhost/vhost.h
@@ -170,6 +170,7 @@ struct vhost_msg {
 
 /* Features supported by this builtin vhost-user net driver. */
 #define VIRTIO_NET_SUPPORTED_FEATURES ((1ULL << VIRTIO_NET_F_MRG_RXBUF) | \
+				(1ULL << VIRTIO_F_ANY_LAYOUT) | \
 				(1ULL << VIRTIO_NET_F_CTRL_VQ) | \
 				(1ULL << VIRTIO_NET_F_CTRL_RX) | \
 				(1ULL << VIRTIO_NET_F_GUEST_ANNOUNCE) | \
-- 
2.7.5

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

* Re: [dpdk-dev] [PATCH] vhost: fix ANY_LAYOUT declaration
  2018-01-19 17:54   ` Tan, Jianfeng
@ 2018-01-26 13:04     ` Yuanhan Liu
  2018-01-30 20:48       ` Thomas Monjalon
  0 siblings, 1 reply; 6+ messages in thread
From: Yuanhan Liu @ 2018-01-26 13:04 UTC (permalink / raw)
  To: Tan, Jianfeng; +Cc: Zhihong Wang, dev

On Sat, Jan 20, 2018 at 01:54:52AM +0800, Tan, Jianfeng wrote:
> 
> 
> On 1/19/2018 10:42 PM, Yuanhan Liu wrote:
> >On Fri, Jan 19, 2018 at 02:02:50PM -0500, Zhihong Wang wrote:
> >>The VIRTIO_F_ANY_LAYOUT feature indicates the device accepts arbitrary
> >>descriptor layouts. The vhost-user lib already supports it, but the
> >>feature declaration is missing. This patch fixes the mismatch.
> >I remembered there was a long discussion one year ago, that we can't
> >blindly set this feature, as this flag is reserved (thus should not
> >be set) for virtio 1.0.
> 
> We might need to read that old thread again. But as you said, this flag is
> reserved for 1.0, but not used for other purpose yet. So that the feature is
> negotiated does not affect anything, no?
> 
> >
> >We should set it when v1.0 is not enabled.
> 
> But in fact, vhost kernel reports supported feature bits consisting of
> ANY_LAYOUT and VERSION_1.

Yes, I was aware of that, and that was also one my points before.

I now also release that it's a must from migration from vhost-net to
vhost-user. Thus, I'd like to merge it this time. So

Applied to dpdk-next-virtio.

Thanks.

	--yliu

> 
> >  However, as you know, v1.0 is also enabled by default in DPDK vhost-user.
> 
> Even v1.0 is used, the feature negotiated between virtio-net (kernel) and
> vhost kernel indeed contains ANY_LAYOUT. I suppose we shall do as the
> de-facto way.
> 
> Thanks,
> Jianfeng
> 
> >
> >	--yliu
> >>Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
> >>---
> >>  lib/librte_vhost/vhost.h | 1 +
> >>  1 file changed, 1 insertion(+)
> >>
> >>diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
> >>index b2bf0e8..57a9bea 100644
> >>--- a/lib/librte_vhost/vhost.h
> >>+++ b/lib/librte_vhost/vhost.h
> >>@@ -170,6 +170,7 @@ struct vhost_msg {
> >>  /* Features supported by this builtin vhost-user net driver. */
> >>  #define VIRTIO_NET_SUPPORTED_FEATURES ((1ULL << VIRTIO_NET_F_MRG_RXBUF) | \
> >>+				(1ULL << VIRTIO_F_ANY_LAYOUT) | \
> >>  				(1ULL << VIRTIO_NET_F_CTRL_VQ) | \
> >>  				(1ULL << VIRTIO_NET_F_CTRL_RX) | \
> >>  				(1ULL << VIRTIO_NET_F_GUEST_ANNOUNCE) | \
> >>-- 
> >>2.7.5

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

* Re: [dpdk-dev] [PATCH] vhost: fix ANY_LAYOUT declaration
  2018-01-26 13:04     ` Yuanhan Liu
@ 2018-01-30 20:48       ` Thomas Monjalon
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2018-01-30 20:48 UTC (permalink / raw)
  To: Yuanhan Liu, Tan, Jianfeng, Zhihong Wang; +Cc: dev

Hi,

There is a compilation error on Ubuntu 12.04 / kernel 3.8.
VIRTIO_F_ANY_LAYOUT is undeclared.


26/01/2018 14:04, Yuanhan Liu:
> On Sat, Jan 20, 2018 at 01:54:52AM +0800, Tan, Jianfeng wrote:
> > 
> > 
> > On 1/19/2018 10:42 PM, Yuanhan Liu wrote:
> > >On Fri, Jan 19, 2018 at 02:02:50PM -0500, Zhihong Wang wrote:
> > >>The VIRTIO_F_ANY_LAYOUT feature indicates the device accepts arbitrary
> > >>descriptor layouts. The vhost-user lib already supports it, but the
> > >>feature declaration is missing. This patch fixes the mismatch.
> > >I remembered there was a long discussion one year ago, that we can't
> > >blindly set this feature, as this flag is reserved (thus should not
> > >be set) for virtio 1.0.
> > 
> > We might need to read that old thread again. But as you said, this flag is
> > reserved for 1.0, but not used for other purpose yet. So that the feature is
> > negotiated does not affect anything, no?
> > 
> > >
> > >We should set it when v1.0 is not enabled.
> > 
> > But in fact, vhost kernel reports supported feature bits consisting of
> > ANY_LAYOUT and VERSION_1.
> 
> Yes, I was aware of that, and that was also one my points before.
> 
> I now also release that it's a must from migration from vhost-net to
> vhost-user. Thus, I'd like to merge it this time. So
> 
> Applied to dpdk-next-virtio.

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

end of thread, other threads:[~2018-01-30 20:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-19 19:02 [dpdk-dev] [PATCH] vhost: fix ANY_LAYOUT declaration Zhihong Wang
2018-01-19 13:43 ` Maxime Coquelin
2018-01-19 14:42 ` Yuanhan Liu
2018-01-19 17:54   ` Tan, Jianfeng
2018-01-26 13:04     ` Yuanhan Liu
2018-01-30 20:48       ` Thomas Monjalon

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