xref: /openbmc/linux/drivers/infiniband/hw/mlx5/devx.h (revision f7c4ffda0cbf7823915cbfebdbbe8460e7eeca67)
1*f7c4ffdaSLeon Romanovsky /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
2*f7c4ffdaSLeon Romanovsky /*
3*f7c4ffdaSLeon Romanovsky  * Copyright (c) 2019-2020, Mellanox Technologies inc. All rights reserved.
4*f7c4ffdaSLeon Romanovsky  */
5*f7c4ffdaSLeon Romanovsky 
6*f7c4ffdaSLeon Romanovsky #ifndef _MLX5_IB_DEVX_H
7*f7c4ffdaSLeon Romanovsky #define _MLX5_IB_DEVX_H
8*f7c4ffdaSLeon Romanovsky 
9*f7c4ffdaSLeon Romanovsky #include "mlx5_ib.h"
10*f7c4ffdaSLeon Romanovsky 
11*f7c4ffdaSLeon Romanovsky #define MLX5_MAX_DESTROY_INBOX_SIZE_DW MLX5_ST_SZ_DW(delete_fte_in)
12*f7c4ffdaSLeon Romanovsky struct devx_obj {
13*f7c4ffdaSLeon Romanovsky 	struct mlx5_ib_dev	*ib_dev;
14*f7c4ffdaSLeon Romanovsky 	u64			obj_id;
15*f7c4ffdaSLeon Romanovsky 	u32			dinlen; /* destroy inbox length */
16*f7c4ffdaSLeon Romanovsky 	u32			dinbox[MLX5_MAX_DESTROY_INBOX_SIZE_DW];
17*f7c4ffdaSLeon Romanovsky 	u32			flags;
18*f7c4ffdaSLeon Romanovsky 	union {
19*f7c4ffdaSLeon Romanovsky 		struct mlx5_ib_devx_mr	devx_mr;
20*f7c4ffdaSLeon Romanovsky 		struct mlx5_core_dct	core_dct;
21*f7c4ffdaSLeon Romanovsky 		struct mlx5_core_cq	core_cq;
22*f7c4ffdaSLeon Romanovsky 		u32			flow_counter_bulk_size;
23*f7c4ffdaSLeon Romanovsky 	};
24*f7c4ffdaSLeon Romanovsky 	struct list_head event_sub; /* holds devx_event_subscription entries */
25*f7c4ffdaSLeon Romanovsky };
26*f7c4ffdaSLeon Romanovsky #endif /* _MLX5_IB_DEVX_H */
27