patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] vhost: fix features definition location
       [not found] <1591113208-79169-2-git-send-email-matan@mellanox.com>
@ 2020-06-18 19:08 ` Matan Azrad
  2020-06-23  5:20   ` Xia, Chenbo
  2020-06-30  7:34   ` Maxime Coquelin
  0 siblings, 2 replies; 4+ messages in thread
From: Matan Azrad @ 2020-06-18 19:08 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: dev, stable

The vhost library provide an infrastructure in order to help the DPDK
users to manage vhost devices.

One of the infrastructure parts is the features enablement APIs.

Some features bits may be defined only in the internal file vhost.h in
case the kernel version doesn't include them.

Hence, user running on old kernel may not be able to manage thus
features.

Move all the feature bits definitions to the API file rte_vhost.h.

Fixes: db69be54b6ff ("vhost: hide internal code")
Fixes: 8d286dbeb8d7 ("vhost: fix multiple queue not enabled for old kernels")
Fixes: 3d3c6590b58c ("vhost: enable virtio MTU feature")
Fixes: 704098fc478c ("vhost: fix build with old kernels")
Cc: stable@dpdk.org

Signed-off-by: Matan Azrad <matan@mellanox.com>
---
 lib/librte_vhost/rte_vhost.h | 17 +++++++++++++++++
 lib/librte_vhost/vhost.h     | 17 -----------------
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
index d43669f..329ed8a 100644
--- a/lib/librte_vhost/rte_vhost.h
+++ b/lib/librte_vhost/rte_vhost.h
@@ -36,6 +36,23 @@
 /* support only linear buffers (no chained mbufs) */
 #define RTE_VHOST_USER_LINEARBUF_SUPPORT	(1ULL << 6)
 
+/* Features. */
+#ifndef VIRTIO_NET_F_GUEST_ANNOUNCE
+ #define VIRTIO_NET_F_GUEST_ANNOUNCE 21
+#endif
+
+#ifndef VIRTIO_NET_F_MQ
+ #define VIRTIO_NET_F_MQ		22
+#endif
+
+#ifndef VIRTIO_NET_F_MTU
+ #define VIRTIO_NET_F_MTU 3
+#endif
+
+#ifndef VIRTIO_F_ANY_LAYOUT
+ #define VIRTIO_F_ANY_LAYOUT		27
+#endif
+
 /** Protocol features. */
 #ifndef VHOST_USER_PROTOCOL_F_MQ
 #define VHOST_USER_PROTOCOL_F_MQ	0
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index df98d15..17f1e9a 100644
--- a/lib/librte_vhost/vhost.h
+++ b/lib/librte_vhost/vhost.h
@@ -202,26 +202,9 @@ struct vhost_virtqueue {
 	TAILQ_HEAD(, vhost_iotlb_entry) iotlb_pending_list;
 } __rte_cache_aligned;
 
-/* Old kernels have no such macros defined */
-#ifndef VIRTIO_NET_F_GUEST_ANNOUNCE
- #define VIRTIO_NET_F_GUEST_ANNOUNCE 21
-#endif
-
-#ifndef VIRTIO_NET_F_MQ
- #define VIRTIO_NET_F_MQ		22
-#endif
-
 #define VHOST_MAX_VRING			0x100
 #define VHOST_MAX_QUEUE_PAIRS		0x80
 
-#ifndef VIRTIO_NET_F_MTU
- #define VIRTIO_NET_F_MTU 3
-#endif
-
-#ifndef VIRTIO_F_ANY_LAYOUT
- #define VIRTIO_F_ANY_LAYOUT		27
-#endif
-
 /* Declare IOMMU related bits for older kernels */
 #ifndef VIRTIO_F_IOMMU_PLATFORM
 
-- 
1.8.3.1


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

* Re: [dpdk-stable] [PATCH] vhost: fix features definition location
  2020-06-18 19:08 ` [dpdk-stable] [PATCH] vhost: fix features definition location Matan Azrad
@ 2020-06-23  5:20   ` Xia, Chenbo
  2020-06-30  7:34   ` Maxime Coquelin
  1 sibling, 0 replies; 4+ messages in thread
From: Xia, Chenbo @ 2020-06-23  5:20 UTC (permalink / raw)
  To: Matan Azrad, Maxime Coquelin; +Cc: dev, stable



> -----Original Message-----
> From: stable <stable-bounces@dpdk.org> On Behalf Of Matan Azrad
> Sent: Friday, June 19, 2020 3:08 AM
> To: Maxime Coquelin <maxime.coquelin@redhat.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: [dpdk-stable] [PATCH] vhost: fix features definition location
> 
> The vhost library provide an infrastructure in order to help the DPDK users to
> manage vhost devices.
> 
> One of the infrastructure parts is the features enablement APIs.
> 
> Some features bits may be defined only in the internal file vhost.h in case the
> kernel version doesn't include them.
> 
> Hence, user running on old kernel may not be able to manage thus features.
> 
> Move all the feature bits definitions to the API file rte_vhost.h.
> 
> Fixes: db69be54b6ff ("vhost: hide internal code")
> Fixes: 8d286dbeb8d7 ("vhost: fix multiple queue not enabled for old kernels")
> Fixes: 3d3c6590b58c ("vhost: enable virtio MTU feature")
> Fixes: 704098fc478c ("vhost: fix build with old kernels")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Matan Azrad <matan@mellanox.com>
> ---
>  lib/librte_vhost/rte_vhost.h | 17 +++++++++++++++++
>  lib/librte_vhost/vhost.h     | 17 -----------------
>  2 files changed, 17 insertions(+), 17 deletions(-)
> 
> diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h index
> d43669f..329ed8a 100644
> --- a/lib/librte_vhost/rte_vhost.h
> +++ b/lib/librte_vhost/rte_vhost.h
> @@ -36,6 +36,23 @@
>  /* support only linear buffers (no chained mbufs) */
>  #define RTE_VHOST_USER_LINEARBUF_SUPPORT	(1ULL << 6)
> 
> +/* Features. */
> +#ifndef VIRTIO_NET_F_GUEST_ANNOUNCE
> + #define VIRTIO_NET_F_GUEST_ANNOUNCE 21 #endif
> +
> +#ifndef VIRTIO_NET_F_MQ
> + #define VIRTIO_NET_F_MQ		22
> +#endif
> +
> +#ifndef VIRTIO_NET_F_MTU
> + #define VIRTIO_NET_F_MTU 3
> +#endif
> +
> +#ifndef VIRTIO_F_ANY_LAYOUT
> + #define VIRTIO_F_ANY_LAYOUT		27
> +#endif
> +
>  /** Protocol features. */
>  #ifndef VHOST_USER_PROTOCOL_F_MQ
>  #define VHOST_USER_PROTOCOL_F_MQ	0
> diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index
> df98d15..17f1e9a 100644
> --- a/lib/librte_vhost/vhost.h
> +++ b/lib/librte_vhost/vhost.h
> @@ -202,26 +202,9 @@ struct vhost_virtqueue {
>  	TAILQ_HEAD(, vhost_iotlb_entry) iotlb_pending_list;  }
> __rte_cache_aligned;
> 
> -/* Old kernels have no such macros defined */ -#ifndef
> VIRTIO_NET_F_GUEST_ANNOUNCE
> - #define VIRTIO_NET_F_GUEST_ANNOUNCE 21 -#endif
> -
> -#ifndef VIRTIO_NET_F_MQ
> - #define VIRTIO_NET_F_MQ		22
> -#endif
> -
>  #define VHOST_MAX_VRING			0x100
>  #define VHOST_MAX_QUEUE_PAIRS		0x80
> 
> -#ifndef VIRTIO_NET_F_MTU
> - #define VIRTIO_NET_F_MTU 3
> -#endif
> -
> -#ifndef VIRTIO_F_ANY_LAYOUT
> - #define VIRTIO_F_ANY_LAYOUT		27
> -#endif
> -
>  /* Declare IOMMU related bits for older kernels */  #ifndef
> VIRTIO_F_IOMMU_PLATFORM
> 
> --
> 1.8.3.1

Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>

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

