diff options
author | Eran Ben Elisha <eranbe@mellanox.com> | 2017-12-13 13:04:01 +0200 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2018-01-19 22:41:33 +0200 |
commit | 3a32b26a4eccb37435d81bf75e41b2bd4464f8d6 (patch) | |
tree | d4ca595a9ef7eb11d95034d9cc792f7376c394ec /drivers/net/ethernet/mellanox/mlx5/core | |
parent | 84990945261926a557fc85a835c665996e282a29 (diff) |
net/mlx5e: Add Event Queue meta data info for TX timeout logs
When TX timeout occurs, EQ consumer index and irqn can help in debug for
understanding the SW state of EQ. Add them to the logger prints for the
relevant EQ only.
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index 12196d4d958e..71b8b171c565 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -3768,6 +3768,9 @@ static void mlx5e_tx_timeout(struct net_device *dev) for (i = 0; i < priv->channels.num * priv->channels.params.num_tc; i++) { struct netdev_queue *dev_queue = netdev_get_tx_queue(dev, i); struct mlx5e_txqsq *sq = priv->txq2sq[i]; + struct mlx5_core_dev *mdev = priv->mdev; + int irqn_not_used, eqn; + struct mlx5_eq *eq; if (!netif_xmit_stopped(dev_queue)) continue; @@ -3776,6 +3779,15 @@ static void mlx5e_tx_timeout(struct net_device *dev) netdev_err(dev, "TX timeout on queue: %d, SQ: 0x%x, CQ: 0x%x, SQ Cons: 0x%x SQ Prod: 0x%x, usecs since last trans: %u\n", i, sq->sqn, sq->cq.mcq.cqn, sq->cc, sq->pc, jiffies_to_usecs(jiffies - dev_queue->trans_start)); + + if (mlx5_vector2eqn(mdev, sq->cq.mcq.vector, &eqn, + &irqn_not_used)) + continue; + + eq = mlx5_eqn2eq(mdev, eqn); + if (!IS_ERR(eq)) + netdev_err(dev, "EQ 0x%x: Cons = 0x%x, irqn = 0x%x\n", + eqn, eq->cons_index, eq->irqn); } if (sched_work && test_bit(MLX5E_STATE_OPENED, &priv->state)) |