summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorEran Ben Elisha <eranbe@mellanox.com>2017-12-20 11:31:28 +0200
committerSaeed Mahameed <saeedm@mellanox.com>2018-01-19 22:41:33 +0200
commit84990945261926a557fc85a835c665996e282a29 (patch)
tree8e4136c78671b6991db1e0b009ff060132049639 /drivers/net
parenteb9180f792afe6e1f5a723381632791ad134ec39 (diff)
net/mlx5e: Print delta since last transmit per SQ upon TX timeout
When driver callback for TX timeout is being called, it handles all stopped xmit queues (not only the ones which their timeout expired). Add usecs since last transmit to TX timeout logs per send queue in order to monitor if the queue timeout expired. 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')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 8e380a89ec63..12196d4d958e 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -3766,14 +3766,16 @@ static void mlx5e_tx_timeout(struct net_device *dev)
netdev_err(dev, "TX timeout detected\n");
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];
- if (!netif_xmit_stopped(netdev_get_tx_queue(dev, i)))
+ if (!netif_xmit_stopped(dev_queue))
continue;
sched_work = true;
clear_bit(MLX5E_SQ_STATE_ENABLED, &sq->state);
- netdev_err(dev, "TX timeout on queue: %d, SQ: 0x%x, CQ: 0x%x, SQ Cons: 0x%x SQ Prod: 0x%x\n",
- i, sq->sqn, sq->cq.mcq.cqn, sq->cc, sq->pc);
+ 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 (sched_work && test_bit(MLX5E_STATE_OPENED, &priv->state))