From: Marc Kleine-Budde <mkl@pengutronix.de>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, kernel@pengutronix.de, linux-can@vger.kernel.org
Subject: Re: pull-request: can-next 2017-02-06,pull-request: can-next 2017-02-06,Re: pull-request: can-next 2017-02-06,pull-request: can-next 2017-02-06
Date: Thu, 9 Feb 2017 10:52:23 +0100 [thread overview]
Message-ID: <44f94eb3-4c58-a63f-c7a9-46615155d7b5@pengutronix.de> (raw)
In-Reply-To: <20170206.115910.1398846154082627685.davem@davemloft.net>
[-- Attachment #1.1: Type: text/plain, Size: 929 bytes --]
On 02/06/2017 05:59 PM, David Miller wrote:
> Sure but what about these "can_rx_offload_le()" comparisons?
This is to scan the mailboxes according to priority. On some CAN IP
cores the mailboxes decrease in priority (0=high, 63=low) some increase
(63=high, 0=low). The can_rx_offload_le() (le means less or equal) and
can_rx_offload_inc() functions are used to abstract the order. We always
only scan from highest to lower prio (offload->mb_first ...
offload->mb_last):
> for (i = offload->mb_first;
> can_rx_offload_le(offload, i, offload->mb_last);
> can_rx_offload_inc(offload, &i)) {
So we never wrap around.
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: 488 bytes --]
prev parent reply other threads:[~2017-02-09 9:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-06 14:50 pull-request: can-next 2017-02-06 Marc Kleine-Budde
2017-02-06 16:12 ` pull-request: can-next 2017-02-06,pull-request: " David Miller
2017-02-06 16:43 ` Marc Kleine-Budde
2017-02-06 16:59 ` pull-request: can-next 2017-02-06,pull-request: can-next 2017-02-06,Re: " David Miller
2017-02-09 9:52 ` Marc Kleine-Budde [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=44f94eb3-4c58-a63f-c7a9-46615155d7b5@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=davem@davemloft.net \
--cc=kernel@pengutronix.de \
--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).