.\" Automatically generated by Pandoc 3.1.3 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .TH "ibv_alloc_null_mr" "3" "2018-6-1" "libibverbs" "Libibverbs Programmer\[cq]s Manual" .hy .SH NAME .PP ibv_alloc_null_mr - allocate a null memory region (MR) .SH SYNOPSIS .IP .nf \f[C] #include struct ibv_mr *ibv_alloc_null_mr(struct ibv_pd *pd); \f[R] .fi .SH DESCRIPTION .PP \f[B]ibv_alloc_null_mr()\f[R] allocates a null memory region (MR) that is associated with the protection domain \f[I]pd\f[R]. .PP 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. .PP 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. .PP Specifically upon \f[B]ibv_post_send()\f[R] the device skips PCI read cycles and upon \f[B]ibv_post_recv()\f[R] the device skips PCI write cycles which finally improves performance. .PP \f[B]ibv_dereg_mr()\f[R] deregisters the MR. The use of ibv_rereg_mr() or ibv_bind_mw() with this MR is invalid. .SH RETURN VALUE .PP \f[B]ibv_alloc_null_mr()\f[R] returns a pointer to the allocated MR, or NULL if the request fails. .SH SEE ALSO .PP \f[B]ibv_reg_mr\f[R](3), \f[B]ibv_dereg_mr\f[R](3), .SH AUTHOR .PP Yonatan Cohen