From: Jianxin Xiong <jianxin.xiong@intel.com> To: linux-rdma@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: Jianxin Xiong <jianxin.xiong@intel.com>, Doug Ledford <dledford@redhat.com>, Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>, Sumit Semwal <sumit.semwal@linaro.org>, Christian Koenig <christian.koenig@amd.com>, Daniel Vetter <daniel.vetter@intel.com>, Edward Srouji <edwards@nvidia.com>, Yishai Hadas <yishaih@nvidia.com> Subject: [PATCH rdma-core v7 0/6] Add user space dma-buf support Date: Mon, 25 Jan 2021 11:56:56 -0800 [thread overview] Message-ID: <1611604622-86968-1-git-send-email-jianxin.xiong@intel.com> (raw) This is the seventh version of the patch series. Change log: v7: * Rebase to the latest rdma-core master (commit a4885eda9addc4) * Rerun kernel-headers/update against linux-rdma for-next so that the kernel commit id in the commit message is correct v6: https://www.spinics.net/lists/linux-rdma/msg99221.html * Rebase to the latest rdma-core master (commit 14006f2f841b0c) * Update the ABI symbol version to match new package version; also bump the private ABI version because new function has been added to the provider interface * Avoid changing 'struct ibv_context_ops' by replacing SET_OP() with SET_PRIV_OP_IC() * Replace sprintf() with snprintf() * Keep the ops in verbs_set_ops() sorted * Fix some styling issues: extra spaces, struct 0-initialization, error checking control flow v5: https://www.spinics.net/lists/linux-rdma/msg99015.html * Use a different mr_type for dmabuf so that ibv_dofork_range() is not called inside ibv_dereg_mr() for dmabuf based mr v4: https://www.spinics.net/lists/linux-rdma/msg98135.html * Rework the cmake funciton rdma_cython_module to support both single source (.pyx) and multiple source (.pyx + [.c]*) scenarios instead of using two separate functions * Rename 'dri_*' to 'drm_*' for the dmabuf allocation interface * Add option to dmabuf allocation routine to allow allocation from GTT instead of VRAM * Add proper CPU access flags when allocating dmabufs * Remove 'radeon' driver support from the dmabuf allocation routines * Add comand line arguments to the tests for selecting GPU unit and setting the option for allocating from GTT v3: https://www.spinics.net/lists/linux-rdma/msg98059.html * Add parameter 'iova' to the new ibv_reg_dmabuf_mr() API * Change the way of allocating dma-buf object - use /dev/dri/renderD* instead of /dev/dri/card* and use GEM object instead of dumb buffer * Add cmake function to allow building modules with mixed cython and C source files * Add new tests that use dma-buf MRs for send/recv and rdma traffic * Skip dma-buf tests on unsupported systems * Remove some use of random values in the new tests * Add dealloc() and close() methods to the new classes * Replace string.format with f-string in python code * Fix some coding style issues: spacing, indentation, typo, comments v2: https://www.spinics.net/lists/linux-rdma/msg97936.html * Put the kernel header updates into a separate commit * Add comments for the data structure used in python ioctl calls * Fix issues related to symbol versioning * Fix styling issues: extra spaces, unncecessary variable, typo * Fix an inproper error code usage * Put the new op into ibv_context_ops instead if verbs_context v1: https://www.spinics.net/lists/linux-rdma/msg97865.html * Add user space API for registering dma-buf based memory regions * Update pyverbs with the new API * Add new tests This is the user space counter-part of the kernel patch set to add dma-buf support to the RDMA subsystem. 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. Pull request at github: https://github.com/linux-rdma/rdma-core/pull/895 Jianxin Xiong (6): Update kernel headers verbs: Support dma-buf based memory region mlx5: Support dma-buf based memory region pyverbs: Add dma-buf based MR support tests: Add tests for dma-buf based memory regions tests: Bug fix for get_access_flags() buildlib/pyverbs_functions.cmake | 78 ++++++--- debian/libibverbs1.symbols | 2 + kernel-headers/rdma/ib_user_ioctl_cmds.h | 14 ++ libibverbs/CMakeLists.txt | 2 +- libibverbs/cmd_mr.c | 38 +++++ libibverbs/driver.h | 8 + libibverbs/dummy_ops.c | 11 ++ libibverbs/libibverbs.map.in | 6 + libibverbs/man/ibv_reg_mr.3 | 27 ++- libibverbs/verbs.c | 19 +++ libibverbs/verbs.h | 7 + providers/mlx5/mlx5.c | 2 + providers/mlx5/mlx5.h | 3 + providers/mlx5/verbs.c | 22 +++ pyverbs/CMakeLists.txt | 11 +- pyverbs/dmabuf.pxd | 15 ++ pyverbs/dmabuf.pyx | 73 ++++++++ pyverbs/dmabuf_alloc.c | 278 +++++++++++++++++++++++++++++++ pyverbs/dmabuf_alloc.h | 19 +++ pyverbs/libibverbs.pxd | 2 + pyverbs/mr.pxd | 6 + pyverbs/mr.pyx | 105 +++++++++++- tests/args_parser.py | 4 + tests/test_mr.py | 266 ++++++++++++++++++++++++++++- tests/utils.py | 30 +++- 25 files changed, 1012 insertions(+), 36 deletions(-) create mode 100644 pyverbs/dmabuf.pxd create mode 100644 pyverbs/dmabuf.pyx create mode 100644 pyverbs/dmabuf_alloc.c create mode 100644 pyverbs/dmabuf_alloc.h -- 1.8.3.1
WARNING: multiple messages have this Message-ID (diff)
From: Jianxin Xiong <jianxin.xiong@intel.com> To: linux-rdma@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: Yishai Hadas <yishaih@nvidia.com>, Leon Romanovsky <leon@kernel.org>, Edward Srouji <edwards@nvidia.com>, Jason Gunthorpe <jgg@ziepe.ca>, Doug Ledford <dledford@redhat.com>, Daniel Vetter <daniel.vetter@intel.com>, Christian Koenig <christian.koenig@amd.com>, Jianxin Xiong <jianxin.xiong@intel.com> Subject: [PATCH rdma-core v7 0/6] Add user space dma-buf support Date: Mon, 25 Jan 2021 11:56:56 -0800 [thread overview] Message-ID: <1611604622-86968-1-git-send-email-jianxin.xiong@intel.com> (raw) This is the seventh version of the patch series. Change log: v7: * Rebase to the latest rdma-core master (commit a4885eda9addc4) * Rerun kernel-headers/update against linux-rdma for-next so that the kernel commit id in the commit message is correct v6: https://www.spinics.net/lists/linux-rdma/msg99221.html * Rebase to the latest rdma-core master (commit 14006f2f841b0c) * Update the ABI symbol version to match new package version; also bump the private ABI version because new function has been added to the provider interface * Avoid changing 'struct ibv_context_ops' by replacing SET_OP() with SET_PRIV_OP_IC() * Replace sprintf() with snprintf() * Keep the ops in verbs_set_ops() sorted * Fix some styling issues: extra spaces, struct 0-initialization, error checking control flow v5: https://www.spinics.net/lists/linux-rdma/msg99015.html * Use a different mr_type for dmabuf so that ibv_dofork_range() is not called inside ibv_dereg_mr() for dmabuf based mr v4: https://www.spinics.net/lists/linux-rdma/msg98135.html * Rework the cmake funciton rdma_cython_module to support both single source (.pyx) and multiple source (.pyx + [.c]*) scenarios instead of using two separate functions * Rename 'dri_*' to 'drm_*' for the dmabuf allocation interface * Add option to dmabuf allocation routine to allow allocation from GTT instead of VRAM * Add proper CPU access flags when allocating dmabufs * Remove 'radeon' driver support from the dmabuf allocation routines * Add comand line arguments to the tests for selecting GPU unit and setting the option for allocating from GTT v3: https://www.spinics.net/lists/linux-rdma/msg98059.html * Add parameter 'iova' to the new ibv_reg_dmabuf_mr() API * Change the way of allocating dma-buf object - use /dev/dri/renderD* instead of /dev/dri/card* and use GEM object instead of dumb buffer * Add cmake function to allow building modules with mixed cython and C source files * Add new tests that use dma-buf MRs for send/recv and rdma traffic * Skip dma-buf tests on unsupported systems * Remove some use of random values in the new tests * Add dealloc() and close() methods to the new classes * Replace string.format with f-string in python code * Fix some coding style issues: spacing, indentation, typo, comments v2: https://www.spinics.net/lists/linux-rdma/msg97936.html * Put the kernel header updates into a separate commit * Add comments for the data structure used in python ioctl calls * Fix issues related to symbol versioning * Fix styling issues: extra spaces, unncecessary variable, typo * Fix an inproper error code usage * Put the new op into ibv_context_ops instead if verbs_context v1: https://www.spinics.net/lists/linux-rdma/msg97865.html * Add user space API for registering dma-buf based memory regions * Update pyverbs with the new API * Add new tests This is the user space counter-part of the kernel patch set to add dma-buf support to the RDMA subsystem. 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. Pull request at github: https://github.com/linux-rdma/rdma-core/pull/895 Jianxin Xiong (6): Update kernel headers verbs: Support dma-buf based memory region mlx5: Support dma-buf based memory region pyverbs: Add dma-buf based MR support tests: Add tests for dma-buf based memory regions tests: Bug fix for get_access_flags() buildlib/pyverbs_functions.cmake | 78 ++++++--- debian/libibverbs1.symbols | 2 + kernel-headers/rdma/ib_user_ioctl_cmds.h | 14 ++ libibverbs/CMakeLists.txt | 2 +- libibverbs/cmd_mr.c | 38 +++++ libibverbs/driver.h | 8 + libibverbs/dummy_ops.c | 11 ++ libibverbs/libibverbs.map.in | 6 + libibverbs/man/ibv_reg_mr.3 | 27 ++- libibverbs/verbs.c | 19 +++ libibverbs/verbs.h | 7 + providers/mlx5/mlx5.c | 2 + providers/mlx5/mlx5.h | 3 + providers/mlx5/verbs.c | 22 +++ pyverbs/CMakeLists.txt | 11 +- pyverbs/dmabuf.pxd | 15 ++ pyverbs/dmabuf.pyx | 73 ++++++++ pyverbs/dmabuf_alloc.c | 278 +++++++++++++++++++++++++++++++ pyverbs/dmabuf_alloc.h | 19 +++ pyverbs/libibverbs.pxd | 2 + pyverbs/mr.pxd | 6 + pyverbs/mr.pyx | 105 +++++++++++- tests/args_parser.py | 4 + tests/test_mr.py | 266 ++++++++++++++++++++++++++++- tests/utils.py | 30 +++- 25 files changed, 1012 insertions(+), 36 deletions(-) create mode 100644 pyverbs/dmabuf.pxd create mode 100644 pyverbs/dmabuf.pyx create mode 100644 pyverbs/dmabuf_alloc.c create mode 100644 pyverbs/dmabuf_alloc.h -- 1.8.3.1 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2021-01-26 1:49 UTC|newest] Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-01-25 19:56 Jianxin Xiong [this message] 2021-01-25 19:56 ` [PATCH rdma-core v7 0/6] Add user space dma-buf support Jianxin Xiong 2021-01-25 19:56 ` [PATCH rdma-core v7 1/6] Update kernel headers Jianxin Xiong 2021-01-25 19:56 ` Jianxin Xiong 2021-01-25 19:56 ` [PATCH rdma-core v7 2/6] verbs: Support dma-buf based memory region Jianxin Xiong 2021-01-25 19:56 ` Jianxin Xiong 2021-01-25 19:56 ` [PATCH rdma-core v7 3/6] mlx5: " Jianxin Xiong 2021-01-25 19:56 ` Jianxin Xiong 2021-01-25 19:57 ` [PATCH rdma-core v7 4/6] pyverbs: Add dma-buf based MR support Jianxin Xiong 2021-01-25 19:57 ` Jianxin Xiong 2021-01-31 15:31 ` Gal Pressman 2021-01-31 15:31 ` Gal Pressman 2021-02-01 6:16 ` Leon Romanovsky 2021-02-01 6:16 ` Leon Romanovsky 2021-02-01 14:10 ` Daniel Vetter 2021-02-01 14:10 ` Daniel Vetter 2021-02-01 15:29 ` Jason Gunthorpe 2021-02-01 15:29 ` Jason Gunthorpe 2021-02-01 17:03 ` Xiong, Jianxin 2021-02-01 17:03 ` Xiong, Jianxin 2021-02-02 15:24 ` Daniel Vetter 2021-02-02 15:24 ` Daniel Vetter 2021-02-03 6:03 ` Leon Romanovsky 2021-02-03 6:03 ` Leon Romanovsky 2021-02-03 16:57 ` Xiong, Jianxin 2021-02-03 16:57 ` Xiong, Jianxin 2021-02-03 17:53 ` Daniel Vetter 2021-02-03 17:53 ` Daniel Vetter 2021-02-03 17:56 ` Jason Gunthorpe 2021-02-03 17:56 ` Jason Gunthorpe 2021-02-03 17:58 ` Xiong, Jianxin 2021-02-03 17:58 ` Xiong, Jianxin 2021-02-03 18:14 ` Emil Velikov 2021-02-03 18:14 ` Emil Velikov 2021-01-25 19:57 ` [PATCH rdma-core v7 5/6] tests: Add tests for dma-buf based memory regions Jianxin Xiong 2021-01-25 19:57 ` Jianxin Xiong 2021-01-31 8:44 ` John Hubbard 2021-01-31 8:44 ` John Hubbard 2021-02-01 17:12 ` Xiong, Jianxin 2021-02-01 17:12 ` Xiong, Jianxin 2021-01-25 19:57 ` [PATCH rdma-core v7 6/6] tests: Bug fix for get_access_flags() Jianxin Xiong 2021-01-25 19:57 ` Jianxin Xiong
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1611604622-86968-1-git-send-email-jianxin.xiong@intel.com \ --to=jianxin.xiong@intel.com \ --cc=christian.koenig@amd.com \ --cc=daniel.vetter@intel.com \ --cc=dledford@redhat.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=edwards@nvidia.com \ --cc=jgg@ziepe.ca \ --cc=leon@kernel.org \ --cc=linux-rdma@vger.kernel.org \ --cc=sumit.semwal@linaro.org \ --cc=yishaih@nvidia.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.