aboutsummaryrefslogtreecommitdiff
path: root/include
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 /include
parent371c2b349d927e81710f6ac2826d7fcb0374280f (diff)
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 'include')
-rw-r--r--include/linux/mlx5/driver.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index d3b1a6a1f8d2..f18c1e15a12c 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -264,6 +264,14 @@ enum {
struct mlx5_cmd_stats {
u64 sum;
u64 n;
+ /* number of times command failed */
+ u64 failed;
+ /* number of times command failed on bad status returned by FW */
+ u64 failed_mbox_status;
+ /* last command failed returned errno */
+ u32 last_failed_errno;
+ /* last bad status returned by FW */
+ u8 last_failed_mbox_status;
struct dentry *root;
/* protect command average calculations */
spinlock_t lock;
@@ -955,6 +963,7 @@ typedef void (*mlx5_async_cbk_t)(int status, struct mlx5_async_work *context);
struct mlx5_async_work {
struct mlx5_async_ctx *ctx;
mlx5_async_cbk_t user_callback;
+ u16 opcode; /* cmd opcode */
void *out; /* pointer to the cmd output buffer */
};