linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: "Daniel Glöckner" <dg@emlix.com>
Cc: netdev@vger.kernel.org, linux-can@vger.kernel.org
Subject: Re: Softirq error with mcp251xfd driver
Date: Thu, 11 Mar 2021 13:20:53 +0100	[thread overview]
Message-ID: <20210311122053.4ymta6byqjeocmsv@pengutronix.de> (raw)
In-Reply-To: <20210310215621.GA5538@homes.emlix.com>

[-- Attachment #1: Type: text/plain, Size: 1316 bytes --]

On 10.03.2021 22:56:21, Daniel Glöckner wrote:
[...]
> Or we leave can_rx_offload unchanged and keep two additional lists of skbs
> inside the mcp251xfd driver: One for the packets that arrived before the
> timestamp read from TBC and one for the packets that arrived later. At the
> end of an iteration we call local_bh_disable, enqueue all packets from the
> first list with can_rx_offload_queue_sorted, and the ask the softirq to
> process them by calling local_bh_enable. Afterwards we move everything
> from the second list to the first list and do the next iteration.

In the patch series (which was started by Kurt Van Dijck) there is a
second queue in rx-offload, this one is filled inside the IRQ handler
and than added at the end of the IRQ handler to the queue that NAPI
works on. He started this to get rid of the spin_lock operation on every
skb added to the queue.

> The drawback is that we can't use can_rx_offload_get_echo_skb.

I'd like to keep it, as this optimizes other use cases, too.

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2021-03-11 12:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10  6:46 Softirq error with mcp251xfd driver Daniel Glöckner
2021-03-10  7:13 ` Marc Kleine-Budde
2021-03-10 21:22   ` Daniel Glöckner
2021-03-10 21:56     ` Daniel Glöckner
2021-03-11 12:20       ` Marc Kleine-Budde [this message]
2021-03-11 11:55     ` Marc Kleine-Budde
2021-04-22  8:25 ` Marc Kleine-Budde

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=20210311122053.4ymta6byqjeocmsv@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=dg@emlix.com \
    --cc=linux-can@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).