aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/debugfs.c
diff options
context:
space:
mode:
authorMoshe Shemesh <moshe@nvidia.com>2022-01-27 15:22:21 +0200
committerSaeed Mahameed <saeedm@nvidia.com>2022-03-09 13:33:00 -0800
commit34f46ae0d4b38e83cfb26fb6f06b5b5efea47fdc (patch)
tree01b306b28b56a5b2c11950217f5aac8958b1b5ef /drivers/net/ethernet/mellanox/mlx5/core/debugfs.c
parentnet/mlx5e: TC, Fix use after free in mlx5e_clone_flow_attr_for_post_act() (diff)
downloadlinux-dev-34f46ae0d4b38e83cfb26fb6f06b5b5efea47fdc.tar.xz
linux-dev-34f46ae0d4b38e83cfb26fb6f06b5b5efea47fdc.zip
net/mlx5: Add command failures data to debugfs
Add new counters to command interface debugfs to count command failures. The following counters added: total_failed - number of times command failed (any kind of failure). failed_mbox_status - number of times command failed on bad status returned by FW. In addition, add data about last command failure to command interface debugfs: last_failed_errno - last command failed returned errno. last_failed_mbox_status - last bad status returned by FW. Signed-off-by: Moshe Shemesh <moshe@nvidia.com> Reviewed-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/debugfs.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/debugfs.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/debugfs.c b/drivers/net/ethernet/mellanox/mlx5/core/debugfs.c
index 10d195042ab5..18b04e977bb8 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/debugfs.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/debugfs.c
@@ -180,6 +180,13 @@ void mlx5_cmdif_debugfs_init(struct mlx5_core_dev *dev)
debugfs_create_file("average", 0400, stats->root, stats,
&stats_fops);
debugfs_create_u64("n", 0400, stats->root, &stats->n);
+ debugfs_create_u64("failed", 0400, stats->root, &stats->failed);
+ debugfs_create_u64("failed_mbox_status", 0400, stats->root,
+ &stats->failed_mbox_status);
+ debugfs_create_u32("last_failed_errno", 0400, stats->root,
+ &stats->last_failed_errno);
+ debugfs_create_u8("last_failed_mbox_status", 0400, stats->root,
+ &stats->last_failed_mbox_status);
}
}
}