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_device() verb
Introduce ibv_import_device(), it enable a process to get an ibv_context that is associated with a given command FD that it owns. A process is creating a device and then uses some of the Linux systems calls to dup its 'cmd_fd' member and lets other process to obtain owning on. Once other process obtains the 'cmd_fd' it can call ibv_import_device() which returns an ibv_contxet on the original RDMA device. 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
7 changed files
with
120 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,48 @@ | ||
--- | ||
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_device | ||
--- | ||
|
||
# NAME | ||
|
||
ibv_import_device - import a device from a given comamnd FD | ||
|
||
# SYNOPSIS | ||
|
||
```c | ||
#include <infiniband/verbs.h> | ||
|
||
struct ibv_context *ibv_import_device(int cmd_fd); | ||
|
||
``` | ||
# DESCRIPTION | ||
**ibv_import_device()** returns an *ibv_context* pointer that is associated with the given | ||
*cmd_fd*. | ||
The *cmd_fd* is obtained from the ibv_context cmd_fd member, which must be dup'd (eg by dup(), SCM_RIGHTS, etc) | ||
before being passed to ibv_import_device(). | ||
Once the *ibv_context* usage has been ended *ibv_close_device()* should be called. | ||
This call may cleanup whatever is needed/opposite of the import including closing the command FD. | ||
# RETURN VALUE | ||
**ibv_import_device()** returns a pointer to the allocated RDMA context, or NULL if the request fails. | ||
# SEE ALSO | ||
**ibv_open_device**(3), | ||
**ibv_close_device**(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