vdpa/ifc: fix build issue with recent kernels

Message ID 20201002075400.248206-1-maxime.coquelin@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series vdpa/ifc: fix build issue with recent kernels |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS

Commit Message

Maxime Coquelin Oct. 2, 2020, 7:54 a.m. UTC
  VIRTIO_F_IOMMU_PLATFORM is now defined in recent kernel
headers, causing build issue.

Le's define it in IFC vDPA driver only if wasn't already.

Fixes: a3f8150eac6d ("net/ifcvf: add ifcvf vDPA driver")
Cc: stable@dpdk.org

Reported-by: Brandon Lo <blo@iol.unh.edu>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/vdpa/ifc/base/ifcvf.h | 3 +++
 1 file changed, 3 insertions(+)
  

Comments

David Marchand Oct. 2, 2020, 8:33 a.m. UTC | #1
On Fri, Oct 2, 2020 at 9:54 AM Maxime Coquelin
<maxime.coquelin@redhat.com> wrote:
>
> VIRTIO_F_IOMMU_PLATFORM is now defined in recent kernel
> headers, causing build issue.
>
> Le's define it in IFC vDPA driver only if wasn't already.

Let's* define it in the* IFC vDPA driver only if it* wasn't already.

>
> Fixes: a3f8150eac6d ("net/ifcvf: add ifcvf vDPA driver")
> Cc: stable@dpdk.org
>
> Reported-by: Brandon Lo <blo@iol.unh.edu>
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
>  drivers/vdpa/ifc/base/ifcvf.h | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/vdpa/ifc/base/ifcvf.h b/drivers/vdpa/ifc/base/ifcvf.h
> index a288ce57dc..573a35ffb4 100644
> --- a/drivers/vdpa/ifc/base/ifcvf.h
> +++ b/drivers/vdpa/ifc/base/ifcvf.h
> @@ -13,7 +13,10 @@
>  #define IFCVF_SUBSYS_DEVICE_ID 0x001A
>
>  #define IFCVF_MAX_QUEUES               1
> +
> +#ifndef VIRTIO_F_IOMMU_PLATFORM
>  #define VIRTIO_F_IOMMU_PLATFORM                33
> +#endif
>
>  /* Common configuration */
>  #define IFCVF_PCI_CAP_COMMON_CFG       1
> --
> 2.26.2
>

Acked-by: David Marchand <david.marchand@redhat.com>
  
David Marchand Oct. 2, 2020, 4:40 p.m. UTC | #2
On Fri, Oct 2, 2020 at 10:33 AM David Marchand
<david.marchand@redhat.com> wrote:
>
> On Fri, Oct 2, 2020 at 9:54 AM Maxime Coquelin
> <maxime.coquelin@redhat.com> wrote:
> >
> > VIRTIO_F_IOMMU_PLATFORM is now defined in recent kernel
> > headers, causing build issue.
> >
> > Le's define it in IFC vDPA driver only if wasn't already.
>
> Let's* define it in the* IFC vDPA driver only if it* wasn't already.
>
> >
> > Fixes: a3f8150eac6d ("net/ifcvf: add ifcvf vDPA driver")
> > Cc: stable@dpdk.org
> >
> > Reported-by: Brandon Lo <blo@iol.unh.edu>
> > Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> Acked-by: David Marchand <david.marchand@redhat.com>

Applied directly in main to avoid noise coming from the Fedora Rawhide job.
  

Patch

diff --git a/drivers/vdpa/ifc/base/ifcvf.h b/drivers/vdpa/ifc/base/ifcvf.h
index a288ce57dc..573a35ffb4 100644
--- a/drivers/vdpa/ifc/base/ifcvf.h
+++ b/drivers/vdpa/ifc/base/ifcvf.h
@@ -13,7 +13,10 @@ 
 #define IFCVF_SUBSYS_DEVICE_ID	0x001A
 
 #define IFCVF_MAX_QUEUES		1
+
+#ifndef VIRTIO_F_IOMMU_PLATFORM
 #define VIRTIO_F_IOMMU_PLATFORM		33
+#endif
 
 /* Common configuration */
 #define IFCVF_PCI_CAP_COMMON_CFG	1