From: "Michael S. Tsirkin" <mst@redhat.com>
To: linux-kernel@vger.kernel.org, Julio Faracco <jcfaracco@gmail.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, mst@redhat.com,
jasowang@redhat.com, virtualization@lists.linux-foundation.org,
dnmendes76@gmail.com
Subject: [PATCH net-next v11 2/3] mlx4: use new txqueue timeout argument
Date: Tue, 10 Dec 2019 08:09:40 -0500 [thread overview]
Message-ID: <20191210130837.47913-3-mst@redhat.com> (raw)
In-Reply-To: <20191210130837.47913-1-mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index 71c083960a87..43dcbd8214c6 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -1367,20 +1367,14 @@ static void mlx4_en_tx_timeout(struct net_device *dev, unsigned int txqueue)
{
struct mlx4_en_priv *priv = netdev_priv(dev);
struct mlx4_en_dev *mdev = priv->mdev;
- int i;
+ struct mlx4_en_tx_ring *tx_ring = priv->tx_ring[TX][txqueue];
if (netif_msg_timer(priv))
en_warn(priv, "Tx timeout called on port:%d\n", priv->port);
- for (i = 0; i < priv->tx_ring_num[TX]; i++) {
- struct mlx4_en_tx_ring *tx_ring = priv->tx_ring[TX][i];
-
- if (!netif_tx_queue_stopped(netdev_get_tx_queue(dev, i)))
- continue;
- en_warn(priv, "TX timeout on queue: %d, QP: 0x%x, CQ: 0x%x, Cons: 0x%x, Prod: 0x%x\n",
- i, tx_ring->qpn, tx_ring->sp_cqn,
- tx_ring->cons, tx_ring->prod);
- }
+ en_warn(priv, "TX timeout on queue: %d, QP: 0x%x, CQ: 0x%x, Cons: 0x%x, Prod: 0x%x\n",
+ txqueue, tx_ring->qpn, tx_ring->sp_cqn,
+ tx_ring->cons, tx_ring->prod);
priv->port_stats.tx_timeout++;
en_dbg(DRV, priv, "Scheduling watchdog\n");
--
MST
next prev parent reply other threads:[~2019-12-10 13:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-10 13:08 [PATCH net-next v11 0/3] netdev: ndo_tx_timeout cleanup Michael S. Tsirkin
2019-12-10 13:09 ` [PATCH net-next v11 1/3] netdev: pass the stuck queue to the timeout handler Michael S. Tsirkin
2019-12-10 13:09 ` [PATCH net-next v11 3/3] netronome: use the new txqueue timeout argument Michael S. Tsirkin
2019-12-10 13:09 ` Michael S. Tsirkin
2019-12-10 13:09 ` Michael S. Tsirkin [this message]
2019-12-10 19:32 ` [PATCH net-next v11 0/3] netdev: ndo_tx_timeout cleanup David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191210130837.47913-3-mst@redhat.com \
--to=mst@redhat.com \
--cc=davem@davemloft.net \
--cc=dnmendes76@gmail.com \
--cc=jasowang@redhat.com \
--cc=jcfaracco@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).