From: Marc Kleine-Budde Date: Wed, 9 Oct 2019 13:15:07 +0000 (+0200) Subject: can: rx-offload: can_rx_offload_offload_one(): increment rx_fifo_errors on queue... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8c7dd979e1f70beece01e1fbd6006e1a4a81e880;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git can: rx-offload: can_rx_offload_offload_one(): increment rx_fifo_errors on queue overflow or OOM [ Upstream commit 4e9016bee3bf0c24963097edace034ff205b565c ] 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 Signed-off-by: Sasha Levin --- diff --git a/drivers/net/can/rx-offload.c b/drivers/net/can/rx-offload.c index c0e51a2f8e4f..b068e2320c79 100644 --- a/drivers/net/can/rx-offload.c +++ b/drivers/net/can/rx-offload.c @@ -134,8 +134,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; }