mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Strong via B4 Relay <devnull+chris.strong.flocksafety.com@kernel.org>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
	 Vincent Mailhol <mailhol@kernel.org>,
	 Manivannan Sadhasivam <mani@kernel.org>,
	 Thomas Kopp <thomas.kopp@microchip.com>
Cc: linux-can@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Chris Strong <chris.strong@flocksafety.com>
Subject: [PATCH net v2 0/2] can: mcp251xfd: bound RX offload batches during long IRQs
Date: Tue, 29 Sep 2026 11:35:00 -0400	[thread overview]
Message-ID: <20260929-upstream-can-rx-offload-batching-v2-0-3b587c519f5d@flocksafety.com> (raw)

Hi all,

Under sustained receive traffic, the MCP251XFD threaded interrupt handler
can remain active indefinitely, leaving received SKBs in the IRQ-local
RX-offload queue while NAPI remains unscheduled.

Add an RX-offload helper for identifying a full IRQ-local batch, then use
it in MCP251XFD to publish batches while the handler continues draining
the controller.

An equivalent backport was tested on a Qualcomm QRB5165
(msm-qrb5165-4.19 vendor tree, with mcp251xfd and rx-offload backported
from v5.15+) driving an MCP251863 over GENI SPI at 125 kbit/s. The system
remained operational overnight under 100% CAN bus load while receiving
more than 51 million frames.

This mainline version passes checkpatch and an x86_64 build with
MCP251XFD enabled. I do not have a setup that can run mainline with an
MCP251863, so it is build-tested only; a hardware test would be welcome.

Signed-off-by: Chris Strong <chris.strong@flocksafety.com>
---
Changes in v2:
- Split the RX-offload helper into a separate patch.
- Shorten the patch descriptions and use imperative mood.
- Keep the code unchanged from v1.

Link to v1: https://lore.kernel.org/r/20260922-upstream-can-rx-offload-batching-v1-1-099e7ca12c91@flocksafety.com

---
Chris Strong (2):
      can: rx-offload: add IRQ queue flush predicate
      can: mcp251xfd: flush RX offload queue during long IRQs

 drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c | 14 +++++++++++++-
 include/linux/can/rx-offload.h                 |  7 +++++++
 2 files changed, 20 insertions(+), 1 deletion(-)
---
base-commit: 54518e0e827f4ca9229ae657022c60bf60f5c1bf
change-id: 20260921-upstream-can-rx-offload-batching-6c8faed6c156

Best regards,
-- 
Chris Strong <chris.strong@flocksafety.com>



             reply	other threads:[~2026-09-29 15:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29 15:35 Chris Strong via B4 Relay [this message]
2026-09-29 15:35 ` [PATCH net v2 1/2] can: rx-offload: add IRQ queue flush predicate Chris Strong via B4 Relay
2026-09-29 15:35 ` [PATCH net v2 2/2] can: mcp251xfd: flush RX offload queue during long IRQs Chris Strong via B4 Relay

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=20260929-upstream-can-rx-offload-batching-v2-0-3b587c519f5d@flocksafety.com \
    --to=devnull+chris.strong.flocksafety.com@kernel.org \
    --cc=chris.strong@flocksafety.com \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mailhol@kernel.org \
    --cc=mani@kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=thomas.kopp@microchip.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®