Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add user space dmabuf support #895

Merged
merged 6 commits into from
Jan 26, 2021
Merged

Conversation

j-xiong
Copy link
Contributor

@j-xiong j-xiong commented Nov 23, 2020

This is the user space counter-part of the kernel patch set to add
dma-buf support to the RDMA subsystem. This patch series adds user
space API for registering dma-buf based memory regions, updates
pyverbs with the new API, and adds new tests.

This series consists of six patches. The first patch updates the
kernel headers for dma-buf support. Patch 2 adds the new API function
and updates the man pages. Patch 3 implements the new API in the mlx5
provider. Patch 4 adds new class definitions to pyverbs for the new API.
Patch 5 adds a set of new tests for the new API. Patch 6 fixes bug in
the utility code of the tests.

pyverbs/CMakeLists.txt Outdated Show resolved Hide resolved
pyverbs/dmabuf.pyx Outdated Show resolved Hide resolved
pyverbs/dmabuf.pyx Show resolved Hide resolved
pyverbs/dmabuf.pyx Outdated Show resolved Hide resolved
pyverbs/dmabuf.pyx Outdated Show resolved Hide resolved
pyverbs/mr.pyx Outdated Show resolved Hide resolved
pyverbs/mr.pyx Outdated Show resolved Hide resolved
pyverbs/dmabuf.pyx Outdated Show resolved Hide resolved
pyverbs/dmabuf.pyx Outdated Show resolved Hide resolved
pyverbs/mr.pyx Show resolved Hide resolved
tests/test_mr.py Show resolved Hide resolved
@j-xiong j-xiong force-pushed the v5.10-dmabuf branch 3 times, most recently from a68d210 to e95e9b6 Compare November 27, 2020 05:40
@j-xiong
Copy link
Contributor Author

j-xiong commented Nov 27, 2020

PR has been updated to address all the existing review comments.

@jgunthorpe
Copy link
Member

This needs rebasing.

Can you mark all the fixed things as resolved in the github GUI?

Note the package version is now 34 so the debian/control needs updating during the rebase

@jgunthorpe
Copy link
Member

Also fix all of the CI errors and warnings - click on checks and follow it through

debian/libibverbs1.symbols Outdated Show resolved Hide resolved
debian/libibverbs1.symbols Outdated Show resolved Hide resolved
libibverbs/dummy_ops.c Outdated Show resolved Hide resolved
libibverbs/verbs.c Outdated Show resolved Hide resolved
libibverbs/verbs.h Outdated Show resolved Hide resolved
pyverbs/dmabuf_alloc.c Outdated Show resolved Hide resolved
pyverbs/dmabuf_alloc.c Outdated Show resolved Hide resolved
@j-xiong j-xiong force-pushed the v5.10-dmabuf branch 2 times, most recently from 6afef59 to f715059 Compare January 20, 2021 23:11
@j-xiong
Copy link
Contributor Author

j-xiong commented Jan 20, 2021

PR updated to address review comments from @jgunthorpe.

@rleon
Copy link
Member

rleon commented Jan 25, 2021

Please fix conflct, symbols and update kernel-headers with kernel-header/update script so we will be able to merge this PR.

Thanks

To commit bfe0cc6eb249 ("RDMA/uverbs: Add uverbs command for dma-buf based
MR registration").

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
Add new API function and new provider method for registering dma-buf
based memory region. Update the man page and bump the API version.

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
Implement the new provider method for registering dma-buf based memory
regions.

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
Define a new sub-class of 'MR' that uses dma-buf object for the memory
region. Define a new class 'DmaBuf' as a wrapper for dma-buf allocation
mechanism implemented in C.

Update the cmake function for cython modules to allow building modules
with mixed cython and c source files.

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
Define a set of unit tests similar to regular MR tests and a set of
tests for send/recv and rdma traffic using dma-buf MRs. Add a utility
function to generate access flags for dma-buf based MRs because the
set of supported flags is smaller.

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
The filter definition is wrong and causes get_access_flags() always
returning empty list. As the result the MR tests using this function
are effectively skipped (but report success).

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
@j-xiong
Copy link
Contributor Author

j-xiong commented Jan 25, 2021

PR rebased to resolve conflicts and symbols. Re-ran kernel-header/update against linux-rdma/for-next.

@rleon rleon merged commit 10452cb into linux-rdma:master Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants