Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
verbs: Introduce ibv_import/unimport_mr() verbs
Introduce ibv_import/unimport_mr() verbs, this enables an application which previously imported the device and an associated PD to import an MR that is associated with. A detailed man page as part of this patch describes the expected usage and flow. Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
- Loading branch information
Showing
8 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
date: 2020-5-3 | ||
footer: libibverbs | ||
header: "Libibverbs Programmer's Manual" | ||
layout: page | ||
license: 'Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md' | ||
section: 3 | ||
title: ibv_import_mr ibv_unimport_mr | ||
--- | ||
|
||
# NAME | ||
|
||
ibv_import_mr - import an MR from a given ibv_pd | ||
|
||
ibv_unimport_mr - unimport an MR | ||
|
||
# SYNOPSIS | ||
|
||
```c | ||
#include <infiniband/verbs.h> | ||
|
||
struct ibv_mr *ibv_import_mr(struct ibv_pd *pd, uint32_t mr_handle); | ||
void ibv_unimport_mr(struct ibv_mr *mr) | ||
|
||
``` | ||
# DESCRIPTION | ||
**ibv_import_mr()** returns a Memory region (MR) that is associated with the given | ||
*mr_handle* in the RDMA context that assosicated with the given *pd*. | ||
The input *mr_handle* value must be a valid kernel handle for an MR object in the assosicated RDMA context. | ||
It can be achieved from the original MR by getting its ibv_mr->handle member value. | ||
**ibv_unimport_mr()** un import the MR. | ||
Once the MR usage has been ended ibv_dereg_mr() or ibv_unimport_mr() should be called. | ||
The first one will go to the kernel to destroy the object once the second one way cleanup what | ||
ever is needed/opposite of the import without calling the kernel. | ||
This is the responsibility of the application to coordinate between all ibv_context(s) that use this MR. | ||
Once destroy is done no other process can touch the object except for unimport. All users of the context must | ||
collaborate to ensure this. | ||
# RETURN VALUE | ||
**ibv_import_mr()** returns a pointer to the allocated MR, or NULL if the request fails. | ||
# NOTES | ||
The *addr* field in the imported MR is not applicable, NULL value is expected. | ||
# SEE ALSO | ||
**ibv_reg_mr**(3), | ||
**ibv_reg_dm_mr**(3), | ||
**ibv_reg_mr_iova**(3), | ||
**ibv_reg_mr_iova2**(3), | ||
**ibv_dereg_mr**(3), | ||
# AUTHOR | ||
Yishai Hadas <yishaih@mellanox.com> | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters