diff options
author | Matan Barak <matanb@mellanox.com> | 2014-07-31 04:01:28 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-08-01 18:11:13 -0400 |
commit | 7e6edb9b2e0bcfb2a588db390c44d120213c57ae (patch) | |
tree | 9a8699e7cf72bc2c12574e3a2c46ddf10c542cd2 /include/rdma | |
parent | 64aa90f26c06e1cb2aacfb98a7d0eccfbd6c1a91 (diff) |
IB/core: Add user MR re-registration support
Memory re-registration is a feature that enables changing the
attributes of a memory region registered by user-space, including PD,
translation (address and length) and access flags.
Add the required support in uverbs and the kernel verbs API.
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'include/rdma')
-rw-r--r-- | include/rdma/ib_verbs.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 7ccef342f724..ed44cc07a7b3 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
@@ -1097,7 +1097,8 @@ struct ib_mr_attr { | |||
1097 | enum ib_mr_rereg_flags { | 1097 | enum ib_mr_rereg_flags { |
1098 | IB_MR_REREG_TRANS = 1, | 1098 | IB_MR_REREG_TRANS = 1, |
1099 | IB_MR_REREG_PD = (1<<1), | 1099 | IB_MR_REREG_PD = (1<<1), |
1100 | IB_MR_REREG_ACCESS = (1<<2) | 1100 | IB_MR_REREG_ACCESS = (1<<2), |
1101 | IB_MR_REREG_SUPPORTED = ((IB_MR_REREG_ACCESS << 1) - 1) | ||
1101 | }; | 1102 | }; |
1102 | 1103 | ||
1103 | /** | 1104 | /** |
@@ -1547,6 +1548,13 @@ struct ib_device { | |||
1547 | u64 virt_addr, | 1548 | u64 virt_addr, |
1548 | int mr_access_flags, | 1549 | int mr_access_flags, |
1549 | struct ib_udata *udata); | 1550 | struct ib_udata *udata); |
1551 | int (*rereg_user_mr)(struct ib_mr *mr, | ||
1552 | int flags, | ||
1553 | u64 start, u64 length, | ||
1554 | u64 virt_addr, | ||
1555 | int mr_access_flags, | ||
1556 | struct ib_pd *pd, | ||
1557 | struct ib_udata *udata); | ||
1550 | int (*query_mr)(struct ib_mr *mr, | 1558 | int (*query_mr)(struct ib_mr *mr, |
1551 | struct ib_mr_attr *mr_attr); | 1559 | struct ib_mr_attr *mr_attr); |
1552 | int (*dereg_mr)(struct ib_mr *mr); | 1560 | int (*dereg_mr)(struct ib_mr *mr); |