File: 2a9899c3a62b0c9164f7f76f08930a7e80ea9e51

package info (click to toggle)
rdma-core 56.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 17,196 kB
  • sloc: ansic: 171,361; python: 13,724; sh: 2,774; perl: 1,465; makefile: 73
file content (77 lines) | stat: -rw-r--r-- 2,256 bytes parent folder | download | duplicates (2)
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
.\" Automatically generated by Pandoc 2.9.2.1
.\"
.TH "mlx5dv_devx_get_event" "3" "" "" ""
.hy
.SH NAME
.PP
mlx5dv_devx_get_event - Get an asynchronous event.
.SH SYNOPSIS
.IP
.nf
\f[C]
#include <infiniband/mlx5dv.h>

struct mlx5dv_devx_async_event_hdr {
    uint64_t    cookie;
    uint8_t     out_data[];
};

ssize_t mlx5dv_devx_get_event(struct mlx5dv_devx_event_channel *event_channel,
                              struct mlx5dv_devx_async_event_hdr *event_data,
                              size_t event_resp_len)
\f[R]
.fi
.SH DESCRIPTION
.PP
Get a device event on the given \f[I]event_channel\f[R].
Post a successful subscription over the event channel by calling to
mlx5dv_devx_subscribe_devx_event() the application should use this API
to get the response once an event has occurred.
.PP
Upon response the \f[I]cookie\f[R] that was supplied upon the
subscription is returned and the \f[I]out_data\f[R] includes the data
itself.
The \f[I]out_data\f[R] may be omitted in case the channel was created
with the omit data flag.
.PP
The application must supply a large enough buffer to hold the event
according to the device specification, the buffer size is given by the
input \f[I]event_resp_len\f[R] parameter.
.SH ARGUMENTS
.TP
\f[I]event_channel\f[R]
.IP
.nf
\f[C]
The channel to get the event over.
\f[R]
.fi
.TP
\f[I]event_data\f[R]
The output data from the asynchronous event.
.TP
\f[I]event_resp_len\f[R]
The output buffer size to hold the response.
.SH RETURN VALUE
.PP
Upon success \f[I]mlx5dv_devx_get_event\f[R] will return the number of
bytes read, otherwise -1 will be returned and errno was set.
.SH NOTES
.PP
In case the \f[I]event_channel\f[R] was created with the omit data flag,
events having the same type may be combined per subscription and be
reported once with the matching \f[I]cookie\f[R].
In that mode of work, ordering is not preserved between those events to
other on this channel.
.PP
On the other hand, when each event should hold the device data ordering
is preserved, however, events might be loose as of lack of kernel
memory, in that case EOVERFLOW will be reported.
.SH SEE ALSO
.PP
\f[I]mlx5dv_open_device(3)\f[R],
\f[I]mlx5dv_devx_subscribe_devx_event(3)\f[R]
.PP
#AUTHOR
.PP
Yishai Hadas <yishaih@mellanox.com>