IB/mlx5: Introduce async DEVX obj query API
Introduce async DEVX obj query API to get the command response back to user space once it's ready without blocking when calling the firmware. The event's data includes a header with some meta data then the firmware output command data. The header includes: - The input 'wr_id' to let application recognizing the response. The input FD attribute is used to have the event data ready on. Downstream patches from this series will implement the file ops to let application read it. Signed-off-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:

committed by
Jason Gunthorpe

parent
6bf8f22aea
commit
a124edba26
@@ -84,6 +84,14 @@ enum mlx5_ib_devx_obj_query_attrs {
|
||||
MLX5_IB_ATTR_DEVX_OBJ_QUERY_CMD_OUT,
|
||||
};
|
||||
|
||||
enum mlx5_ib_devx_obj_query_async_attrs {
|
||||
MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
|
||||
MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_CMD_IN,
|
||||
MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_FD,
|
||||
MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_WR_ID,
|
||||
MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_OUT_LEN,
|
||||
};
|
||||
|
||||
enum mlx5_ib_devx_query_eqn_attrs {
|
||||
MLX5_IB_ATTR_DEVX_QUERY_EQN_USER_VEC = (1U << UVERBS_ID_NS_SHIFT),
|
||||
MLX5_IB_ATTR_DEVX_QUERY_EQN_DEV_EQN,
|
||||
@@ -94,6 +102,7 @@ enum mlx5_ib_devx_obj_methods {
|
||||
MLX5_IB_METHOD_DEVX_OBJ_DESTROY,
|
||||
MLX5_IB_METHOD_DEVX_OBJ_MODIFY,
|
||||
MLX5_IB_METHOD_DEVX_OBJ_QUERY,
|
||||
MLX5_IB_METHOD_DEVX_OBJ_ASYNC_QUERY,
|
||||
};
|
||||
|
||||
enum mlx5_ib_devx_umem_reg_attrs {
|
||||
|
@@ -51,5 +51,10 @@ enum mlx5_ib_uapi_flow_action_packet_reformat_type {
|
||||
MLX5_IB_UAPI_FLOW_ACTION_PACKET_REFORMAT_TYPE_L2_TO_L3_TUNNEL = 0x3,
|
||||
};
|
||||
|
||||
struct mlx5_ib_uapi_devx_async_cmd_hdr {
|
||||
__aligned_u64 wr_id;
|
||||
__u8 out_data[];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user