Hi,
We're using the Linux DCAN driver kernel version 4.18 and are seeing several receive frame losses. Here is a statistics output:
# ip -details -statistics link show can0
3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 1000
link/can promiscuity 435268
can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 250000 sample-point 0.875
tq 250 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
c_can: tseg1 2..16 tseg2 1..8 sjw 1..4 brp 1..1024 brp-inc 1
clock 24000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 3 3 0 numtxqueues 435300 gso_max_size 435364 gso_max_segs 435400
RX: bytes packets errors dropped overrun mcast
3086416 385802 1246 0 1246 0
TX: bytes packets errors dropped carrier collsns
20 5 0 0 0 0
The latest Linux CAN driver only supports 32 message objects (16 for RX) which is not the optimum the processor can support so I pulled or cherry-picked a couple of outstanding commits that supports 64 message objects (not mainlined yet). This reduced the number of frame losses but there are still overruns occurring:
AFTER (64 CAN msg objects; 32 RX/32 TX):
=======================================
# ip -details -statistics link show can0
3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 1000
link/can promiscuity 435268
can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 250000 sample-point 0.875
tq 250 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
c_can: tseg1 2..16 tseg2 1..8 sjw 1..4 brp 1..1024 brp-inc 1
clock 24000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 2 2 0 numtxqueues 435300 gso_max_size 435364 gso_max_segs 435400
RX: bytes packets errors dropped overrun mcast
3123480 390435 41 0 41 0
TX: bytes packets errors dropped carrier collsns
20 5 0 0 0 0
Increasing the number of RX message objects further reduced the overruns but noticeably slowed down the system (e.g., console is almost unresponsive, Bluetooth throughput decreased).
I'm wondering if someone can help us resolve this.
Thanks in advance,
Elenita