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>
This commit is contained in:
parent
371c2b349d
commit
34f46ae0d4
3 changed files with 52 additions and 10 deletions
|
|
@ -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 */
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue