From: Tom Evans <tom_usenet@optusnet.com.au>
To: Oliver Hartkopp <socketcan@hartkopp.net>,
Stephane Grosjean <s.grosjean@peak-system.com>,
Marc Kleine-Budde <mkl@pengutronix.de>
Cc: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>,
Manfred Schlaegl <manfred.schlaegl@gmx.at>
Subject: Re: [BULK]Re: [PATCH] can: fix loss of frames due to wrong assumption in raw_rcv
Date: Sun, 05 Jul 2015 11:18:20 +1000 [thread overview]
Message-ID: <559885DC.8040208@optusnet.com.au> (raw)
In-Reply-To: <55980FCE.4030304@hartkopp.net>
On 5/07/2015 2:54 AM, Oliver Hartkopp wrote:
> Hi Stephane,
> ...
> While testing the patches
> ...
> I discovered an increase of out-of-order CAN frame receptions.
> My setup is a core i7 with a PCAN USB and a PCAN USB pro connected to my
> full busload CAN source (1MBit/s, ~8008 frames/s).
Out of order reception is guaranteed with some CAN hardware and driver
software, such as the MCP2515 controller and Linux. The chip doesn't
implement a FIFO, but has two receive buffers which can give message
swaps quite easily. This can be fixed in the driver, but nobody has.
Details here:
http://www.microchip.com/forums/m620741.aspx
The PCAN-USB uses an SJA1000 which doesn't have that problem. It has a
64 byte FIFO. What is inside the PCAN-USB Pro isn't documented on their
web page, but it may be faster or have less transaction overhead or
latency or something. The PCAN-USB Pro is "no longer manufactured", the
replacement "PCAN-USB Pro FD" has an FPGA controller.
> It's more with the PCAN USB and very few with PCAN USB pro.
I'd guess the Pro has less overhead and can get messages over USB faster
than the other one.
> I'm a bit confused as this effect seems to increase with Linux kernel
> version numbers.
As for the later kernels being worse, that looks like a simple case of
"bloat", with them taking longer to get around to servicing the
interrupts and reading the messages. Earlier ones are probably reading
CAN messages one at a time, with each one getting through the stack
before the next one arrives. Later kernels are probably reading them in
bursts. Slower controllers (PCAN-USB) expose this sooner.
Can you drop back to a single core to see if this is a multicore
problem? It will either fix it or make it worse if it is a loading/delay
problem.
Reordering packets should be considered a serious bug as some CAN
protocols can't handle this at all.
Regards,
Tom
next prev parent reply other threads:[~2015-07-05 9:32 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-20 17:21 [PATCH] can: fix loss of frames due to wrong assumption in raw_rcv Manfred Schlaegl
2015-06-20 22:42 ` Oliver Hartkopp
2015-06-20 22:42 ` Oliver Hartkopp
2015-06-22 9:48 ` Manfred Schlaegl
2015-06-22 9:48 ` Manfred Schlaegl
2015-06-22 10:24 ` Oliver Hartkopp
2015-06-22 10:24 ` Oliver Hartkopp
[not found] ` <5588E6FB.5040903@optusnet.com.au>
2015-06-23 8:01 ` Oliver Hartkopp
2015-06-24 2:13 ` Tom Evans
2015-06-24 19:56 ` Oliver Hartkopp
2015-06-25 8:32 ` [BULK]Re: " Stephane Grosjean
2015-06-25 9:36 ` Oliver Hartkopp
2015-06-29 16:13 ` Oliver Hartkopp
2015-07-04 16:54 ` Oliver Hartkopp
2015-07-05 1:18 ` Tom Evans [this message]
2015-07-05 18:21 ` Oliver Hartkopp
2015-07-06 5:44 ` Oliver Hartkopp
2015-07-06 6:50 ` Tom Evans
2015-07-06 17:09 ` Oliver Hartkopp
2015-07-06 7:58 ` [BULK]Re: " Stephane Grosjean
2015-07-06 17:14 ` Oliver Hartkopp
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=559885DC.8040208@optusnet.com.au \
--to=tom_usenet@optusnet.com.au \
--cc=linux-can@vger.kernel.org \
--cc=manfred.schlaegl@gmx.at \
--cc=mkl@pengutronix.de \
--cc=s.grosjean@peak-system.com \
--cc=socketcan@hartkopp.net \
/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.