Skip to content

Commit

Permalink
dpaa_eth: make sure all Rx errors are counted
Browse files Browse the repository at this point in the history
Simplify the code and avoid some Rx errors not being
accounted.

Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Madalin Bucur authored and David S. Miller committed Feb 27, 2018
1 parent 120d75e commit 81084b3
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -2204,14 +2204,8 @@ static enum qman_cb_dqrr_result rx_error_dqrr(struct qman_portal *portal,
if (dpaa_eth_napi_schedule(percpu_priv, portal))
return qman_cb_dqrr_stop;

if (dpaa_eth_refill_bpools(priv))
/* Unable to refill the buffer pool due to insufficient
* system memory. Just release the frame back into the pool,
* otherwise we'll soon end up with an empty buffer pool.
*/
dpaa_fd_release(net_dev, &dq->fd);
else
dpaa_rx_error(net_dev, priv, percpu_priv, &dq->fd, fq->fqid);
dpaa_eth_refill_bpools(priv);
dpaa_rx_error(net_dev, priv, percpu_priv, &dq->fd, fq->fqid);

return qman_cb_dqrr_consume;
}
Expand Down

0 comments on commit 81084b3

Please sign in to comment.