diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2019-10-09 15:15:07 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2019-11-04 21:47:21 +0100 |
commit | 4e9016bee3bf0c24963097edace034ff205b565c (patch) | |
tree | ed36a2560a63cade11ee714fc4e9af50eff67561 /drivers/net/can/rx-offload.c | |
parent | a2dc3f5e1022a5ede8af9ab89a144f1e69db8636 (diff) |
can: rx-offload: can_rx_offload_offload_one(): increment rx_fifo_errors on queue overflow or OOM
If the rx-offload skb_queue is full or the skb allocation fails (due to OOM),
the mailbox contents is discarded.
This patch adds the incrementing of the rx_fifo_errors statistics counter.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/rx-offload.c')
-rw-r--r-- | drivers/net/can/rx-offload.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/can/rx-offload.c b/drivers/net/can/rx-offload.c index bdc27481b57f..e224530a0630 100644 --- a/drivers/net/can/rx-offload.c +++ b/drivers/net/can/rx-offload.c @@ -125,8 +125,10 @@ static struct sk_buff *can_rx_offload_offload_one(struct can_rx_offload *offload ret = offload->mailbox_read(offload, &cf_overflow, ×tamp, n); - if (ret) + if (ret) { offload->dev->stats.rx_dropped++; + offload->dev->stats.rx_fifo_errors++; + } return NULL; } |