1
0
Fork 0

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>
alistair/sunxi64-5.4-dsi
Marc Kleine-Budde 2019-10-09 15:15:07 +02:00
parent a2dc3f5e10
commit 4e9016bee3
1 changed files with 3 additions and 1 deletions

View File

@ -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,
&timestamp, n);
if (ret)
if (ret) {
offload->dev->stats.rx_dropped++;
offload->dev->stats.rx_fifo_errors++;
}
return NULL;
}