#include <linux/debugfs.h>
#include "mlx5_ib.h"
#include "cmd.h"
enum mlx5_ib_cong_node_type { … };
static const char * const mlx5_ib_dbg_cc_name[] = …;
#define MLX5_IB_RP_CLAMP_TGT_RATE_ATTR …
#define MLX5_IB_RP_CLAMP_TGT_RATE_ATI_ATTR …
#define MLX5_IB_RP_TIME_RESET_ATTR …
#define MLX5_IB_RP_BYTE_RESET_ATTR …
#define MLX5_IB_RP_THRESHOLD_ATTR …
#define MLX5_IB_RP_MAX_RATE_ATTR …
#define MLX5_IB_RP_AI_RATE_ATTR …
#define MLX5_IB_RP_HAI_RATE_ATTR …
#define MLX5_IB_RP_MIN_DEC_FAC_ATTR …
#define MLX5_IB_RP_MIN_RATE_ATTR …
#define MLX5_IB_RP_RATE_TO_SET_ON_FIRST_CNP_ATTR …
#define MLX5_IB_RP_DCE_TCP_G_ATTR …
#define MLX5_IB_RP_DCE_TCP_RTT_ATTR …
#define MLX5_IB_RP_RATE_REDUCE_MONITOR_PERIOD_ATTR …
#define MLX5_IB_RP_INITIAL_ALPHA_VALUE_ATTR …
#define MLX5_IB_RP_GD_ATTR …
#define MLX5_IB_NP_MIN_TIME_BETWEEN_CNPS_ATTR …
#define MLX5_IB_NP_CNP_DSCP_ATTR …
#define MLX5_IB_NP_CNP_PRIO_MODE_ATTR …
#define MLX5_IB_GENERAL_RTT_RESP_DSCP_ATTR …
static enum mlx5_ib_cong_node_type
mlx5_ib_param_to_node(enum mlx5_ib_dbg_cc_types param_offset)
{ … }
static u32 mlx5_get_cc_param_val(void *field, int offset)
{ … }
static void mlx5_ib_set_cc_param_mask_val(void *field, int offset,
u32 var, u32 *attr_mask)
{ … }
static int mlx5_ib_get_cc_params(struct mlx5_ib_dev *dev, u32 port_num,
int offset, u32 *var)
{ … }
static int mlx5_ib_set_cc_params(struct mlx5_ib_dev *dev, u32 port_num,
int offset, u32 var)
{ … }
static ssize_t set_param(struct file *filp, const char __user *buf,
size_t count, loff_t *pos)
{ … }
static ssize_t get_param(struct file *filp, char __user *buf, size_t count,
loff_t *pos)
{ … }
static const struct file_operations dbg_cc_fops = …;
void mlx5_ib_cleanup_cong_debugfs(struct mlx5_ib_dev *dev, u32 port_num)
{ … }
void mlx5_ib_init_cong_debugfs(struct mlx5_ib_dev *dev, u32 port_num)
{ … }