[dpdk-dev] [PATCH] rte_ring: fix racy dequeue/enqueue in ppc64

2018-07-11 Thread Takeshi Yoshimura
h the new r->prod.tail. I added a read barrier in the case where __IS_SC is passed to __rte_ring_move_cons_head(). I also fixed __rte_ring_move_prod_head() to avoid similar problems with a single producer. Cc: sta...@dpdk.org Signed-off-by: Takeshi Yoshimura --- lib/librte_ring/rte_ring_ge

[dpdk-dev] [PATCH] vfio: fix workaround of BAR0 mapping

2018-07-11 Thread Takeshi Yoshimura
Allow mapping MSIX BAR", https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/vfio/pci/vfio_pci.c?h=v4.18-rc3&id=a32295c612c57990d17fb0f41e7134394b2f35f6 Fixes: 90a1633b2347 ("eal/linux: allow to map BARs with MSI-X tables") Signed-off-by: Takeshi Yos

[dpdk-dev] [PATCH v2] vfio: fix workaround of BAR0 mapping

2018-07-11 Thread Takeshi Yoshimura
Allow mapping MSIX BAR", https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ commit/id=a32295c612c57990d17fb0f41e7134394b2f35f6 Fixes: 90a1633b2347 ("eal/linux: allow to map BARs with MSI-X tables") Signed-off-by: Takeshi Yoshimura --- Fixed checkpatch warnings d

[dpdk-dev] [PATCH v3] vfio: fix workaround of BAR0 mapping

2018-07-13 Thread Takeshi Yoshimura
5f6 Fixes: 90a1633b2347 ("eal/linux: allow to map BARs with MSI-X tables") Signed-off-by: Takeshi Yoshimura --- Thanks, Anatoly. I updated the patch not to affect behaviors of older Linux and other environments as well as possible. This patch adds another chance to mmap BAR0. I noticed th

Re: [dpdk-dev] [PATCH] rte_ring: fix racy dequeue/enqueue in ppc64

2018-07-16 Thread Takeshi Yoshimura
ring as another patch. 2018-07-13 2:08 GMT+09:00 Jerin Jacob : > -Original Message- >> Date: Thu, 12 Jul 2018 11:44:14 +0900 >> From: Takeshi Yoshimura >> To: dev@dpdk.org >> Cc: Takeshi Yoshimura , sta...@dpdk.org, Takeshi >> Yoshimura >> Subject: [d

Re: [dpdk-dev] [PATCH v3] vfio: fix workaround of BAR0 mapping

2018-07-17 Thread Takeshi Yoshimura
2018-07-13 20:08 GMT+09:00 Burakov, Anatoly : > On 13-Jul-18 12:00 PM, Burakov, Anatoly wrote: >> >> On 13-Jul-18 11:11 AM, Takeshi Yoshimura wrote: >>> >>> The workaround of BAR0 mapping gives up and immediately returns an >>> error if it cannot map

[dpdk-dev] [PATCH v4] vfio: fix workaround of BAR0 mapping

2018-07-17 Thread Takeshi Yoshimura
5f6 Fixes: 90a1633b2347 ("eal/linux: allow to map BARs with MSI-X tables") Signed-off-by: Takeshi Yoshimura --- drivers/bus/pci/linux/pci_vfio.c | 92 ++-- 1 file changed, 51 insertions(+), 41 deletions(-) diff --git a/drivers/bus/pci/linux/pci_vfio.c b/d

[dpdk-dev] [PATCH v5] vfio: fix workaround of BAR mapping

2018-07-20 Thread Takeshi Yoshimura
tps://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ commit/?id=a32295c612c57990d17fb0f41e7134394b2f35f6 Fixes: 90a1633b2347 ("eal/linux: allow to map BARs with MSI-X tables") Signed-off-by: Takeshi Yoshimura Reviewed-by: Anatoly Burakov --- Thanks, Anatoly. I updated th

Re: [dpdk-dev] [PATCH 18.11] pci/vfio: allow mapping MSI-X BARs if kernel allows it

2018-07-31 Thread Takeshi Yoshimura
2018-07-30 20:17 GMT+09:00 Anatoly Burakov : > Currently, DPDK will skip mapping some areas (or even an entire BAR) > if MSI-X happens to be in it but is smaller than page address. > > Kernels 4.16+ will allow mapping MSI-X BARs [1], and will report this > as a capability flag. Capability flags the

Re: [dpdk-dev] [PATCH 18.11 v2] pci/vfio: allow mapping MSI-X BARs if kernel allows it

2018-08-01 Thread Takeshi Yoshimura
2018-07-31 20:28 GMT+09:00 Anatoly Burakov : > Currently, DPDK will skip mapping some areas (or even an entire BAR) > if MSI-X table happens to be in them but is smaller than page size. > > Kernels 4.16+ will allow mapping MSI-X BARs [1], and will report this > as a capability flag. Capability flag

[dpdk-dev] [PATCH] eal/vfio: fix sPAPR IOMMU mapping

2018-08-06 Thread Takeshi Yoshimura
a639085938 ("vfio: allow to map other memory regions") Signed-off-by: Takeshi Yoshimura --- lib/librte_eal/linuxapp/eal/eal_vfio.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/

[dpdk-dev] [PATCH] eal/vfio: fix sPAPR IOMMU mapping

2018-08-06 Thread Takeshi Yoshimura
a639085938 ("vfio: allow to map other memory regions") Signed-off-by: Takeshi Yoshimura --- lib/librte_eal/linuxapp/eal/eal_vfio.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/

[dpdk-dev] [PATCH v2] eal/vfio: fix sPAPR IOMMU mapping

2018-08-06 Thread Takeshi Yoshimura
a639085938 ("vfio: allow to map other memory regions") Cc: sta...@dpdk.org Signed-off-by: Takeshi Yoshimura --- v2: Added Cc in message lib/librte_eal/linuxapp/eal/eal_vfio.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/lib/librte_eal/lin

[dpdk-dev] [PATCH] vfio: fix VFIO mapping failures in ppc64le

2020-01-16 Thread Takeshi Yoshimura
ter the window creation. This patch fixes to retry only different page levels. Fixes: e072d16f8920 ("vfio: fix expanding DMA area in ppc64le") Fixes: db90b4969e2e ("vfio: retry creating sPAPR DMA window") Signed-off-by: Takeshi Yoshimura --- lib/librte_eal/linux/eal/eal_vf

[dpdk-dev] [PATCH] vfio: fix build errors on old Linux

2019-07-10 Thread Takeshi Yoshimura
ode if ddw is not supported. Fixes: db90b4969e2e ("vfio: retry creating sPAPR DMA window") Signed-off-by: Takeshi Yoshimura --- lib/librte_eal/linux/eal/eal_vfio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_eal/linux/eal/eal_vfio.c b/lib/librte_eal/linux/eal/eal

[dpdk-dev] [PATCH v3] vfio: fix expanding DMA area in ppc64le

2019-07-12 Thread Takeshi Yoshimura
r. I also fixed the order of ioctl for unregister and unmap. The ioctl for unregister sometimes report device busy errors due to the existence of mapped area. Signed-off-by: Takeshi Yoshimura --- lib/librte_eal/linux/eal/eal_vfio.c | 99 +++-- 1 file changed, 67 insertions(+

[dpdk-dev] [PATCH] eal: forcing IOVA as PA in ppc

2019-07-30 Thread Takeshi Yoshimura
because current ppc driver does not support VA mode. Theoretically, ppc can support VA mode, but I suspect that ppc with VA mode may have performance issues to create a big DMA window (VA often uses higher addresses than PA). So, I didn't change the code to check device capability in ppc. Si

[dpdk-dev] [PATCH] vfio: retry creating sPAPR DMA window

2019-06-06 Thread Takeshi Yoshimura
sPAPR allows only page_shift from VFIO_IOMMU_SPAPR_TCE_GET_INFO ioctl. However, Linux 4.17 or before returns incorrect page_shift for Power9. I added the code for retrying creation of sPAPR DMA window. Signed-off-by: Takeshi Yoshimura --- lib/librte_eal/linux/eal/eal_vfio.c | 26

[dpdk-dev] [PATCH] vfio: fix expanding DMA area in ppc64le

2019-06-11 Thread Takeshi Yoshimura
ioctl for unregister sometimes report device busy errors due to the existence of mapped area. Signed-off-by: Takeshi Yoshimura --- lib/librte_eal/linux/eal/eal_vfio.c | 154 +++- 1 file changed, 103 insertions(+), 51 deletions(-) diff --git a/lib/librte_eal/linux/eal/eal

[dpdk-dev] [PATCH] vfio: fix expanding DMA area in ppc64le

2019-06-12 Thread Takeshi Yoshimura
ioctl for unregister sometimes report device busy errors due to the existence of mapped area. Signed-off-by: Takeshi Yoshimura --- lib/librte_eal/linux/eal/eal_vfio.c | 154 +++- 1 file changed, 103 insertions(+), 51 deletions(-) diff --git a/lib/librte_eal/linux/eal/eal

[dpdk-dev] [PATCH v2] vfio: fix expanding DMA area in ppc64le

2019-06-14 Thread Takeshi Yoshimura
ioctl for unregister sometimes report device busy errors due to the existence of mapped area. Signed-off-by: Takeshi Yoshimura --- lib/librte_eal/linux/eal/eal_vfio.c | 154 +++- 1 file changed, 103 insertions(+), 51 deletions(-) diff --git a/lib/librte_eal/linux/eal/eal