1mlx5dv_devx_get_event(3)                              mlx5dv_devx_get_event(3)
2
3
4

NAME

6       mlx5dv_devx_get_event - Get an asynchronous event.
7

SYNOPSIS

9              #include <infiniband/mlx5dv.h>
10
11              struct mlx5dv_devx_async_event_hdr {
12                  uint64_t    cookie;
13                  uint8_t     out_data[];
14              };
15
16              ssize_t mlx5dv_devx_get_event(struct mlx5dv_devx_event_channel *event_channel,
17                                            struct mlx5dv_devx_async_event_hdr *event_data,
18                                            size_t event_resp_len)
19

DESCRIPTION

21       Get  a device event on the given event_channel.  Post a successful sub‐
22       scription  over  the  event  channel  by  calling  to  mlx5dv_devx_sub‐
23       scribe_devx_event()  the application should use this API to get the re‐
24       sponse once an event has occurred.
25
26       Upon response the cookie that was supplied upon the subscription is re‐
27       turned  and the out_data includes the data itself.  The out_data may be
28       omitted in case the channel was created with the omit data flag.
29
30       The application must supply a large enough buffer to hold the event ac‐
31       cording  to  the  device specification, the buffer size is given by the
32       input event_resp_len parameter.
33

ARGUMENTS

35       event_channel
36
37              The channel to get the event over.
38
39       event_data
40              The output data from the asynchronous event.
41
42       event_resp_len
43              The output buffer size to hold the response.
44

RETURN VALUE

46       Upon success mlx5dv_devx_get_event will  return  the  number  of  bytes
47       read, otherwise -1 will be returned and errno was set.
48

NOTES

50       In  case  the event_channel was created with the omit data flag, events
51       having the same type may be combined per subscription and  be  reported
52       once  with  the matching cookie.  In that mode of work, ordering is not
53       preserved between those events to other on this channel.
54
55       On the other hand, when each event should hold the device data ordering
56       is preserved, however, events might be loose as of lack of kernel memo‐
57       ry, in that case EOVERFLOW will be reported.
58

SEE ALSO

60       mlx5dv_open_device(3), mlx5dv_devx_subscribe_devx_event(3)
61
62       #AUTHOR
63
64       Yishai Hadas <yishaih@mellanox.com>
65
66
67
68                                                      mlx5dv_devx_get_event(3)
Impressum