1118063fbSHans Petter Selasky /*- 2118063fbSHans Petter Selasky * Copyright (c) 2013-2017, Mellanox Technologies, Ltd. All rights reserved. 3118063fbSHans Petter Selasky * 4118063fbSHans Petter Selasky * Redistribution and use in source and binary forms, with or without 5118063fbSHans Petter Selasky * modification, are permitted provided that the following conditions 6118063fbSHans Petter Selasky * are met: 7118063fbSHans Petter Selasky * 1. Redistributions of source code must retain the above copyright 8118063fbSHans Petter Selasky * notice, this list of conditions and the following disclaimer. 9118063fbSHans Petter Selasky * 2. Redistributions in binary form must reproduce the above copyright 10118063fbSHans Petter Selasky * notice, this list of conditions and the following disclaimer in the 11118063fbSHans Petter Selasky * documentation and/or other materials provided with the distribution. 12118063fbSHans Petter Selasky * 13118063fbSHans Petter Selasky * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS `AS IS' AND 14118063fbSHans Petter Selasky * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15118063fbSHans Petter Selasky * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16118063fbSHans Petter Selasky * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE 17118063fbSHans Petter Selasky * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18118063fbSHans Petter Selasky * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19118063fbSHans Petter Selasky * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20118063fbSHans Petter Selasky * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21118063fbSHans Petter Selasky * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22118063fbSHans Petter Selasky * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23118063fbSHans Petter Selasky * SUCH DAMAGE. 24118063fbSHans Petter Selasky */ 25118063fbSHans Petter Selasky 26118063fbSHans Petter Selasky #ifndef MLX5_CMD_H 27118063fbSHans Petter Selasky #define MLX5_CMD_H 28118063fbSHans Petter Selasky 29118063fbSHans Petter Selasky #include <linux/types.h> 30118063fbSHans Petter Selasky 31118063fbSHans Petter Selasky struct manage_pages_layout { 32118063fbSHans Petter Selasky u64 ptr; 33118063fbSHans Petter Selasky u32 reserved; 34118063fbSHans Petter Selasky u16 num_entries; 35118063fbSHans Petter Selasky u16 func_id; 36118063fbSHans Petter Selasky }; 37118063fbSHans Petter Selasky 38118063fbSHans Petter Selasky 39118063fbSHans Petter Selasky struct mlx5_cmd_alloc_uar_imm_out { 40118063fbSHans Petter Selasky u32 rsvd[3]; 41118063fbSHans Petter Selasky u32 uarn; 42118063fbSHans Petter Selasky }; 43118063fbSHans Petter Selasky 44118063fbSHans Petter Selasky struct mlx5_core_dev; 45118063fbSHans Petter Selasky int mlx5_cmd_query_cong_counter(struct mlx5_core_dev *dev, 46118063fbSHans Petter Selasky bool reset, void *out, int out_size); 47118063fbSHans Petter Selasky int mlx5_cmd_query_cong_params(struct mlx5_core_dev *dev, int cong_point, 48118063fbSHans Petter Selasky void *out, int out_size); 49118063fbSHans Petter Selasky int mlx5_cmd_modify_cong_params(struct mlx5_core_dev *mdev, 50118063fbSHans Petter Selasky void *in, int in_size); 51*8abf5ac0SHans Petter Selasky int mlx5_cmd_query_cong_status(struct mlx5_core_dev *dev, int cong_point, 52*8abf5ac0SHans Petter Selasky int prio, void *out, int out_size); 53*8abf5ac0SHans Petter Selasky int mlx5_cmd_modify_cong_status(struct mlx5_core_dev *mdev, 54*8abf5ac0SHans Petter Selasky void *in, int in_size); 55118063fbSHans Petter Selasky #endif /* MLX5_CMD_H */ 56