DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] vfio: fix compile on older kernels
@ 2017-03-21 16:08 Anatoly Burakov
  2017-03-22  4:46 ` Shreyansh Jain
  2017-03-23 12:56 ` [dpdk-dev] [PATCH v2] " Anatoly Burakov
  0 siblings, 2 replies; 7+ messages in thread
From: Anatoly Burakov @ 2017-03-21 16:08 UTC (permalink / raw)
  To: dev; +Cc: gowrishankar.m, Burakov, Anatoly

From: "Burakov, Anatoly" <anatoly.burakov@intel.com>

Fixing compile failures for kernels without sPAPR IOMMU support.

Fixes: 0fe9830b5345 ("eal/ppc: support sPAPR IOMMU for vfio-pci")
Signed-off-by: Burakov, Anatoly <anatoly.burakov@intel.com>
---
 lib/librte_eal/linuxapp/eal/eal_vfio.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.h b/lib/librte_eal/linuxapp/eal/eal_vfio.h
index ac31a4f..58b7976 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.h
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.h
@@ -59,6 +59,7 @@
 #define VFIO_IOMMU_SPAPR_REGISTER_MEMORY _IO(VFIO_TYPE, VFIO_BASE + 17)
 #define VFIO_IOMMU_SPAPR_TCE_CREATE _IO(VFIO_TYPE, VFIO_BASE + 19)
 #define VFIO_IOMMU_SPAPR_TCE_REMOVE _IO(VFIO_TYPE, VFIO_BASE + 20)
+#define VFIO_IOMMU_SPAPR_TCE_GET_INFO	_IO(VFIO_TYPE, VFIO_BASE + 12)
 struct vfio_iommu_spapr_register_memory {
 	uint32_t argsz;
 	uint32_t flags;
@@ -75,6 +76,18 @@ struct vfio_iommu_spapr_tce_remove {
 	uint32_t argsz;
 	uint64_t start_addr;
 };
+struct vfio_iommu_spapr_tce_ddw_info {
+	uint64_t pgsizes;
+	uint32_t max_dynamic_windows_supported;
+	uint32_t levels;
+};
+struct vfio_iommu_spapr_tce_info {
+	uint32_t argsz;
+	uint32_t flags;
+	uint32_t dma32_window_start;
+	uint32_t dma32_window_size;
+	struct vfio_iommu_spapr_tce_ddw_info ddw;
+};
 #else
 #define RTE_VFIO_SPAPR VFIO_SPAPR_TCE_v2_IOMMU
 #endif
-- 
2.9.3

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

* Re: [dpdk-dev] [PATCH] vfio: fix compile on older kernels
  2017-03-21 16:08 [dpdk-dev] [PATCH] vfio: fix compile on older kernels Anatoly Burakov
@ 2017-03-22  4:46 ` Shreyansh Jain
  2017-03-22  9:57   ` Burakov, Anatoly
  2017-03-23 12:56 ` [dpdk-dev] [PATCH v2] " Anatoly Burakov
  1 sibling, 1 reply; 7+ messages in thread
From: Shreyansh Jain @ 2017-03-22  4:46 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dev, gowrishankar.m

Super trivial comment inline:

On Tuesday 21 March 2017 09:38 PM, Anatoly Burakov wrote:
> From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
>
> Fixing compile failures for kernels without sPAPR IOMMU support.
>
> Fixes: 0fe9830b5345 ("eal/ppc: support sPAPR IOMMU for vfio-pci")
> Signed-off-by: Burakov, Anatoly <anatoly.burakov@intel.com>
> ---
>  lib/librte_eal/linuxapp/eal/eal_vfio.h | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.h b/lib/librte_eal/linuxapp/eal/eal_vfio.h
> index ac31a4f..58b7976 100644
> --- a/lib/librte_eal/linuxapp/eal/eal_vfio.h
> +++ b/lib/librte_eal/linuxapp/eal/eal_vfio.h
> @@ -59,6 +59,7 @@
>  #define VFIO_IOMMU_SPAPR_REGISTER_MEMORY _IO(VFIO_TYPE, VFIO_BASE + 17)
>  #define VFIO_IOMMU_SPAPR_TCE_CREATE _IO(VFIO_TYPE, VFIO_BASE + 19)
>  #define VFIO_IOMMU_SPAPR_TCE_REMOVE _IO(VFIO_TYPE, VFIO_BASE + 20)
> +#define VFIO_IOMMU_SPAPR_TCE_GET_INFO	_IO(VFIO_TYPE, VFIO_BASE + 12)

I guess a new line should be added here and ...

>  struct vfio_iommu_spapr_register_memory {
>  	uint32_t argsz;
>  	uint32_t flags;
> @@ -75,6 +76,18 @@ struct vfio_iommu_spapr_tce_remove {
>  	uint32_t argsz;
>  	uint64_t start_addr;
>  };

and here...

> +struct vfio_iommu_spapr_tce_ddw_info {
> +	uint64_t pgsizes;
> +	uint32_t max_dynamic_windows_supported;
> +	uint32_t levels;
> +};

and here.

> +struct vfio_iommu_spapr_tce_info {
> +	uint32_t argsz;
> +	uint32_t flags;
> +	uint32_t dma32_window_start;
> +	uint32_t dma32_window_size;
> +	struct vfio_iommu_spapr_tce_ddw_info ddw;
> +};
>  #else
>  #define RTE_VFIO_SPAPR VFIO_SPAPR_TCE_v2_IOMMU
>  #endif
>

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

* Re: [dpdk-dev] [PATCH] vfio: fix compile on older kernels
  2017-03-22  4:46 ` Shreyansh Jain
@ 2017-03-22  9:57   ` Burakov, Anatoly
  0 siblings, 0 replies; 7+ messages in thread
From: Burakov, Anatoly @ 2017-03-22  9:57 UTC (permalink / raw)
  To: Shreyansh Jain; +Cc: dev, gowrishankar.m

> Super trivial comment inline:

Thanks, I'll add those and do a v2. I'll wait a bit in case there are more comments.

Thanks,
Anatoly

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

* [dpdk-dev] [PATCH v2] vfio: fix compile on older kernels
  2017-03-21 16:08 [dpdk-dev] [PATCH] vfio: fix compile on older kernels Anatoly Burakov
  2017-03-22  4:46 ` Shreyansh Jain
@ 2017-03-23 12:56 ` Anatoly Burakov
  2017-03-27 13:17   ` Thomas Monjalon
  2017-03-28 15:53   ` [dpdk-dev] [PATCH v3] " Anatoly Burakov
  1 sibling, 2 replies; 7+ messages in thread
From: Anatoly Burakov @ 2017-03-23 12:56 UTC (permalink / raw)
  To: dev; +Cc: gowrishankar.m, shreyansh.jain, Burakov, Anatoly

From: "Burakov, Anatoly" <anatoly.burakov@intel.com>

Fixing compile failures for kernels without sPAPR IOMMU support.

Fixes: 0fe9830b5345 ("eal/ppc: support sPAPR IOMMU for vfio-pci")
Signed-off-by: Burakov, Anatoly <anatoly.burakov@intel.com>
---
v2: Fixed whitespace and newlines

 lib/librte_eal/linuxapp/eal/eal_vfio.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.h b/lib/librte_eal/linuxapp/eal/eal_vfio.h
index ac31a4f..23d2649 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.h
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.h
@@ -59,22 +59,40 @@
 #define VFIO_IOMMU_SPAPR_REGISTER_MEMORY _IO(VFIO_TYPE, VFIO_BASE + 17)
 #define VFIO_IOMMU_SPAPR_TCE_CREATE _IO(VFIO_TYPE, VFIO_BASE + 19)
 #define VFIO_IOMMU_SPAPR_TCE_REMOVE _IO(VFIO_TYPE, VFIO_BASE + 20)
+#define VFIO_IOMMU_SPAPR_TCE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12)
+
 struct vfio_iommu_spapr_register_memory {
 	uint32_t argsz;
 	uint32_t flags;
 	uint64_t vaddr;
 	uint64_t size;
 };
+
 struct vfio_iommu_spapr_tce_create {
 	uint32_t argsz;
 	uint32_t page_shift;
 	uint64_t window_size;
 	uint32_t levels;
 };
+
 struct vfio_iommu_spapr_tce_remove {
 	uint32_t argsz;
 	uint64_t start_addr;
 };
+
+struct vfio_iommu_spapr_tce_ddw_info {
+	uint64_t pgsizes;
+	uint32_t max_dynamic_windows_supported;
+	uint32_t levels;
+};
+
+struct vfio_iommu_spapr_tce_info {
+	uint32_t argsz;
+	uint32_t flags;
+	uint32_t dma32_window_start;
+	uint32_t dma32_window_size;
+	struct vfio_iommu_spapr_tce_ddw_info ddw;
+};
 #else
 #define RTE_VFIO_SPAPR VFIO_SPAPR_TCE_v2_IOMMU
 #endif
-- 
2.9.3

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

* Re: [dpdk-dev] [PATCH v2] vfio: fix compile on older kernels
  2017-03-23 12:56 ` [dpdk-dev] [PATCH v2] " Anatoly Burakov
@ 2017-03-27 13:17   ` Thomas Monjalon
  2017-03-28 15:53   ` [dpdk-dev] [PATCH v3] " Anatoly Burakov
  1 sibling, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2017-03-27 13:17 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dev, gowrishankar.m, shreyansh.jain

2017-03-23 12:56, Anatoly Burakov:
> From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
> 
> Fixing compile failures for kernels without sPAPR IOMMU support.
> 
> Fixes: 0fe9830b5345 ("eal/ppc: support sPAPR IOMMU for vfio-pci")

A blank line is missing also here ;)

