From: Guangbin Huang <huangguangbin2@huawei.com>
To: <davem@davemloft.net>, <kuba@kernel.org>, <wangjie125@huawei.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<lipeng321@huawei.com>, <huangguangbin2@huawei.com>,
<chenhao288@hisilicon.com>
Subject: [PATCH net-next 4/4] net: hns3: add dql info when tx timeout
Date: Wed, 24 Nov 2021 09:06:54 +0800 [thread overview]
Message-ID: <20211124010654.6753-5-huangguangbin2@huawei.com> (raw)
In-Reply-To: <20211124010654.6753-1-huangguangbin2@huawei.com>
From: Yufeng Mo <moyufeng@huawei.com>
When tx timeout occurs, the info of dql maybe helpful, so print
these info to hns3_get_tx_timeo_queue_info().
Signed-off-by: Yufeng Mo <moyufeng@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
---
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
index 0225d6091cf2..496ddf397bd4 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
@@ -2683,6 +2683,13 @@ static bool hns3_get_tx_timeo_queue_info(struct net_device *ndev)
if (netif_xmit_stopped(q) &&
time_after(jiffies,
(trans_start + ndev->watchdog_timeo))) {
+#ifdef CONFIG_BQL
+ struct dql *dql = &q->dql;
+
+ netdev_info(ndev, "DQL info last_cnt: %u, queued: %u, adj_limit: %u, completed: %u\n",
+ dql->last_obj_cnt, dql->num_queued,
+ dql->adj_limit, dql->num_completed);
+#endif
timeout_queue = i;
netdev_info(ndev, "queue state: 0x%lx, delta msecs: %u\n",
q->state,
--
2.33.0
next prev parent reply other threads:[~2021-11-24 1:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-24 1:06 [PATCH net-next 0/4] net: hns3: updates for -next Guangbin Huang
2021-11-24 1:06 ` [PATCH net-next 1/4] net: hns3: add log for workqueue scheduled late Guangbin Huang
2021-11-24 1:06 ` [PATCH net-next 2/4] net: hns3: format the output of the MAC address Guangbin Huang
2021-11-24 6:52 ` Heiner Kallweit
2021-11-24 1:06 ` [PATCH net-next 3/4] net: hns3: debugfs add drop packet statistics of multicast and broadcast for igu Guangbin Huang
2021-11-24 1:06 ` Guangbin Huang [this message]
2021-11-24 14:30 ` [PATCH net-next 0/4] net: hns3: updates for -next patchwork-bot+netdevbpf
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=20211124010654.6753-5-huangguangbin2@huawei.com \
--to=huangguangbin2@huawei.com \
--cc=chenhao288@hisilicon.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lipeng321@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=wangjie125@huawei.com \
/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).