RDMA/rdmavt: Adapt to handle non-uniform sizes on umem SGEs
authorShiraz, Saleem <shiraz.saleem@intel.com>
Tue, 12 Feb 2019 16:52:24 +0000 (10:52 -0600)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 13 Feb 2019 16:00:43 +0000 (09:00 -0700)
commit36d577089d207c4832c4f24902167dcd47635ebe
tree4cebc8583920876b731c1a4f31c87c7f254e0286
parente8ac9389f0d7c74fd988a5ce77765588f74dacd2
RDMA/rdmavt: Adapt to handle non-uniform sizes on umem SGEs

rdmavt expects a uniform size on all umem SGEs which is currently at
PAGE_SIZE.

Adapt to a umem API change which could return non-uniform sized SGEs due
to combining contiguous PAGE_SIZE regions into an SGE. Use
for_each_sg_page variant to unfold the larger SGEs into a list of
PAGE_SIZE elements.

Additionally, purge umem->page_shift usage in the driver as its only
relevant for ODP MRs. Use system page size and shift instead.

Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Shiraz, Saleem <shiraz.saleem@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/sw/rdmavt/mr.c