* Re: [dpdk-stable] [PATCH] vhost: fix features definition location
  2020-06-18 19:08 ` [dpdk-stable] [PATCH] vhost: fix features definition location Matan Azrad
  2020-06-23  5:20   ` Xia, Chenbo
@ 2020-06-30  7:34   ` Maxime Coquelin
  2020-06-30  7:41     ` [dpdk-stable] [dpdk-dev] " Maxime Coquelin
  1 sibling, 1 reply; 4+ messages in thread
From: Maxime Coquelin @ 2020-06-30  7:34 UTC (permalink / raw)
  To: Matan Azrad; +Cc: dev, stable



On 6/18/20 9:08 PM, Matan Azrad wrote:
> The vhost library provide an infrastructure in order to help the DPDK
> users to manage vhost devices.
> 
> One of the infrastructure parts is the features enablement APIs.
> 
> Some features bits may be defined only in the internal file vhost.h in
> case the kernel version doesn't include them.
> 
> Hence, user running on old kernel may not be able to manage thus
> features.
> 
> Move all the feature bits definitions to the API file rte_vhost.h.
> 
> Fixes: db69be54b6ff ("vhost: hide internal code")
> Fixes: 8d286dbeb8d7 ("vhost: fix multiple queue not enabled for old kernels")
> Fixes: 3d3c6590b58c ("vhost: enable virtio MTU feature")
> Fixes: 704098fc478c ("vhost: fix build with old kernels")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Matan Azrad <matan@mellanox.com>
> ---
>  lib/librte_vhost/rte_vhost.h | 17 +++++++++++++++++
>  lib/librte_vhost/vhost.h     | 17 -----------------
>  2 files changed, 17 insertions(+), 17 deletions(-)
> 

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

Thanks,
Maxime


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

* Re: [dpdk-stable] [dpdk-dev] [PATCH] vhost: fix features definition location
  2020-06-30  7:34   ` Maxime Coquelin
@ 2020-06-30  7:41     ` Maxime Coquelin
  0 siblings, 0 replies; 4+ messages in thread
From: Maxime Coquelin @ 2020-06-30  7:41 UTC (permalink / raw)
  To: Matan Azrad; +Cc: dev, stable



On 6/30/20 9:34 AM, Maxime Coquelin wrote:
> 
> 
> On 6/18/20 9:08 PM, Matan Azrad wrote:
>> The vhost library provide an infrastructure in order to help the DPDK
>> users to manage vhost devices.
>>
>> One of the infrastructure parts is the features enablement APIs.
>>
>> Some features bits may be defined only in the internal file vhost.h in
>> case the kernel version doesn't include them.
>>
>> Hence, user running on old kernel may not be able to manage thus
>> features.
>>
>> Move all the feature bits definitions to the API file rte_vhost.h.
>>
>> Fixes: db69be54b6ff ("vhost: hide internal code")
>> Fixes: 8d286dbeb8d7 ("vhost: fix multiple queue not enabled for old kernels")
>> Fixes: 3d3c6590b58c ("vhost: enable virtio MTU feature")
>> Fixes: 704098fc478c ("vhost: fix build with old kernels")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Matan Azrad <matan@mellanox.com>
>> ---
>>  lib/librte_vhost/rte_vhost.h | 17 +++++++++++++++++
>>  lib/librte_vhost/vhost.h     | 17 -----------------
>>  2 files changed, 17 insertions(+), 17 deletions(-)
>>
> 
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> 
> Thanks,
> Maxime
> 
Applied to dpdk-next-virtio/master

Thanks,
Maxime


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

end of thread, other threads:[~2020-06-30  7:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1591113208-79169-2-git-send-email-matan@mellanox.com>
2020-06-18 19:08 ` [dpdk-stable] [PATCH] vhost: fix features definition location Matan Azrad
2020-06-23  5:20   ` Xia, Chenbo
2020-06-30  7:34   ` Maxime Coquelin
2020-06-30  7:41     ` [dpdk-stable] [dpdk-dev] " 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).