mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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>,
	<huangdaode@huawei.com>, <linuxarm@huawei.com>, <kuba@kernel.org>,
	Yunsheng Lin <linyunsheng@huawei.com>,
	Huazhong Tan <tanhuazhong@huawei.com>
Subject: [PATCH net-next 1/9] net: hns3: limit the error logging in the hns3_clean_tx_ring()
Date: Tue, 21 Jan 2020 16:42:05 +0800	[thread overview]
Message-ID: <1579596133-54842-2-git-send-email-tanhuazhong@huawei.com> (raw)
In-Reply-To: <1579596133-54842-1-git-send-email-tanhuazhong@huawei.com>

From: Yunsheng Lin <linyunsheng@huawei.com>

The error log printed by netdev_err() in the hns3_clean_tx_ring()
may spam the kernel log.

This patch uses hns3_rl_err() to ratelimit the error log in the
hns3_clean_tx_ring().

Signed-off-by: Yunsheng Lin <linyunsheng@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 914a763..f579028 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
@@ -2540,8 +2540,8 @@ void hns3_clean_tx_ring(struct hns3_enet_ring *ring)
 	rmb(); /* Make sure head is ready before touch any data */
 
 	if (unlikely(!is_valid_clean_head(ring, head))) {
-		netdev_err(netdev, "wrong head (%d, %d-%d)\n", head,
-			   ring->next_to_use, ring->next_to_clean);
+		hns3_rl_err(netdev, "wrong head (%d, %d-%d)\n", head,
+			    ring->next_to_use, ring->next_to_clean);
 
 		u64_stats_update_begin(&ring->syncp);
 		ring->stats.io_err_cnt++;
-- 
2.7.4


  reply	other threads:[~2020-01-21  8:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-21  8:42 [PATCH net-next 0/9] net: hns3: misc updates for -net-next Huazhong Tan
2020-01-21  8:42 ` Huazhong Tan [this message]
2020-01-21  8:42 ` [PATCH net-next 2/9] net: hns3: do not reuse pfmemalloc pages Huazhong Tan
2020-01-21  8:42 ` [PATCH net-next 3/9] net: hns3: set VF's default reset_type to HNAE3_NONE_RESET Huazhong Tan
2020-01-21  8:42 ` [PATCH net-next 4/9] net: hns3: move duplicated macro definition into header Huazhong Tan
2020-01-21  8:42 ` [PATCH net-next 5/9] net: hns3: refine the input parameter 'size' for snprintf() Huazhong Tan
2020-01-21  8:42 ` [PATCH net-next 6/9] net: hns3: rewrite a log in hclge_put_vector() Huazhong Tan
2020-01-21  8:42 ` [PATCH net-next 7/9] net: hns3: delete unnecessary blank line and space for cleanup Huazhong Tan
2020-01-21  8:42 ` [PATCH net-next 8/9] net: hns3: remove redundant print on ENOMEM Huazhong Tan
2020-01-21  8:42 ` [PATCH net-next 9/9] net: hns3: cleanup some coding style issue Huazhong Tan
2020-01-21 10:46 ` [PATCH net-next 0/9] net: hns3: misc updates for -net-next 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=1579596133-54842-2-git-send-email-tanhuazhong@huawei.com \
    --to=tanhuazhong@huawei.com \
    --cc=davem@davemloft.net \
    --cc=huangdaode@huawei.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=linyunsheng@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=salil.mehta@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

all inboxes | Powered by JetHome®