Skip to content
  1. Feb 12, 2019
    • Shiraz, Saleem's avatar
      RDMA/bnxt_re: Use for_each_sg_dma_page iterator on umem SGL · 161ebe24
      Shiraz, Saleem authored
      
      
      Use the for_each_sg_dma_page iterator variant to walk the umem DMA-mapped
      SGL and get the page DMA address. This avoids the extra loop to iterate
      pages in the SGE when for_each_sg iterator is used.
      
      Additionally, purge umem->page_shift usage in the driver as its only
      relevant for ODP MRs. Use system page size and shift instead.
      
      Signed-off-by: default avatarShiraz, Saleem <shiraz.saleem@intel.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      161ebe24
    • Jason Gunthorpe's avatar
      lib/scatterlist: Provide a DMA page iterator · d901b276
      Jason Gunthorpe authored
      Commit 2db76d7c
      
       ("lib/scatterlist: sg_page_iter: support sg lists w/o
      backing pages") introduced the sg_page_iter_dma_address() function without
      providing a way to use it in the general case. If the sg_dma_len() is not
      equal to the sg length callers cannot safely use the
      for_each_sg_page/sg_page_iter_dma_address combination.
      
      Resolve this API mistake by providing a DMA specific iterator,
      for_each_sg_dma_page(), that uses the right length so
      sg_page_iter_dma_address() works as expected with all sglists.
      
      A new iterator type is introduced to provide compile-time safety against
      wrongly mixing accessors and iterators.
      
      Acked-by: Christoph Hellwig <hch@lst.de> (for scatterlist)
      Acked-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
      Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> (ipu3-cio2)
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      d901b276
  2. Feb 09, 2019
  3. Feb 08, 2019