Hi,

I did some tests. I used a SJA1000 connected via a local bus to an
AT91 processor (at 200Mhz) for injecting frames at maximum speed
(cangen -g 0 -i -x -I 0 -L 8 -D 11223344DEADBEEF can0) to see how much
packets the mcp2510 (connected do an S3C2440 running at 200Mhz and the
SPI bus at 2 Mhz) drops.

First of all for your test just use "ifconfig can0": you will see
under frame (at least on busybox ifconfig) the number of rx overruns
and, eventually, the rx frames dropped due to skb shortage in the
driver (never seen them personally). You can look at
/sys/bus/spi/drivers/mcp251x/spi0.2/net\:can0/statistics/* but you get
the same information for this purpose. Additionally I verified that
you get the expected error frames about RX overflow.

With standard SPI driver and without any workqueue hack I see quite a
bit of lost RX packets at 100 kbit/s CAN speed. Using the best SPI
driver for my SOC and the workqueue priority hack (both from the page
mentioned) I don't see any CAN frames lost at 100 kbit/s and not many
of them at 500. And the loss of frames comes in short bursts, like
there is something stopping the workqueue anyway.

If you use the mcp2515 you can go to 5 Mhz on the SPI bus and the
communication is more efficient, so I guess with some luck you can
come to no packet lost at 500 kbit/s too.

So I think you should check the SPI master driver first and then try
to increase the priority of the SPI workqueue. Let me know the
results.

-- 
Christian Pellegrin, see http://www.evolware.org/chri/
"Real Programmers don't play tennis, or any other sport which requires
you to change clothes. Mountain climbing is OK, and Real Programmers
wear their climbing boots to work in case a mountain should suddenly
spring up in the middle of the computer room."
_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users

Reply via email to