提交 94355bc6 编写于 作者: Y Yunsheng Lin 提交者: Xie XiuQi

change for xmit when upstreaming

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

use net_ratelimit to limit the error logging in
the datapath.

Feature or Bugfix:Bugfix
Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com>
Reviewed-by: Nlipeng <lipeng321@huawei.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 7699f162
...@@ -1326,11 +1326,11 @@ netdev_tx_t hns3_nic_net_xmit(struct sk_buff *skb, struct net_device *netdev) ...@@ -1326,11 +1326,11 @@ netdev_tx_t hns3_nic_net_xmit(struct sk_buff *skb, struct net_device *netdev)
u64_stats_update_begin(&ring->syncp); u64_stats_update_begin(&ring->syncp);
ring->stats.sw_err_cnt++; ring->stats.sw_err_cnt++;
u64_stats_update_end(&ring->syncp); u64_stats_update_end(&ring->syncp);
netdev_err(netdev, "no memory to xmit!\n");
goto out_err_tx_ok;
} }
if (net_ratelimit())
netdev_err(netdev, "xmit error: %d!\n", buf_num); netdev_err(netdev, "xmit error: %d!\n", buf_num);
goto out_err_tx_ok; goto out_err_tx_ok;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册