1IBV_REREG_MR(3)         Libibverbs Programmer’s Manual         IBV_REREG_MR(3)
2
3
4

NAME

6       ibv_rereg_mr - re-register a memory region (MR)
7

SYNOPSIS

9              #include <infiniband/verbs.h>
10
11              int ibv_rereg_mr(struct ibv_mr *mr,
12                               int flags,
13                               struct ibv_pd *pd,
14                               void *addr,
15                               size_t length,
16                               int access);
17

DESCRIPTION

19       ibv_rereg_mr()  Modifies  the  attributes  of an existing memory region
20       (MR) mr.  Conceptually, this call  performs  the  functions  deregister
21       memory  region followed by register memory region.  Where possible, re‐
22       sources are reused instead of deallocated and reallocated.
23
24       flags is a bit-mask used to indicate which of the following  properties
25       of the memory region are being modified.  Flags should be a combination
26       (bit field) of:
27
28       IBV_REREG_MR_CHANGE_TRANSLATION
29              Change translation (location and length)
30
31       IBV_REREG_MR_CHANGE_PD
32              Change protection domain
33
34       IBV_REREG_MR_CHANGE_ACCESS
35              Change access flags
36
37       When IBV_REREG_MR_CHANGE_PD is used, pd represents the new PD  this  MR
38       should be registered to.
39
40       When  IBV_REREG_MR_CHANGE_TRANSLATION  is  used,  addr.  represents the
41       virtual address (user-space pointer) of the new MR, while length repre‐
42       sents its length.
43
44       The  access  and other flags are represented in the field access.  This
45       field describes the desired memory protection attributes; it is  either
46       0 or the bitwise OR of one or more of ibv_access_flags.
47

RETURN VALUE

49       ibv_rereg_mr()  returns  0 on success, otherwise an error has occurred,
50       enum ibv_rereg_mr_err_code represents the error as of below.
51
52       IBV_REREG_MR_ERR_INPUT - Old MR is valid, an input error  was  detected
53       by libibverbs.
54
55       IBV_REREG_MR_ERR_DONT_FORK_NEW - Old MR is valid, failed via don’t fork
56       on new address range.
57
58       IBV_REREG_MR_ERR_DO_FORK_OLD - New MR is valid, failed via do  fork  on
59       old address range.
60
61       IBV_REREG_MR_ERR_CMD - MR shouldn’t be used, command error.
62
63       IBV_REREG_MR_ERR_CMD_AND_DO_FORK_NEW  -  MR  shouldn’t be used, command
64       error, invalid fork state on new address range.
65

NOTES

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

SEE ALSO

71       ibv_dereg_mr(3), ibv_reg_mr(3)
72

AUTHORS

74       Matan Barak <matanb@mellanox.com>, Yishai Hadas <yishaih@mellanox.com>
75
76
77
78libibverbs                        2016-03-13                   IBV_REREG_MR(3)
Impressum