netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] pfifo_fast may cause out-of-order CAN frame transmission
@ 2020-01-08 14:55 Ahmad Fatoum
  2020-01-09 12:51 ` Paolo Abeni
  0 siblings, 1 reply; 11+ messages in thread
From: Ahmad Fatoum @ 2020-01-08 14:55 UTC (permalink / raw)
  To: linux-can, netdev, pabeni; +Cc: Sascha Hauer

Hello,

I've run into an issue of CAN frames being sent out-of-order on an i.MX6 Dual
with Linux v5.5-rc5. Bisecting has lead me down to this commit:

ba27b4cdaaa ("net: dev: introduce support for sch BYPASS for lockless qdisc")

With it, using pfifo_fast, every few hundred frames, FlexCAN's .ndo_start_xmit is
passed frames in an order different from how userspace stuffed them into the same
socket.

Reverting it fixes the issue as does booting with maxcpus=1 or using pfifo
instead of pfifo_fast.

According to [1], such reordering shouldn't be happening.

Details on my setup:
Kernel version: v5.5-rc5, (occurs much more often with LOCKDEP turned on)
CAN-Bitrate: 250 kbit/s
CAN frames are generated with:
cangen canX -I2 -L1 -Di -i -g0.12 -p 100
which keeps polling after ENOBUFS until socket is writable, sends out a CAN
frame with one incrementing payload byte and then waits 120 usec before repeating.

Please let me know if any additional info is needed.

Cheers
Ahmad

[1]: http://linux-tc-notes.sourceforge.net/tc/doc/sch_pfifo_fast.txt

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-10-07 21:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-08 14:55 [BUG] pfifo_fast may cause out-of-order CAN frame transmission Ahmad Fatoum
2020-01-09 12:51 ` Paolo Abeni
2020-01-09 17:39   ` Ahmad Fatoum
2020-01-10 16:31     ` Paolo Abeni
2020-01-12 21:29       ` Ahmad Fatoum
     [not found]         ` <57a2352dfc442ea2aa9cd653f8e09db277bf67c7.camel@redhat.com>
2020-01-20 16:06           ` Ahmad Fatoum
2020-02-04 16:25             ` Ahmad Fatoum
2020-02-06 13:21               ` Paolo Abeni
2020-02-06 17:06                 ` Oliver Hartkopp
2020-02-14 16:03                 ` Ahmad Fatoum
2020-10-07 21:07                 ` Vijayendra Suman

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).