On Fri, Dec 7, 2018 at 12:23 AM Jason Gunthorpe <jgg@xxxxxxxxxxxx> wrote: > > On Thu, Dec 06, 2018 at 10:49:43AM -0800, Selvin Xavier wrote: > > From: Somnath Kotur <somnath.kotur@xxxxxxxxxxxx> > > > > Currently bnxt_re driver is not utilizing the full limits of our h/w > > to register single MR. Increase the maximum MR size to 256G. > > The patch includes the following changes. > > > > - Use 'vmalloc' instead of 'kmalloc' while trying to allocate a > > temporary place holder for all the pointers to user memory pages. > > - Determine how many logical PDEs are required to store the pointers > > to user memory pages and allocate contigous pages of sufficient > > size to store all of them. > > You should really work with Shiraz on his patches in this area. It > might able able to eliminate the expensive temporary memory. > > > - if (!umem->hugetlb && length > BNXT_RE_MAX_MR_SIZE_LOW) { > > - dev_err(rdev_to_dev(rdev), "Requested MR Sz:%llu Max sup:%llu", > > - length, (u64)BNXT_RE_MAX_MR_SIZE_LOW); > > - rc = -EINVAL; > > - goto fail; > > - } > > if (umem->hugetlb && length > BNXT_RE_PAGE_SIZE_2M) { > > page_shift = BNXT_RE_PAGE_SHIFT_2M; > > dev_warn(rdev_to_dev(rdev), "umem hugetlb set page_size %x", > > 1 << page_shift); > > } > > Use of umem->hugetlb needs to be removed from this driver, it is the > last (wrong) user left. Sure. I will post a separate patch to remove this. Is that okay? > > Jason