All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jonas Mark (BT-FIR/ENG1)" <Mark.Jonas@de.bosch.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
	Wolfgang Grandegger <wg@grandegger.com>
Cc: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"hs@denx.de" <hs@denx.de>,
	"ZHU Yi (BT-FIR/ENG1-Zhu)" <Yi.Zhu5@cn.bosch.com>,
	"Jonas Mark (BT-FIR/ENG1)" <Mark.Jonas@de.bosch.com>
Subject: Re: [PATCH] can: enable multi-queue for SocketCAN devices
Date: Wed, 14 Mar 2018 12:26:58 +0000	[thread overview]
Message-ID: <9ce65a3a1535456dbad7120c5775a8f9@de.bosch.com> (raw)

Hello Marc,

> > The existing SocketCAN implementation provides alloc_candev() to
> > allocate a CAN device using a single Tx and Rx queue. This can lead to
> > priority inversion in case the single Tx queue is already full with low
> > priority messages and a high priority message needs to be sent while the
> > bus is fully loaded with medium priority messages.
> >
> > This problem can be solved by using the existing multi-queue support of
> > the network subsystem. The commit makes it possible to use multi-queue in
> > the CAN subsystem in the same way it is used in the Ethernet subsystem
> > by adding an alloc_candev_mqs() call and accompanying macros. With this
> > support a CAN device can use multi-queue qdisc (e.g. mqprio) to avoid
> > the aforementioned priority inversion.
> >
> > The existing functionality of alloc_candev() is the same as before.
> >
> > CAN devices need to have prioritized multiple hardware queues or are
> > able to abort waiting for arbitration to make sensible use of
> > multi-queues.
> >
> > Signed-off-by: Zhu Yi <yi.zhu5@cn.bosch.com>
> > Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
> > Reviewed-by: Heiko Schocher <hs@denx.de>
> 
> Do you have a driver or a patch to make a driver mq aware?

Yes, we have CAN hardware with multiple queues and we also have a SocketCAN driver for it.

IMHO the driver will be of very little use for the Linux community because the HW is proprietary.

Our motivation to separate this patch from the proprietary SocketCAN driver is that we felt it was odd that the multi-queue infrastructure is in place and only very few lines of code are missing to offer it to the CAN networking subsystem as well.

Greetings,
Mark

             reply	other threads:[~2018-03-14 12:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-14 12:26 Jonas Mark (BT-FIR/ENG1) [this message]
2018-03-14 12:44 ` [PATCH] can: enable multi-queue for SocketCAN devices Marc Kleine-Budde
  -- strict thread matches above, loose matches on Subject: below --
2018-03-15  9:08 Jonas Mark (BT-FIR/ENG1)
2018-03-15  9:53 ` Marc Kleine-Budde
2018-03-14 16:51 Jonas Mark (BT-FIR/ENG1)
2018-03-14 22:17 ` Marc Kleine-Budde
2018-03-14 10:33 Mark Jonas
2018-03-14 10:33 ` Mark Jonas
2018-03-14 11:11 ` 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=9ce65a3a1535456dbad7120c5775a8f9@de.bosch.com \
    --to=mark.jonas@de.bosch.com \
    --cc=Yi.Zhu5@cn.bosch.com \
    --cc=hs@denx.de \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=wg@grandegger.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.