Movatterモバイル変換


[0]ホーム

URL:


man7.org > Linux >man-pages

Linux/UNIX system programming training


ibv_alloc_dmah(3) — Linux manual page

NAME |SYNOPSIS |DESCRIPTION |ARGUMENTS |RETURN VALUE |SEE ALSO |AUTHOR |COLOPHON

ibv_alloc_dmah(3)     Libibverbs Programmer’s Manualibv_alloc_dmah(3)

NAME        top

       ibv_alloc_dmah - allocate a dma handle       int ibv_dealloc_dmah - deallocate a dma handle

SYNOPSIS        top

              #include <infiniband/verbs.h>              struct ibv_dmah *ibv_alloc_dmah(struct ibv_context *context, struct ibv_dmah_init_attr *attr);              int ibv_dealloc_dmah(struct ibv_dmah *dmah);

DESCRIPTION        top

ibv_alloc_dmah()allocates anibv_dmah object that is associated       with the givencontext and the inputattr parameter.       The allocated handle can be later used for optimizing DMA and RDMA       operations associated with a registered memory region.       Once theibv_dmah usage has been endedibv_dealloc_dmah() should       be called.       This call will release resources that were earlier allocated using       theibv_alloc_dmah()API.

ARGUMENTS        top

attr              enum ibv_tph_mem_type {                  IBV_TPH_MEM_TYPE_VM, /* volatile memory */                  IBV_TPH_MEM_TYPE_PM, /* persistent memory */              };              enum ibv_dmah_init_attr_mask {                  IBV_DMAH_INIT_ATTR_MASK_CPU_ID = 1 << 0,                  IBV_DMAH_INIT_ATTR_MASK_PH = 1 << 1,                  IBV_DMAH_INIT_ATTR_MASK_TPH_MEM_TYPE = 1 << 2,              };              struct ibv_dmah_init_attr {                  uint32_t comp_mask; /* From ibv_dmah_init_attr_mask */                  uint32_t cpu_id;                  uint8_t ph;                  uint8_t tph_mem_type; /* From enum ibv_tph_mem_type */              };comp_mask              Bitmask specifying what fields in the structure are valid.cpu_id The cpu id that the dma handle refers to.ph     Processing hints, used to aid in optimizing the handling of              transactions over PCIe.tph_mem_type              The target memory type, one amongenum ibv_tph_mem_type.

RETURN VALUE        top

ibv_alloc_dmah()returns a pointer to the allocated dma handle       object, or NULL if the request fails.ibv_dealloc_dmah()returns 0 upon success, otherwise the errno       value.

SEE ALSO        top

ibv_reg_mr_ex(3)

AUTHOR        top

       Yishai Hadas ⟨yishaih@nvidia.com⟩

COLOPHON        top

       This page is part of therdma-core (RDMA Core Userspace Libraries       and Daemons) project.  Information about the project can be found       at ⟨https://github.com/linux-rdma/rdma-core⟩.  If you have a bug       report for this manual page, send it to       linux-rdma@vger.kernel.org.  This page was obtained from the       project's upstream Git repository       ⟨https://github.com/linux-rdma/rdma-core.git⟩ on 2025-08-11.  (At       that time, the date of the most recent commit that was found in       the repository was 2025-08-04.)  If you discover any rendering       problems in this HTML version of the page, or you believe there is       a better or more up-to-date source for the page, or you have       corrections or improvements to the information in this COLOPHON       (which isnot part of the original manual page), send a mail to       man-pages@man7.orglibibverbs                       2025-5-8ibv_alloc_dmah(3)


HTML rendering created 2025-09-06 byMichael Kerrisk, author ofThe Linux Programming Interface.

For details of in-depthLinux/UNIX system programming training courses that I teach, lookhere.

Hosting byjambit GmbH.

Cover of TLPI


[8]ページ先頭

©2009-2025 Movatter.jp