Re: [PATCH 3/3] can: m_can: fix RX path: use rx-offload to ensure skbs are sent from softirq context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 08, 2021 at 10:16:54AM +0100, Marc Kleine-Budde wrote:
> On 3/8/21 10:11 AM, Torin Cooper-Bennun wrote:
> > On Fri, Mar 05, 2021 at 11:29:57PM +0100, Marc Kleine-Budde wrote:
> >> On 05.03.2021 17:20:15, Torin Cooper-Bennun wrote:
> >>> For peripheral devices, m_can sent skbs directly from a threaded irq
> >>> instead of from a softirq context. This patch transitions the driver to
> >>> use the rx-offload helper, ensuring the skbs are sent from the correct
> >>> context, with h/w timestamping to ensure correct ordering.
> >>
> >> I think you beak the non-peripheral drivers here. They already have a
> >> NAPI function m_can_poll(). It makes no sense and doesn't work, if you
> >> do the RX in NAPI and then queue to rx-offload, which then needs to run
> >> from NAPI again. But it cannot as m_can_poll is the NAPI function.
> >>
> >> For peripherals it works, as you do the RX in the threaded IRQ, queue to
> >> rx-offload, which then schedules a NAPI, to push the CAN frames into the
> >> networking stack.
> > 
> > Understood, I will make the skb handling conditional on
> > cdev->is_peripheral and retain netif_receive_skb and can_get_echo_skb
> > usage for non-peripherals as before.
> 
> Not beautify, but should make the tcan driver work at least.

Submitted v2 of patches, hopefully hit a good compromise :)

--
Regards,

Torin Cooper-Bennun
Software Engineer | maxiluxsystems.com




[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux