NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | SEE ALSO | AUTHOR | COLOPHON |
|
|
ibv_alloc_null_mr(3) Libibverbs Programmer’s Manual ibv_alloc_null_mr(3)
ibv_alloc_null_mr - allocate a null memory region (MR)
#include <infiniband/verbs.h> struct ibv_mr *ibv_alloc_null_mr(struct ibv_pd *pd);
ibv_alloc_null_mr() allocates a null memory region (MR) that is associated with the protection domain pd. A null MR discards all data written to it, and always returns 0 on read. It has the maximum length and only the lkey is valid, the MR is not exposed as an rkey. A device should implement the null MR in a way that bypasses PCI transfers, internally discarding or sourcing 0 data. This provides a way to avoid PCI bus transfers by using a scatter/gather list in commands if applications do not intend to access the data, or need data to be 0 filled. Specifically upon ibv_post_send() the device skips PCI read cycles and upon ibv_post_recv() the device skips PCI write cycles which finally improves performance. ibv_dereg_mr() deregisters the MR. The use of ibv_rereg_mr() or ibv_bind_mw() with this MR is invalid.
ibv_alloc_null_mr() returns a pointer to the allocated MR, or NULL if the request fails.
ibv_reg_mr(3), ibv_dereg_mr(3),
Yonatan Cohen ⟨yonatanc@mellanox.com⟩
This page is part of the rdma-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 is not part of the original manual page), send a mail to
man-pages@man7.org
libibverbs 2018-6-1 ibv_alloc_null_mr(3)