File: 58748d44e47709c08982c6349ef8fc8891398ef3

package info (click to toggle)
rdma-core 33.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 13,844 kB
  • sloc: ansic: 145,804; python: 5,688; sh: 2,761; perl: 1,465; makefile: 73
file content (88 lines) | stat: -rw-r--r-- 2,427 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
.\" Automatically generated by Pandoc 2.5
.\"
.TH "mlx5dv_devx_create_cmd_comp, mlx5dv_devx_destroy_cmd_comp, get_async" "3" "" "" ""
.hy
.SH NAME
.PP
mlx5dv_devx_create_cmd_comp \- Create a command completion to be used
for DEVX asynchronous commands.
.PP
mlx5dv_devx_destroy_cmd_comp \- Destroy a devx command completion.
.PP
mlx5dv_devx_get_async_cmd_comp \- Get an asynchronous command
completion.
# SYNOPSIS
.IP
.nf
\f[C]
#include <infiniband/mlx5dv.h>

struct mlx5dv_devx_cmd_comp {
    int fd;
};

struct mlx5dv_devx_cmd_comp *
mlx5dv_devx_create_cmd_comp(struct ibv_context *context)

void mlx5dv_devx_destroy_cmd_comp(struct mlx5dv_devx_cmd_comp *cmd_comp)

struct mlx5dv_devx_async_cmd_hdr {
    uint64_t    wr_id;
    uint8_t     out_data[];
};

int mlx5dv_devx_get_async_cmd_comp(struct mlx5dv_devx_cmd_comp *cmd_comp,
                   struct mlx5dv_devx_async_cmd_hdr *cmd_resp,
                   size_t cmd_resp_len)
\f[R]
.fi
.SH DESCRIPTION
.PP
Create or destroy a command completion to be used for DEVX asynchronous
commands.
.PP
The create verb exposes an mlx5dv_devx_cmd_comp object that can be used
as part of asynchronous DEVX commands.
This lets an application run asynchronously without blocking and once
the response is ready read it from this object.
.PP
The response can be read by the mlx5dv_devx_get_async_cmd_comp() API,
upon response the \f[I]wr_id\f[R] that was supplied upon the
asynchronous command is returned and the \f[I]out_data\f[R] includes the
data itself.
The application must supply a large enough buffer to match any command
that was issued on the \f[I]cmd_comp\f[R], its size is given by the
input \f[I]cmd_resp_len\f[R] parameter.
.SH ARGUMENTS
.TP
.B \f[I]context\f[R]
.IP
.nf
\f[C]
RDMA device context to create the action on.
\f[R]
.fi
.TP
.B \f[I]cmd_comp\f[R]
The command completion object.
.TP
.B \f[I]cmd_resp\f[R]
The output data from the asynchronous command.
.TP
.B \f[I]cmd_resp_len\f[R]
The output buffer size to hold the response.
.SH RETURN VALUE
.PP
Upon success \f[I]mlx5dv_devx_create_cmd_comp\f[R] will return a new
\f[I]struct mlx5dv_devx_cmd_comp\f[R] object, on error NULL will be
returned and errno will be set.
.PP
Upon success \f[I]mlx5dv_devx_get_async_cmd_comp\f[R] will return 0,
otherwise errno will be returned.
.SH SEE ALSO
.PP
\f[I]mlx5dv_open_device(3)\f[R], \f[I]mlx5dv_devx_obj_create(3)\f[R]
.PP
#AUTHOR
.PP
Yishai Hadas <yishaih@mellanox.com>