From: Huazhong Tan <tanhuazhong@huawei.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<salil.mehta@huawei.com>, <yisen.zhuang@huawei.com>,
<linuxarm@huawei.com>, <nhorman@redhat.com>,
Jian Shen <shenjian15@huawei.com>, Peng Li <lipeng321@huawei.com>,
Huazhong Tan <tanhuazhong@huawei.com>
Subject: [PATCH net-next 05/12] net: hns3: refine tx timeout count handle
Date: Fri, 19 Apr 2019 11:05:40 +0800 [thread overview]
Message-ID: <1555643147-52407-6-git-send-email-tanhuazhong@huawei.com> (raw)
In-Reply-To: <1555643147-52407-1-git-send-email-tanhuazhong@huawei.com>
From: Jian Shen <shenjian15@huawei.com>
In current codes, tx_timeout_cnt is used before increased,
then we can see the tx_timeout_count is still 0 from the
print when tx timeout happens, e.g.
"hns3 0000:7d:00.3 eth3: tx_timeout count: 0, queue id: 0, SW_NTU:
0xa6, SW_NTC: 0xa4, HW_HEAD: 0xa4, HW_TAIL: 0xa6, INT: 0x1"
The tx_timeout_cnt should be updated before used.
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
---
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
index 9233438..193994c 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
@@ -1655,6 +1655,8 @@ static bool hns3_get_tx_timeo_queue_info(struct net_device *ndev)
return false;
}
+ priv->tx_timeout_count++;
+
tx_ring = priv->ring_data[timeout_queue].ring;
hw_head = readl_relaxed(tx_ring->tqp->io_base +
@@ -1682,8 +1684,6 @@ static void hns3_nic_net_timeout(struct net_device *ndev)
if (!hns3_get_tx_timeo_queue_info(ndev))
return;
- priv->tx_timeout_count++;
-
/* request the reset, and let the hclge to determine
* which reset level should be done
*/
--
2.7.4
next prev parent reply other threads:[~2019-04-19 3:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-19 3:05 [PATCH net-next 00/12] net: hns3: add some DFX info for HNS3 driver Huazhong Tan
2019-04-19 3:05 ` [PATCH net-next 01/12] net: hns3: add reset statistics info for PF Huazhong Tan
2019-04-19 3:05 ` [PATCH net-next 02/12] net: hns3: add reset statistics for VF Huazhong Tan
2019-04-19 3:05 ` [PATCH net-next 03/12] net: hns3: add some debug information for hclge_check_event_cause Huazhong Tan
2019-04-19 3:05 ` [PATCH net-next 04/12] net: hns3: add some debug info for hclgevf_get_mbx_resp() Huazhong Tan
2019-04-19 3:05 ` Huazhong Tan [this message]
2019-04-19 3:05 ` [PATCH net-next 06/12] net: hns3: fix loop condition of hns3_get_tx_timeo_queue_info() Huazhong Tan
2019-04-19 3:05 ` [PATCH net-next 07/12] net: hns3: dump more information when tx timeout happens Huazhong Tan
2019-04-19 3:05 ` [PATCH net-next 08/12] net: hns3: Add support for netif message level settings Huazhong Tan
2019-04-19 3:05 ` [PATCH net-next 09/12] net: hns3: add support for dump ncl config by debugfs Huazhong Tan
2019-04-19 3:05 ` [PATCH net-next 10/12] net: hns3: Add handling of MAC tunnel interruption Huazhong Tan
2019-04-19 11:29 ` Neil Horman
2019-04-20 1:05 ` tanhuazhong
2019-04-19 3:05 ` [PATCH net-next 11/12] net: hns3: add queue's statistics update to service task Huazhong Tan
2019-04-19 3:05 ` [PATCH net-next 12/12] net: hns3: add function type check for debugfs help information Huazhong Tan
2019-04-20 1:43 ` [PATCH net-next 00/12] net: hns3: add some DFX info for HNS3 driver 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=1555643147-52407-6-git-send-email-tanhuazhong@huawei.com \
--to=tanhuazhong@huawei.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=lipeng321@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@redhat.com \
--cc=salil.mehta@huawei.com \
--cc=shenjian15@huawei.com \
--cc=yisen.zhuang@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).