linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Benedikt Spranger <b.spranger@linutronix.de>
Cc: Oliver Hartkopp <socketcan@hartkopp.net>,
	Wolfgang Grandegger <wg@grandegger.com>,
	linux-can <linux-can@vger.kernel.org>
Subject: Re: API to support hardware priorities
Date: Mon, 9 Nov 2015 16:38:09 +0100	[thread overview]
Message-ID: <5640BDE1.7060508@pengutronix.de> (raw)
In-Reply-To: <20151109162703.3fd6d4fc@mitra>

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

On 11/09/2015 04:27 PM, Benedikt Spranger wrote:
>> Do you mean the mailbox feature, where you queue a frame into
>> hardware, but sending is delayed until a certain CAN-ID is RX'ed?
> No.
> The C-CAN/D-CAN and some other Controller can be configured to have
> mailboxes for a certain Id. For example you can configure MBX 1 for
> Id 23, MBX 2 for Id 42 and 3-7 act as FIFO. So every packet matching Id
> 23 should queued up to MBX 1, every package matching Id 42 to MBX 2 and
> all other Packages to the FIFO.

OK, I was not aware of that feature. I'll have a look to the datasheets.
What's the benefit of associating a mailbox to a specific ID in the
hardware?

> Having a multiqueue TX part may help but may have some drawbacks. If the
> FIFO (or an other queue) is full the driver calls netif_stop_queue().

In this scenario there will be two netif_queues per CAN driver....

> Sending bulk data can block out a "high priority" Package. On the other
> hand a application writing bulk data in blocking mode should not
> receive a EAGAIN and not be punished by a "mixed up" queue i.e.
> violating the package send order.

...one serving the bulk hardware FIFO and one serving the high prio HW
queue.

Marc

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

  reply	other threads:[~2015-11-09 15:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20151109123618.41ad1bae@mitra>
2015-11-09 13:32 ` API to support hardware priorities (was: Re: API zur hardwareunterstützten Priorisierung von CAN-Paketen) Marc Kleine-Budde
2015-11-09 13:51   ` API to support hardware priorities Marc Kleine-Budde
2015-11-09 14:04     ` Oliver Hartkopp
2015-11-09 15:27     ` Benedikt Spranger
2015-11-09 15:38       ` Marc Kleine-Budde [this message]
2015-11-09 16:36         ` Benedikt Spranger

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=5640BDE1.7060508@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=b.spranger@linutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=socketcan@hartkopp.net \
    --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 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).