Re: [PATCH 4/6] PCI/P2PDMA: Remove the DMA_VIRT_OPS hacks

2020-11-05 Thread Jason Gunthorpe
On Thu, Nov 05, 2020 at 06:43:06PM +0100, Christoph Hellwig wrote: > On Thu, Nov 05, 2020 at 01:39:30PM -0400, Jason Gunthorpe wrote: > > Hmm. This works for real devices like mlx5, but it means the three SW > > devices will also resolve to a real PCI device that is not the DMA > > device. > >

Re: [PATCH 4/6] PCI/P2PDMA: Remove the DMA_VIRT_OPS hacks

2020-11-05 Thread Christoph Hellwig
On Thu, Nov 05, 2020 at 01:39:30PM -0400, Jason Gunthorpe wrote: > Hmm. This works for real devices like mlx5, but it means the three SW > devices will also resolve to a real PCI device that is not the DMA > device. Does it? When I followed the links on my system rxe was a virtual device without

Re: [PATCH 4/6] PCI/P2PDMA: Remove the DMA_VIRT_OPS hacks

2020-11-05 Thread Jason Gunthorpe
On Thu, Nov 05, 2020 at 06:29:21PM +0100, Christoph Hellwig wrote: > On Thu, Nov 05, 2020 at 01:23:57PM -0400, Jason Gunthorpe wrote: > > But that depends on the calling driver doing this properly, and we > > don't expose an API to get the PCI device of the struct ib_device > > .. how does nvme

Re: [PATCH 4/6] PCI/P2PDMA: Remove the DMA_VIRT_OPS hacks

2020-11-05 Thread Christoph Hellwig
On Thu, Nov 05, 2020 at 01:23:57PM -0400, Jason Gunthorpe wrote: > But that depends on the calling driver doing this properly, and we > don't expose an API to get the PCI device of the struct ib_device > .. how does nvme even work here? The PCI p2pdma APIs walk the parent chains of a struct

Re: [PATCH 4/6] PCI/P2PDMA: Remove the DMA_VIRT_OPS hacks

2020-11-05 Thread Jason Gunthorpe
On Thu, Nov 05, 2020 at 06:08:16PM +0100, Christoph Hellwig wrote: > On Thu, Nov 05, 2020 at 10:34:18AM -0400, Jason Gunthorpe wrote: > > The check is removed here, but I didn't see a matching check added to > > the IB side? Something like: > > > > static int rdma_rw_map_sg(struct ib_device *dev,

Re: [PATCH 4/6] PCI/P2PDMA: Remove the DMA_VIRT_OPS hacks

2020-11-05 Thread Christoph Hellwig
On Thu, Nov 05, 2020 at 10:34:18AM -0400, Jason Gunthorpe wrote: > The check is removed here, but I didn't see a matching check added to > the IB side? Something like: > > static int rdma_rw_map_sg(struct ib_device *dev, struct scatterlist *sg, > u32 sg_cnt, enum

Re: [PATCH 4/6] PCI/P2PDMA: Remove the DMA_VIRT_OPS hacks

2020-11-05 Thread Jason Gunthorpe
On Thu, Nov 05, 2020 at 08:42:03AM +0100, Christoph Hellwig wrote: > Now that all users of dma_virt_ops are gone we can remove the workaround > for it in the PCI peer to peer code. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Logan Gunthorpe > Acked-by: Bjorn Helgaas >

[PATCH 4/6] PCI/P2PDMA: Remove the DMA_VIRT_OPS hacks

2020-11-04 Thread Christoph Hellwig
Now that all users of dma_virt_ops are gone we can remove the workaround for it in the PCI peer to peer code. Signed-off-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe Acked-by: Bjorn Helgaas --- drivers/pci/p2pdma.c | 20 1 file changed, 20 deletions(-) diff --git