All of lore.kernel.org
 help / color / mirror / Atom feed
From: Torin Cooper-Bennun <torin@maxiluxsystems.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: linux-can@vger.kernel.org, Pankaj Sharma <pankj.sharma@samsung.com>
Subject: Re: [PATCH 3/3] can: m_can: fix RX path: use rx-offload to ensure skbs are sent from softirq context
Date: Mon, 8 Mar 2021 10:31:17 +0000	[thread overview]
Message-ID: <20210308103117.o772ve7gjfrpalaq@bigthink> (raw)
In-Reply-To: <59ad45a4-1404-4622-5f75-3ea08aa15287@pengutronix.de>

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


      reply	other threads:[~2021-03-08 10:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05 17:20 [PATCH 0/3] can: m_can: stabilise peripheral m_can RX and TX Torin Cooper-Bennun
2021-03-05 17:20 ` [PATCH 1/3] can: m_can: add infrastructure for internal timestamps Torin Cooper-Bennun
2021-03-05 21:28   ` Marc Kleine-Budde
2021-03-05 17:20 ` [PATCH 2/3] can: m_can: m_can_chip_config(): enable and configure " Torin Cooper-Bennun
2021-03-05 21:34   ` Marc Kleine-Budde
2021-03-08  9:09     ` Torin Cooper-Bennun
2021-03-05 17:20 ` [PATCH 3/3] can: m_can: fix RX path: use rx-offload to ensure skbs are sent from softirq context Torin Cooper-Bennun
2021-03-05 22:29   ` Marc Kleine-Budde
2021-03-08  9:11     ` Torin Cooper-Bennun
2021-03-08  9:16       ` Marc Kleine-Budde
2021-03-08 10:31         ` Torin Cooper-Bennun [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210308103117.o772ve7gjfrpalaq@bigthink \
    --to=torin@maxiluxsystems.com \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=pankj.sharma@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.