On Thu, Jun 30, 2011 at 7:19 AM, Benoit Hudzia <benoit.hud...@gmail.com> wrote: > Hi, > > We are working to create a RDMA client within the kernel which will > connect to a working RDMA userspace server. > We are using the userspace code for testing purpose , in the final > version all the communication will be done within the kernel space. > [snip] > > basically the question boils down to how to allcoate and registr > buffer for RDMA communication from inside a kernel module? >
I happen to have a similar setup ..The original intent was to have a kernel mode RDMA application that took the kernel data and sent it over to the peer node's memory for temporary storage. It had to be able to get read back later. As it didn't matter whether the temporary storage was in kernel or user address space, I re-used my colleague's existing user mode program (to run as an user space daemon on the peer node). This allowed the focus being on the new kernel application development (run on the primary node). After the code was up and running, I see no reason to change the setup and it has been running fine since. The code runs on RHEL 5.5 with OFED-1.5.2 using Mellanox card. The user mode daemon is in a forever receiving loop that follows the standard the RDMA user mode programming logic. The kernel code invokes the ib_xxx set of APIs (vs. user mode ibv_xxx(s)). The kernel memory registration are done by the APIs such as kzalloc(), ib_get_dma_mr(), ib_dma_map_single(), ib_dma_map_page(), etc. Check out the driver code in drivers/infiniband/ulp/iser directory. It has a sample logic to register kernel memory. -- Wendy -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html