-
Notifications
You must be signed in to change notification settings - Fork 678
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
pyverbs: Introducing parent domain #615
Conversation
Please rebase |
8c67f17
to
8de607b
Compare
PR was rebased and fixed according to Jason's comments from the mail thread. |
It doesn't pass CI CMake Error at tests/cmake_install.cmake:81 (file): ABI check skipped, no ABI/ directory. |
Add new mem_alloc module which wraps some C memory allocation functions such as posix_memalign, malloc and free. This allows Pyverbs' users to easily allocate and free memory in C style, i.e when the memory address must be passed to a driver API. Signed-off-by: Edward Srouji <edwards@mellanox.com> Reviewed-by: Noa Osherovich <noaos@mellanox.com>
The parent domain object extends the normal PD (protection domain) and can be used interchangeably with it. This patch adds ParentDomain class, in order to allow the user to allocate parent domain in a user-friendly way. In addition, ParentDomainContext class was added which is used as the pd_context and it includes PD (protection domain) object, alloc and free Python functions. This allows the user to implement allocators in Python that are callable from the C callbacks wrappers via driver code. Signed-off-by: Edward Srouji <edwards@mellanox.com> Reviewed-by: Noa Osherovich <noaos@mellanox.com>
Add a documentation for ParentDomain with a simple code snippet demonstrating the creation of the object with Python defined allocators. Signed-off-by: Edward Srouji <edwards@mellanox.com> Reviewed-by: Noa Osherovich <noaos@mellanox.com>
The test checks parent domain creation without custom allocators, with custom allocators that return USE_DEFAULT (indicates the driver to use the default allocator) and custom allocators with local memory allocation. In addition, in each case a QP and SRQ are created in order to verify the usage of the allocators. Signed-off-by: Edward Srouji <edwards@mellanox.com> Reviewed-by: Noa Osherovich <noaos@mellanox.com>
8de607b
to
4fec673
Compare
Issue was fixed, PR was updated and passes all checks. |
Parent domains extend protection domains with custom allocators
callbacks given by the user and override the provider's allocation.
This series adds support for parent domain in pyverbs, including
a basic test and a documentation.
In order to allow Python users to provide Python allocators, pyverbs
is using the pd_context object and an internal wrapper that makes the
Python functions to be called from the provider.