> Signed-off-by: Burakov, Anatoly <anatoly.burakov@intel.com>
> ---
> v2: Fixed whitespace and newlines
> 
>  lib/librte_eal/linuxapp/eal/eal_vfio.h | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)

When building for ARM, I see this error:
error: redefinition of 'struct vfio_iommu_spapr_tce_info'

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

* [dpdk-dev] [PATCH v3] vfio: fix compile on older kernels
  2017-03-23 12:56 ` [dpdk-dev] [PATCH v2] " Anatoly Burakov
  2017-03-27 13:17   ` Thomas Monjalon
@ 2017-03-28 15:53   ` Anatoly Burakov
  2017-03-30 14:53     ` Thomas Monjalon
  1 sibling, 1 reply; 7+ messages in thread
From: Anatoly Burakov @ 2017-03-28 15:53 UTC (permalink / raw)
  To: dev; +Cc: gowrishankar.m, shreyansh.jain, Burakov, Anatoly

From: "Burakov, Anatoly" <anatoly.burakov@intel.com>

Fixing compile failures for kernels without sPAPR IOMMU support.

Fixes: 0fe9830b5345 ("eal/ppc: support sPAPR IOMMU for vfio-pci")

Signed-off-by: Burakov, Anatoly <anatoly.burakov@intel.com>
---

v3: fixed compile on kernels where SPAPR_v2 is not present but SPAPR is

v2: fixed newlines

 lib/librte_eal/linuxapp/eal/eal_vfio.h | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.h b/lib/librte_eal/linuxapp/eal/eal_vfio.h
index ac31a4f..0bf85bb 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.h
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.h
@@ -59,22 +59,44 @@
 #define VFIO_IOMMU_SPAPR_REGISTER_MEMORY _IO(VFIO_TYPE, VFIO_BASE + 17)
 #define VFIO_IOMMU_SPAPR_TCE_CREATE _IO(VFIO_TYPE, VFIO_BASE + 19)
 #define VFIO_IOMMU_SPAPR_TCE_REMOVE _IO(VFIO_TYPE, VFIO_BASE + 20)
+
+/* SPAPR_v2 is not present, but SPAPR might be */
+#ifndef VFIO_SPAPR_TCE_IOMMU
+#define VFIO_IOMMU_SPAPR_TCE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12)
+
+struct vfio_iommu_spapr_tce_info {
+	uint32_t argsz;
+	uint32_t flags;
+	uint32_t dma32_window_start;
+	uint32_t dma32_window_size;
+	struct vfio_iommu_spapr_tce_ddw_info ddw;
+};
+#endif
+
 struct vfio_iommu_spapr_register_memory {
 	uint32_t argsz;
 	uint32_t flags;
 	uint64_t vaddr;
 	uint64_t size;
 };
+
 struct vfio_iommu_spapr_tce_create {
 	uint32_t argsz;
 	uint32_t page_shift;
 	uint64_t window_size;
 	uint32_t levels;
 };
+
 struct vfio_iommu_spapr_tce_remove {
 	uint32_t argsz;
 	uint64_t start_addr;
 };
+
+struct vfio_iommu_spapr_tce_ddw_info {
+	uint64_t pgsizes;
+	uint32_t max_dynamic_windows_supported;
+	uint32_t levels;
+};
 #else
 #define RTE_VFIO_SPAPR VFIO_SPAPR_TCE_v2_IOMMU
 #endif
-- 
2.9.3

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

* Re: [dpdk-dev] [PATCH v3] vfio: fix compile on older kernels
  2017-03-28 15:53   ` [dpdk-dev] [PATCH v3] " Anatoly Burakov
@ 2017-03-30 14:53     ` Thomas Monjalon
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2017-03-30 14:53 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dev, gowrishankar.m, shreyansh.jain

2017-03-28 16:53, Anatoly Burakov:
> From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
> 
> Fixing compile failures for kernels without sPAPR IOMMU support.
> 
> Fixes: 0fe9830b5345 ("eal/ppc: support sPAPR IOMMU for vfio-pci")
> 
> Signed-off-by: Burakov, Anatoly <anatoly.burakov@intel.com>

Applied, thanks

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

end of thread, other threads:[~2017-03-30 14:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-21 16:08 [dpdk-dev] [PATCH] vfio: fix compile on older kernels Anatoly Burakov
2017-03-22  4:46 ` Shreyansh Jain
2017-03-22  9:57   ` Burakov, Anatoly
2017-03-23 12:56 ` [dpdk-dev] [PATCH v2] " Anatoly Burakov
2017-03-27 13:17   ` Thomas Monjalon
2017-03-28 15:53   ` [dpdk-dev] [PATCH v3] " Anatoly Burakov
2017-03-30 14:53     ` 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).