diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2015-05-10 17:25:14 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2023-10-05 21:47:45 +0200 |
commit | 137f59d5dab4bd55ab3d40080de18bf641bdc26a (patch) | |
tree | 1629c0584cb9d1946a4948ef80e717c8db78d8ee /drivers/net/can/Kconfig | |
parent | can: at91_can: at91_alloc_can_err_skb() introduce new function (diff) | |
download | linux-137f59d5dab4bd55ab3d40080de18bf641bdc26a.tar.xz linux-137f59d5dab4bd55ab3d40080de18bf641bdc26a.zip |
can: at91_can: switch to rx-offload implementation
The current at91_can driver uses NAPI to handle RX'ed CAN frames, the
RX IRQ is disabled and a NAPI poll is scheduled. Then in
at91_poll_rx() the RX'ed CAN frames are tried to read in order from
the device.
This approach has 2 drawbacks:
- Under high system load it might take too long from the initial RX
IRQ to the NAPI poll function to run. This causes RX buffer
overflows.
- The algorithm to read the CAN frames in order is not bullet proof
and may fail under certain use cases/system loads.
The rx-offload helper fixes these problems by reading the RX'ed CAN
frames in the interrupt handler and adding it to a list sorted by RX
timestamp. This list of RX'ed SKBs is then passed to the networking
stack via NAPI.
Convert the RX path to rx-offload, pass all CAN error frames with
can_rx_offload_queue_timestamp().
Link: https://lore.kernel.org/all/20231005-at91_can-rx_offload-v2-27-9987d53600e0@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/Kconfig')
-rw-r--r-- | drivers/net/can/Kconfig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/can/Kconfig b/drivers/net/can/Kconfig index 649453a3c858..8d6fc0852bf7 100644 --- a/drivers/net/can/Kconfig +++ b/drivers/net/can/Kconfig @@ -89,6 +89,7 @@ config CAN_RX_OFFLOAD config CAN_AT91 tristate "Atmel AT91 onchip CAN controller" depends on (ARCH_AT91 || COMPILE_TEST) && HAS_IOMEM + select CAN_RX_OFFLOAD help This is a driver for the SoC CAN controller in Atmel's AT91SAM9263 and AT91SAM9X5 processors. |