ibv_alloc_null_mr (3) - Linux Man Pages
ibv_alloc_null_mr: allocate a null memory region (MR)
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.
Yonatan Cohen <yonatanc [at] mellanox.com>