ibv_rereg_mr(3) — Linux manual page

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | NOTES | SEE ALSO | AUTHORS | COLOPHON

IBV_REREG_MR(3)       Libibverbs Programmer’s Manual      IBV_REREG_MR(3)

NAME         top

       ibv_rereg_mr - re-register a memory region (MR)

SYNOPSIS         top

              #include <infiniband/verbs.h>

              int ibv_rereg_mr(struct ibv_mr *mr,
                               int flags,
                               struct ibv_pd *pd,
                               void *addr,
                               size_t length,
                               int access);

DESCRIPTION         top

       ibv_rereg_mr() Modifies the attributes of an existing memory
       region (MR) mr.  Conceptually, this call performs the functions
       deregister memory region followed by register memory region.
       Where possible, resources are reused instead of deallocated and
       reallocated.

       flags is a bit-mask used to indicate which of the following
       properties of the memory region are being modified.  Flags should
       be a combination (bit field) of:

       IBV_REREG_MR_CHANGE_TRANSLATION
              Change translation (location and length)

       IBV_REREG_MR_CHANGE_PD
              Change protection domain

       IBV_REREG_MR_CHANGE_ACCESS
              Change access flags

       When IBV_REREG_MR_CHANGE_PD is used, pd represents the new PD this
       MR should be registered to.

       When IBV_REREG_MR_CHANGE_TRANSLATION is used, addr.  represents
       the virtual address (user-space pointer) of the new MR, while
       length represents its length.

       The access and other flags are represented in the field access.
       This field describes the desired memory protection attributes; it
       is either 0 or the bitwise OR of one or more of ibv_access_flags.

RETURN VALUE         top

       ibv_rereg_mr() returns 0 on success, otherwise an error has
       occurred, enum ibv_rereg_mr_err_code represents the error as of
       below.

       IBV_REREG_MR_ERR_INPUT - Old MR is valid, an input error was
       detected by libibverbs.

       IBV_REREG_MR_ERR_DONT_FORK_NEW - Old MR is valid, failed via don’t
       fork on new address range.

       IBV_REREG_MR_ERR_DO_FORK_OLD - New MR is valid, failed via do fork
       on old address range.

       IBV_REREG_MR_ERR_CMD - MR shouldn’t be used, command error.

       IBV_REREG_MR_ERR_CMD_AND_DO_FORK_NEW - MR shouldn’t be used,
       command error, invalid fork state on new address range.

NOTES         top

       Even on a failure, the user still needs to call ibv_dereg_mr on
       this MR.

SEE ALSO         top

       ibv_dereg_mr(3), ibv_reg_mr(3)

AUTHORS         top

       Matan Barak ⟨matanb@mellanox.com⟩, Yishai Hadas
       ⟨yishaih@mellanox.com⟩

COLOPHON         top

       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                      2016-03-13                IBV_REREG_MR(3)

Pages that refer to this page: ibv_advise_mr(3)