[PATCH 3/6] RDMA/core: remove use of dma_virt_ops

2020-11-04 Thread Christoph Hellwig
Use the ib_dma_* helpers to skip the DMA translation instead. This removes the last user if dma_virt_ops and keeps the weird layering violation inside the RDMA core instead of burderning the DMA mapping subsystems with it. This also means the software RDMA drivers now don't have to mess with DMA

Re: [PATCH 3/6] RDMA/core: remove use of dma_virt_ops

2020-11-05 Thread Jason Gunthorpe
On Thu, Nov 05, 2020 at 08:42:02AM +0100, Christoph Hellwig wrote: > diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h > index 5f8fd7976034e0..661e4a22b3cb81 100644 > +++ b/include/rdma/ib_verbs.h > @@ -3950,6 +3950,8 @@ static inline int ib_req_ncomp_notif(struct ib_cq *cq, > int wc_

Re: [PATCH 3/6] RDMA/core: remove use of dma_virt_ops

2020-11-05 Thread Christoph Hellwig
On Thu, Nov 05, 2020 at 10:34:15AM -0400, Jason Gunthorpe wrote: > On Thu, Nov 05, 2020 at 08:42:02AM +0100, Christoph Hellwig wrote: > > diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h > > index 5f8fd7976034e0..661e4a22b3cb81 100644 > > +++ b/include/rdma/ib_verbs.h > > @@ -3950,6 +

Re: [PATCH 3/6] RDMA/core: remove use of dma_virt_ops

2020-11-05 Thread Jason Gunthorpe
On Thu, Nov 05, 2020 at 08:42:02AM +0100, Christoph Hellwig wrote: > @@ -1341,7 +1322,14 @@ int ib_register_device(struct ib_device *device, const > char *name, > if (ret) > return ret; > > - setup_dma_device(device, dma_device); > + /* > + * If the caller does n

Re: [PATCH 3/6] RDMA/core: remove use of dma_virt_ops

2020-11-05 Thread Jason Gunthorpe
On Thu, Nov 05, 2020 at 01:52:53PM -0400, Jason Gunthorpe wrote: > On Thu, Nov 05, 2020 at 08:42:02AM +0100, Christoph Hellwig wrote: > > @@ -1341,7 +1322,14 @@ int ib_register_device(struct ib_device *device, > > const char *name, > > if (ret) > > return ret; > > > > - setup_d

Re: [PATCH 3/6] RDMA/core: remove use of dma_virt_ops

2020-11-06 Thread Christoph Hellwig
On Thu, Nov 05, 2020 at 01:52:53PM -0400, Jason Gunthorpe wrote: > On Thu, Nov 05, 2020 at 08:42:02AM +0100, Christoph Hellwig wrote: > > @@ -1341,7 +1322,14 @@ int ib_register_device(struct ib_device *device, > > const char *name, > > if (ret) > > return ret; > > > > - setup_d

Re: [PATCH 3/6] RDMA/core: remove use of dma_virt_ops

2020-11-06 Thread Christoph Hellwig
On Thu, Nov 05, 2020 at 01:58:16PM -0400, Jason Gunthorpe wrote: > > I noticed there were a couple of places expecting dma_device to be set > > to !NULL: > > > > drivers/infiniband/core/umem.c: > > dma_get_max_seg_size(device->dma_device), sg, npages, > > drivers/nvme/host/rdma.c: