| 1 | --- |
| 2 | date: 2025-12-7 |
| 3 | footer: libibverbs |
| 4 | header: "Libibverbs Programmer's Manual" |
| 5 | layout: page |
| 6 | license: 'Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md' |
| 7 | section: 3 |
| 8 | title: ibv_dm_export_dmabuf_fd |
| 9 | --- |
| 10 | |
| 11 | # NAME |
| 12 | |
| 13 | ibv_dm_export_dmabuf_fd - export dmabuf fd for a given ibv_dm. |
| 14 | |
| 15 | # SYNOPSIS |
| 16 | |
| 17 | ```c |
| 18 | #include <infiniband/verbs.h> |
| 19 | |
| 20 | int ibv_dm_export_dmabuf_fd(struct ibv_dm *dm); |
| 21 | ``` |
| 22 | |
| 23 | # DESCRIPTION |
| 24 | |
| 25 | **ibv_dm_export_dmabuf_fd()** exports a dmabuf fd that is associated with the given |
| 26 | *dm*. |
| 27 | |
| 28 | The returned fd can be later used for DMA and RDMA operations associated with it. |
| 29 | |
| 30 | Once the usage has been ended close() should be called while supplying the fd. |
| 31 | |
| 32 | This call will release resources that were earlier allocated using the **ibv_dm_export_dmabuf_fd()** API. |
| 33 | |
| 34 | # ARGUMENTS |
| 35 | |
| 36 | *dm* |
| 37 | : An ibv_dm pointer to export the dmabuf fd for its memory. |
| 38 | |
| 39 | # RETURN VALUE |
| 40 | |
| 41 | **ibv_dm_export_dmabuf_fd()** returns an fd number >= 0 upon success, or -1 if the request fails and errno set to the error. |
| 42 | |
| 43 | # SEE ALSO |
| 44 | |
| 45 | **ibv_reg_mr_ex**(3) |
| 46 | |
| 47 | # AUTHOR |
| 48 | |
| 49 | Yishai Hadas <[email protected]> |