From: Yunsheng Lin Date: Tue, 21 Jan 2020 08:42:05 +0000 (+0800) Subject: net: hns3: limit the error logging in the hns3_clean_tx_ring() X-Git-Tag: v5.6-rc1~151^2~53^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=09783d448bccf1ec1c91d0b9e5443b0bcb034dbb;p=thirdparty%2Flinux.git net: hns3: limit the error logging in the hns3_clean_tx_ring() 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 Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index 914a7630ac48a..f5790282bd190 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++;