ibv_impo...import_dm(3)
β¨ ibv_impo...import_dm(3) β¨
okay so bestie, welcome to the Libibverbs Programmerβs Manual π«Ά this little page is all about sharing one Device Memory (DM) between your RDMA contexts, and honestly? it's giving "teamwork makes the dream work" energy π
πΈ NAME πΈ
ibv_import_dm β imports a DM from a given ibv_context π
ibv_unimport_dm β unimports a DM πͺ
π SYNOPSIS π
#include <infiniband/verbs.h>
struct ibv_dm *ibv_import_dm(struct ibv_context *context, uint32_t dm_handle);
void ibv_unimport_dm(struct ibv_dm *dm)
π¦ DESCRIPTION π¦
so ibv_import_dm() returns a Device memory (DM) that is associated with the given dm_handle in the RDMA context. literally just handing you the DM, no cap β¨
the input dm_handle value must be a valid kernel handle for a DM object in the associated RDMA context, okay? no random numbers, bestie π you get it from the original DM by grabbing its ibv_dm->handle member value. that's the whole trick, iykyk.
ibv_unimport_dm() unimports the DM. once you're done using the DM, ibv_free_dm() or ibv_unimport_dm() should be called π« and here's the tea on the difference:
- the first one,
ibv_free_dm(), will go to the kernel to destroy the object - the second one,
ibv_unimport_dm(), does the cleanup of whatever is needed / the opposite of the import, without calling the kernel
lowkey important: it is the responsibility of the application to coordinate between all ibv_context(s) that use this DM. once destroy is done, no other process can touch the object except for unimport. all users of the context must collaborate to ensure this β fr fr, this is a group project where everyone actually has to pull their weight π
π§ RETURN VALUE π§
ibv_import_dm() returns a pointer to the allocated DM, or NULL if the request fails and errno is set π
π NOTES π
genuinely nothing here y'all, this section is empty and we respect that π
β SEE ALSO β
ibv_alloc_dm(3), ibv_free_dm(3),
π AUTHOR π
Maor Gottlieb <maorg@nvidia.com>
and that's the whole page bestie, you ate that π
this was libibverbs, dated 2021-1-17, and the title was ibv_impo...import_dm(3) β go forth and import responsibly π¦β¨
π¦ where this page comes from
- alpine 3.24: rdma-core-doc 61.0-r0 Β· GPL-2.0-only OR BSD-2-Clause
- centos-stream 10: rdma-core-devel 62.0-3.el10 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- ubuntu jammy: libibverbs-dev 39.0-1 Β· BSD-MIT OR GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms