xref: /linux/drivers/net/ethernet/mellanox/mlx5/core/diag/rsc_dump.h (revision 4b4193256c8d3bc3a5397b5cd9494c2ad386317d)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (c) 2019 Mellanox Technologies. */
3 
4 #ifndef __MLX5_RSC_DUMP_H
5 #define __MLX5_RSC_DUMP_H
6 
7 #include <linux/mlx5/rsc_dump.h>
8 #include <linux/mlx5/driver.h>
9 #include "mlx5_core.h"
10 
11 #define MLX5_RSC_DUMP_ALL 0xFFFF
12 struct mlx5_rsc_dump_cmd;
13 struct mlx5_rsc_dump;
14 
15 struct mlx5_rsc_dump *mlx5_rsc_dump_create(struct mlx5_core_dev *dev);
16 void mlx5_rsc_dump_destroy(struct mlx5_core_dev *dev);
17 
18 int mlx5_rsc_dump_init(struct mlx5_core_dev *dev);
19 void mlx5_rsc_dump_cleanup(struct mlx5_core_dev *dev);
20 
21 struct mlx5_rsc_dump_cmd *mlx5_rsc_dump_cmd_create(struct mlx5_core_dev *dev,
22 						   struct mlx5_rsc_key *key);
23 void mlx5_rsc_dump_cmd_destroy(struct mlx5_rsc_dump_cmd *cmd);
24 
25 int mlx5_rsc_dump_next(struct mlx5_core_dev *dev, struct mlx5_rsc_dump_cmd *cmd,
26 		       struct page *page, int *size);
27 #endif
28