Commit 4e9016be authored by Marc Kleine-Budde's avatar Marc Kleine-Budde

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: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent a2dc3f5e
...@@ -125,8 +125,10 @@ static struct sk_buff *can_rx_offload_offload_one(struct can_rx_offload *offload ...@@ -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, ret = offload->mailbox_read(offload, &cf_overflow,
&timestamp, n); &timestamp, n);
if (ret) if (ret) {
offload->dev->stats.rx_dropped++; offload->dev->stats.rx_dropped++;
offload->dev->stats.rx_fifo_errors++;
}
return NULL; return NULL;
} }
......
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