Commit 09783d44 authored by Yunsheng Lin's avatar Yunsheng Lin Committed by David S. Miller
Browse files

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: default avatarYunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 953c4a08
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2540,7 +2540,7 @@ 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,
		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);