.\" Automatically generated by Pandoc 2.9.2.1 .\" .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 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 \f[I]context\f[R] .IP .nf \f[C] RDMA device context to create the action on. \f[R] .fi .TP \f[I]cmd_comp\f[R] The command completion object. .TP \f[I]cmd_resp\f[R] The output data from the asynchronous command. .TP \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