Create or destroy a command completion to be used for DEVX
asynchronous commands.
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.
The response can be read by the mlx5dv_devx_get_async_cmd_comp()
API, upon response the wr_id that was supplied upon the asynchronous
command is returned and the out_data includes the data itself. The
application must supply a large enough buffer to match any command that was
issued on the cmd_comp, its size is given by the input
cmd_resp_len parameter.
- context
-
RDMA device context to create the action on.
- cmd_comp
- The command completion object.
- cmd_resp
- The output data from the asynchronous command.
- cmd_resp_len
- The output buffer size to hold the response.
Upon success mlx5dv_devx_create_cmd_comp will return a new
struct mlx5dv_devx_cmd_comp object, on error NULL will be returned
and errno will be set.
Upon success mlx5dv_devx_get_async_cmd_comp will return 0,
otherwise errno will be returned.