#include <linux/debugfs.h>
#include <linux/mlx5/qp.h>
#include <linux/mlx5/cq.h>
#include <linux/mlx5/driver.h>
#include "mlx5_core.h"
#include "lib/eq.h"
enum { … };
static char *qp_fields[] = …;
enum { … };
static char *eq_fields[] = …;
enum { … };
static char *cq_fields[] = …;
struct dentry *mlx5_debugfs_root;
EXPORT_SYMBOL(…);
void mlx5_register_debugfs(void)
{ … }
void mlx5_unregister_debugfs(void)
{ … }
struct dentry *mlx5_debugfs_get_dev_root(struct mlx5_core_dev *dev)
{ … }
EXPORT_SYMBOL(…);
void mlx5_qp_debugfs_init(struct mlx5_core_dev *dev)
{ … }
EXPORT_SYMBOL(…);
void mlx5_qp_debugfs_cleanup(struct mlx5_core_dev *dev)
{ … }
EXPORT_SYMBOL(…);
void mlx5_eq_debugfs_init(struct mlx5_core_dev *dev)
{ … }
void mlx5_eq_debugfs_cleanup(struct mlx5_core_dev *dev)
{ … }
static ssize_t average_read(struct file *filp, char __user *buf, size_t count,
loff_t *pos)
{ … }
static ssize_t reset_write(struct file *filp, const char __user *buf,
size_t count, loff_t *pos)
{ … }
static const struct file_operations reset_fops = …;
static const struct file_operations average_fops = …;
static ssize_t slots_read(struct file *filp, char __user *buf, size_t count,
loff_t *pos)
{ … }
static const struct file_operations slots_fops = …;
static struct mlx5_cmd_stats *
mlx5_cmdif_alloc_stats(struct xarray *stats_xa, int opcode)
{ … }
void mlx5_cmdif_debugfs_init(struct mlx5_core_dev *dev)
{ … }
void mlx5_cmdif_debugfs_cleanup(struct mlx5_core_dev *dev)
{ … }
void mlx5_cq_debugfs_init(struct mlx5_core_dev *dev)
{ … }
void mlx5_cq_debugfs_cleanup(struct mlx5_core_dev *dev)
{ … }
void mlx5_pages_debugfs_init(struct mlx5_core_dev *dev)
{ … }
void mlx5_pages_debugfs_cleanup(struct mlx5_core_dev *dev)
{ … }
static u64 qp_read_field(struct mlx5_core_dev *dev, struct mlx5_core_qp *qp,
int index, int *is_str)
{ … }
static u64 eq_read_field(struct mlx5_core_dev *dev, struct mlx5_eq *eq,
int index)
{ … }
static u64 cq_read_field(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq,
int index)
{ … }
static ssize_t dbg_read(struct file *filp, char __user *buf, size_t count,
loff_t *pos)
{ … }
static const struct file_operations fops = …;
static int add_res_tree(struct mlx5_core_dev *dev, enum dbg_rsc_type type,
struct dentry *root, struct mlx5_rsc_debug **dbg,
int rsn, char **field, int nfile, void *data)
{ … }
static void rem_res_tree(struct mlx5_rsc_debug *d)
{ … }
int mlx5_debug_qp_add(struct mlx5_core_dev *dev, struct mlx5_core_qp *qp)
{ … }
EXPORT_SYMBOL(…);
void mlx5_debug_qp_remove(struct mlx5_core_dev *dev, struct mlx5_core_qp *qp)
{ … }
EXPORT_SYMBOL(…);
int mlx5_debug_eq_add(struct mlx5_core_dev *dev, struct mlx5_eq *eq)
{ … }
void mlx5_debug_eq_remove(struct mlx5_core_dev *dev, struct mlx5_eq *eq)
{ … }
int mlx5_debug_cq_add(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq)
{ … }
void mlx5_debug_cq_remove(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq)
{ … }