[dpdk-dev] vhost: fix ANY_LAYOUT definition for old kernels
Checks
Commit Message
This patch fixes compile failure with old kernels which have no
VIRTIO_F_ANY_LAYOUT defined.
Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
---
lib/librte_vhost/vhost.h | 4 ++++
1 file changed, 4 insertions(+)
Comments
On 01/31/2018 03:20 PM, Zhihong Wang wrote:
> This patch fixes compile failure with old kernels which have no
> VIRTIO_F_ANY_LAYOUT defined.
>
> Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
> ---
> lib/librte_vhost/vhost.h | 4 ++++
> 1 file changed, 4 insertions(+)
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
> index ba80584..646aad3 100644
> --- a/lib/librte_vhost/vhost.h
> +++ b/lib/librte_vhost/vhost.h
> @@ -130,6 +130,10 @@ struct vhost_virtqueue {
> #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
>
>
-----Original Message-----
> Date: Wed, 31 Jan 2018 09:07:49 +0100
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> To: Zhihong Wang <zhihong.wang@intel.com>, yliu@fridaylinux.org
> CC: dev@dpdk.org, jianfeng.tan@intel.com
> Subject: Re: [dpdk-dev] [PATCH] vhost: fix ANY_LAYOUT definition for old
> kernels
> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
> Thunderbird/52.5.2
>
>
> On 01/31/2018 03:20 PM, Zhihong Wang wrote:
> > This patch fixes compile failure with old kernels which have no
> > VIRTIO_F_ANY_LAYOUT defined.
> >
> > Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
> > ---
> > lib/librte_vhost/vhost.h | 4 ++++
> > 1 file changed, 4 insertions(+)
>
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Cc: Thomas Monjalon <thomas@monjalon.net>
This fixes a cross compilation issue with arm64 too.
Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> > > This patch fixes compile failure with old kernels which have no
> > > VIRTIO_F_ANY_LAYOUT defined.
> > >
> > > Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
> > > ---
> > > lib/librte_vhost/vhost.h | 4 ++++
> > > 1 file changed, 4 insertions(+)
> >
> > Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
>
> Cc: Thomas Monjalon <thomas@monjalon.net>
>
> This fixes a cross compilation issue with arm64 too.
>
> Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Fixes: 5a8bb6e9020f ("vhost: claim to support any layout feature")
Applied, thanks
@@ -130,6 +130,10 @@ struct vhost_virtqueue {
#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