User Manual
Features Overview and ConfigurationRev 2.3-1.0.1
Mellanox Technologies
154
The request to share the MR can be repeated multiple times and an arbitrary number of
Memory Regions can potentially share the same physical memory locations.
Usage:
• Uses the “handle” field that was returned from the ibv_exp_reg_mr as the mr_handle
• Supplies the desired “access mode” for that MR
• Supplies the address field which can be either NULL or any hint as the required output. The address and
its length are returned as part of the
ibv_mr struct.
To achieve high performance it is highly recommended to supply an address that is aligned as the origi-
nal memory region address. Generally, it may be an alignment to 4M address.
For further information on how to use the ibv_exp_reg_shared_mr verb, please refer to the
ibv_exp_reg_shared_mr man page and/or to the ibv_shared_mr sample program which demon-
strates a basic usage of this verb.
Further information on the
ibv_shared_mr sample program can be found in the ibv_shared_mr
man page.
3.2.7.3 Memory Region Re-registration
Memory Region Re-registration allows the user to change attributes of the memory region. The
user may change the PD, access flags or the address and length of the memory region. Memory
region supports contagious pages allocation. Consequently
, it de-registers memory region fol-
lowed by register memory region. Where possible, resources are reused instead of de-allocated
and reallocated.
Please note that the verb is implemented as an experimental verb.
int ibv_exp_rereg_mr(struct ibv_mr *mr, int flags, struct ibv_pd *pd, void *addr, size_t
length, uint64_t access, struct ibv_exp_rereg_mr_attr *attr);
@mr: The memory region to modify.
@flags: A bit-mask used to indicate which of the following properties
of the memory region are being modified. Flags should be one
of:
IBV_EXP_REREG_MR_CHANGE_TRANSLATION /* Change translation
(location and length) */
IBV_EXP_REREG_MR_CHANGE_PD/* Change protection domain*/
IBV_EXP_REREG_MR_CHANGE_ACCESS/* Change access flags*/
@pd: If IBV_EXP_REREG_MR_CHANGE_PD is set in flags, this field spec-
ifies the new protection domain to associated with the memory
region, otherwise, this parameter is ignored.
@addr: If IBV_EXP_REREG_MR_CHANGE_TRANSLATION is set in flags, this
field specifies the start of the virtual address to use in the
new translation, otherwise, this parameter is ignored.
@length: If IBV_EXP_REREG_MR_CHANGE_TRANSLATION is set in flags, this
field specifies the length of the virtual address to use in the
new translation, otherwise, this parameter is ignored.