ibv_reg_mr and mmap'ed memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I am trying to register an mmap'ed memory region as send buffer using ibv_reg_mr (via a libfabric call).

The address is a virtual address that has been mmap'ed from a kernel address in a custom kernel driver. The mapping uses remap_pfn_range:


   vma->vm_flags |= VM_DONTEXPAND;
   vma->vm_flags |= VM_DONTDUMP;
   vma->vm_flags |= VM_LOCKED;
remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, size, vma->vm_page_prot)


The ibv_reg_mr call fails with -22 (Invalid argument). The call succeeds if I replace the buffer with a simple malloc'ed buffer.

Why would this not work with mmap'ed memory? Is there a way of mmap'ing the kernel address to user space that would allow the memory registration?

Thanks!

Cheers,
Jörn



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux