]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
can: rx-offload: can_rx_offload_offload_one(): increment rx_fifo_errors on queue...
authorMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 9 Oct 2019 13:15:07 +0000 (15:15 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 4 Nov 2019 20:47:21 +0000 (21:47 +0100)
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>
drivers/net/can/rx-offload.c

index bdc27481b57f9453e095899e4c7f13fadc4fd3b0..e224530a06300cd2dd97d5c150ab6a19334a74e8 100644 (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;
        }