Traditionally USB drivers used to pass the received CAN frames/skbs to the network stack with netif_rx(). In netif_rx() the skbs are queued to the local CPU. If IRQs are handled in round robin, OoO packets may occur. To support devices without timestamping the TX path of the rx-offload helper is cleaned up and extended: - rename rx_offload_get_echo_skb() -> can_rx_offload_get_echo_skb_queue_timestamp() - add can_rx_offload_get_echo_skb_queue_tail() The remaining 4 patches first add some cleanups to the gs_usb driver and the last one converts it to NAPI with the rx-offload helper. Link: https://lore.kernel.org/all/559D628C.5020100@xxxxxxxxxxxx Link: https://github.com/candle-usb/candleLight_fw/issues/166 Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> --- Marc Kleine-Budde (6): can: rx-offload: rename rx_offload_get_echo_skb() -> can_rx_offload_get_echo_skb_queue_timestamp() can: rx-offload: add can_rx_offload_get_echo_skb_queue_tail() can: gs_usb: gs_usb_receive_bulk_callback(): count RX overflow errors also in case of OOM can: gs_usb: gs_usb_receive_bulk_callback(): make use of netdev can: gs_usb: gs_usb_receive_bulk_callback(): make use of stats can: gs_usb: convert to NAPI/rx-offload to avoid OoO reception drivers/net/can/dev/rx-offload.c | 36 +++++++++-- drivers/net/can/flexcan/flexcan-core.c | 4 +- drivers/net/can/m_can/m_can.c | 8 +-- drivers/net/can/spi/mcp251xfd/mcp251xfd-tef.c | 6 +- drivers/net/can/ti_hecc.c | 4 +- drivers/net/can/usb/Kconfig | 1 + drivers/net/can/usb/gs_usb.c | 90 ++++++++++++++++++++------- include/linux/can/rx-offload.h | 11 ++-- 8 files changed, 116 insertions(+), 44 deletions(-) --- base-commit: 3a8a670eeeaa40d87bd38a587438952741980c18 change-id: 20230705-gs_usb-rx-offload-722d22567d68 Best regards, -- Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>