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_pd() verbs
Introduce ibv_import/unimport_pd() verbs, this enables an application who previously imported a device to import a PD from that context and use this shared object for its needs. 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
108 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,59 @@ | ||
--- | ||
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_pd, ibv_unimport_pd | ||
--- | ||
|
||
# NAME | ||
|
||
ibv_import_pd - import a PD from a given ibv_context | ||
|
||
ibv_unimport_pd - unimport a PD | ||
|
||
# SYNOPSIS | ||
|
||
```c | ||
#include <infiniband/verbs.h> | ||
|
||
struct ibv_pd *ibv_import_pd(struct ibv_context *context, uint32_t pd_handle); | ||
void ibv_unimport_pd(struct ibv_pd *pd) | ||
|
||
``` | ||
# DESCRIPTION | ||
**ibv_import_pd()** returns a protection domain (PD) that is associated with the given | ||
*pd_handle* in the given *context*. | ||
The input *pd_handle* value must be a valid kernel handle for a PD object in the given *context*. | ||
It can be achieved from the original PD by getting its ibv_pd->handle member value. | ||
The returned *ibv_pd* can be used in all verbs that get a protection domain. | ||
**ibv_unimport_pd()** unimport the PD. | ||
Once the PD usage has been ended ibv_dealloc_pd() or ibv_unimport_pd() 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 PD. | ||
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_pd()** returns a pointer to the allocated PD, or NULL if the request fails. | ||
# SEE ALSO | ||
**ibv_alloc_pd**(3), | ||
**ibv_dealloc_pd**(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