Commit 972c9be7 authored by Aaro Koskinen's avatar Aaro Koskinen Committed by David S. Miller

net: stmmac: ratelimit RX error logs

Ratelimit RX error logs.
Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 583e6361
...@@ -3433,9 +3433,10 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue) ...@@ -3433,9 +3433,10 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
* ignored * ignored
*/ */
if (frame_len > priv->dma_buf_sz) { if (frame_len > priv->dma_buf_sz) {
netdev_err(priv->dev, if (net_ratelimit())
"len %d larger than size (%d)\n", netdev_err(priv->dev,
frame_len, priv->dma_buf_sz); "len %d larger than size (%d)\n",
frame_len, priv->dma_buf_sz);
priv->dev->stats.rx_length_errors++; priv->dev->stats.rx_length_errors++;
break; break;
} }
...@@ -3492,9 +3493,10 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue) ...@@ -3492,9 +3493,10 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
} else { } else {
skb = rx_q->rx_skbuff[entry]; skb = rx_q->rx_skbuff[entry];
if (unlikely(!skb)) { if (unlikely(!skb)) {
netdev_err(priv->dev, if (net_ratelimit())
"%s: Inconsistent Rx chain\n", netdev_err(priv->dev,
priv->dev->name); "%s: Inconsistent Rx chain\n",
priv->dev->name);
priv->dev->stats.rx_dropped++; priv->dev->stats.rx_dropped++;
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment