linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Need help in interpreting ip status output
@ 2020-08-31 20:59 Gardner, Brent G. (GRC-LEM0)
  0 siblings, 0 replies; 9+ messages in thread
From: Gardner, Brent G. (GRC-LEM0) @ 2020-08-31 20:59 UTC (permalink / raw)
  To: linux-can

I apologize for not knowing how to join the thread in the subject, but I'm trying to investigate similar issues.  I'm using a Raspberry Pi CM3+ with a MCP2515 dtoverlay.  During moments of high CAN traffic (and possibly more prevalent during high CPU usage), many RX overruns occur.  The physical CAN bus signals appears sound, as I can verify the dropped frames are present and valid with an oscilloscope, so I believe the issue is related to the SocketCAN driver.  Did upgrading the kernel help?  To what version? Thanks for your help.

$uname -a
4.19.118-v7+ #1311 SMP Mon Apr 27 14:21:24 BST 2020 armv7l GNU/Linux

$ ip -s link show can0
2: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 200
    link/can
    RX: bytes  packets  errors  dropped overrun mcast
    14992      14992    71      15      71      0
    TX: bytes  packets  errors  dropped carrier collsns
    1364       3028     0       0       0       0

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

* Re: Need help in interpreting ip status output
  2020-03-23  7:44       ` Marc Kleine-Budde
@ 2020-03-23 11:16         ` André Hartmann
  0 siblings, 0 replies; 9+ messages in thread
From: André Hartmann @ 2020-03-23 11:16 UTC (permalink / raw)
  To: Marc Kleine-Budde, Oliver Hartkopp, linux-can; +Cc: Alex Blasche

Thanks Marc! I'll forward this information.

Best regards,
André

On 23.03.20 08:44, Marc Kleine-Budde wrote:
> On 3/21/20 4:19 PM, André Hartmann wrote:
>> Actually it's not my system. The report is from a customer doing a full
>> load test on an iMX8: https://bugreports.qt.io/browse/QTBUG-82610
>
> Which exact kernel are you using?
> Don't run any applications and/or kernel logs over the serial console.
>
>> I guess the customer should try a more recent Kernel than 4.14 first?
>
> Ack.
>
> Marc
>

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

* Re: Need help in interpreting ip status output
  2020-03-21 15:19     ` André Hartmann
  2020-03-21 17:04       ` Oliver Hartkopp
@ 2020-03-23  7:44       ` Marc Kleine-Budde
  2020-03-23 11:16         ` André Hartmann
  1 sibling, 1 reply; 9+ messages in thread
From: Marc Kleine-Budde @ 2020-03-23  7:44 UTC (permalink / raw)
  To: André Hartmann, Oliver Hartkopp, linux-can; +Cc: Alex Blasche

On 3/21/20 4:19 PM, André Hartmann wrote:
> Actually it's not my system. The report is from a customer doing a full
> load test on an iMX8: https://bugreports.qt.io/browse/QTBUG-82610

Which exact kernel are you using?
Don't run any applications and/or kernel logs over the serial console.

> I guess the customer should try a more recent Kernel than 4.14 first?

Ack.

Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

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

* Re: Need help in interpreting ip status output
  2020-03-21 17:04       ` Oliver Hartkopp
@ 2020-03-23  7:19         ` André Hartmann
  0 siblings, 0 replies; 9+ messages in thread
From: André Hartmann @ 2020-03-23  7:19 UTC (permalink / raw)
  To: Oliver Hartkopp, linux-can, Alex Blasche, Marc Kleine-Budde

Thanks Oliver.

Reading the log it indeed seems a good idea to try a newer Kernel.

Marc, do you have any further comments?

Thanks and best regards,
André

On 21.03.20 18:04, Oliver Hartkopp wrote:
> + Marc
>
> Hi André,
>
> On 21/03/2020 16.19, André Hartmann wrote:
>
>>> On 12/03/2020 18.43, André Hartmann wrote:
>>>
>>>>> can someone help me interpreting the following ip output:
>
>>> The reason for the overrun error is a notification from the CAN
>>> controller itself. It tells us that the received CAN frame has not been
>>> read from the controller until the next CAN frame arrived.
>>
>> Ok, that's what I thought too, thanks for the confirmation.
>>
>>> The dropped counter usually indicates that the CAN driver did not get a
>>> skbuff data structure (e.g. out of memory condition).
>>>
>>> This is NOT good. What CAN hardware/setup are you using?
>>
>> Actually it's not my system. The report is from a customer doing a full
>> load test on an iMX8: https://bugreports.qt.io/browse/QTBUG-82610
>
> Thanks for the link!
>
>> I guess the customer should try a more recent Kernel than 4.14 first?
>
> The FlexCAN driver (which is used in the IMX8 AFAIK) had a remarkable
> number of changes last year:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/drivers/net/can/flexcan.c
>
>
> So I would definitely suggest an update.
> I added Marc to this thread as he was very active on the FlexCAN
> improvements.
>
> Best,
> Oliver

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

* Re: Need help in interpreting ip status output
  2020-03-21 15:19     ` André Hartmann
@ 2020-03-21 17:04       ` Oliver Hartkopp
  2020-03-23  7:19         ` André Hartmann
  2020-03-23  7:44       ` Marc Kleine-Budde
  1 sibling, 1 reply; 9+ messages in thread
From: Oliver Hartkopp @ 2020-03-21 17:04 UTC (permalink / raw)
  To: André Hartmann, linux-can, Alex Blasche, Marc Kleine-Budde

+ Marc

Hi André,

On 21/03/2020 16.19, André Hartmann wrote:

>> On 12/03/2020 18.43, André Hartmann wrote:
>>
>>>> can someone help me interpreting the following ip output:

>> The reason for the overrun error is a notification from the CAN
>> controller itself. It tells us that the received CAN frame has not been
>> read from the controller until the next CAN frame arrived.
> 
> Ok, that's what I thought too, thanks for the confirmation.
> 
>> The dropped counter usually indicates that the CAN driver did not get a
>> skbuff data structure (e.g. out of memory condition).
>>
>> This is NOT good. What CAN hardware/setup are you using?
> 
> Actually it's not my system. The report is from a customer doing a full
> load test on an iMX8: https://bugreports.qt.io/browse/QTBUG-82610

Thanks for the link!

> I guess the customer should try a more recent Kernel than 4.14 first?

The FlexCAN driver (which is used in the IMX8 AFAIK) had a remarkable 
number of changes last year:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/drivers/net/can/flexcan.c

So I would definitely suggest an update.
I added Marc to this thread as he was very active on the FlexCAN 
improvements.

Best,
Oliver

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

* Re: Need help in interpreting ip status output
  2020-03-21 12:38   ` Oliver Hartkopp
@ 2020-03-21 15:19     ` André Hartmann
  2020-03-21 17:04       ` Oliver Hartkopp
  2020-03-23  7:44       ` Marc Kleine-Budde
  0 siblings, 2 replies; 9+ messages in thread
From: André Hartmann @ 2020-03-21 15:19 UTC (permalink / raw)
  To: Oliver Hartkopp, linux-can; +Cc: Alex Blasche

Hi Oliver,

thanks for your answer. I hope you are well.

> Hi André,
>
> I have an idea ;-)
>
> On 12/03/2020 18.43, André Hartmann wrote:
>
>>> can someone help me interpreting the following ip output:
>>>
>>> ip -s link show can1
>>>       3: can1: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state
>>> UNKNOWN mode DEFAULT group default qlen 100
>>>           link/can
>>>           RX: bytes  packets  errors  dropped overrun mcast
>>>           0          9987413  1       74      1       0
>>>           TX: bytes  packets  errors  dropped carrier collsns
>>>           0          0        0       0       0       0
>>>
>>> I'm especially interested in the meaning of the
>>>
>>> * 1 errors
>>> * 74 dropped
>>> * 1 overrun
>
> E.g. if you look into
> linux/drivers/net/can/sja1000/sja1000.c
> you can see that an overrun error also triggers the error counter to
> increase - that's why both are set to 1.
>
> The reason for the overrun error is a notification from the CAN
> controller itself. It tells us that the received CAN frame has not been
> read from the controller until the next CAN frame arrived.

Ok, that's what I thought too, thanks for the confirmation.

> The dropped counter usually indicates that the CAN driver did not get a
> skbuff data structure (e.g. out of memory condition).
>
> This is NOT good. What CAN hardware/setup are you using?

Actually it's not my system. The report is from a customer doing a full
load test on an iMX8: https://bugreports.qt.io/browse/QTBUG-82610

I guess the customer should try a more recent Kernel than 4.14 first?

Thanks, and best regards,
André

>
> Regards,
> Oliver

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

* Re: Need help in interpreting ip status output
  2020-03-12 17:43 ` André Hartmann
@ 2020-03-21 12:38   ` Oliver Hartkopp
  2020-03-21 15:19     ` André Hartmann
  0 siblings, 1 reply; 9+ messages in thread
From: Oliver Hartkopp @ 2020-03-21 12:38 UTC (permalink / raw)
  To: André Hartmann, linux-can

Hi André,

I have an idea ;-)

On 12/03/2020 18.43, André Hartmann wrote:

>> can someone help me interpreting the following ip output:
>>
>> ip -s link show can1
>>       3: can1: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state 
>> UNKNOWN mode DEFAULT group default qlen 100
>>           link/can
>>           RX: bytes  packets  errors  dropped overrun mcast
>>           0          9987413  1       74      1       0
>>           TX: bytes  packets  errors  dropped carrier collsns
>>           0          0        0       0       0       0
>>
>> I'm especially interested in the meaning of the
>>
>> * 1 errors
>> * 74 dropped
>> * 1 overrun

E.g. if you look into
linux/drivers/net/can/sja1000/sja1000.c
you can see that an overrun error also triggers the error counter to 
increase - that's why both are set to 1.

The reason for the overrun error is a notification from the CAN 
controller itself. It tells us that the received CAN frame has not been 
read from the controller until the next CAN frame arrived.

The dropped counter usually indicates that the CAN driver did not get a 
skbuff data structure (e.g. out of memory condition).

This is NOT good. What CAN hardware/setup are you using?

Regards,
Oliver

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

* Re: Need help in interpreting ip status output
  2020-03-06 20:13 André Hartmann
@ 2020-03-12 17:43 ` André Hartmann
  2020-03-21 12:38   ` Oliver Hartkopp
  0 siblings, 1 reply; 9+ messages in thread
From: André Hartmann @ 2020-03-12 17:43 UTC (permalink / raw)
  To: linux-can

Has no one an idea?

Regards, André

On 06.03.20 21:13, André Hartmann wrote:
> Hi all,
> 
> can someone help me interpreting the following ip output:
> 
> ip -s link show can1
>       3: can1: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state 
> UNKNOWN mode DEFAULT group default qlen 100
>           link/can
>           RX: bytes  packets  errors  dropped overrun mcast
>           0          9987413  1       74      1       0
>           TX: bytes  packets  errors  dropped carrier collsns
>           0          0        0       0       0       0
> 
> I'm especially interested in the meaning of the
> 
> * 1 errors
> * 74 dropped
> * 1 overrun
> 
> fields.
> 
> Thanks and best regards,
> André


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

* Need help in interpreting ip status output
@ 2020-03-06 20:13 André Hartmann
  2020-03-12 17:43 ` André Hartmann
  0 siblings, 1 reply; 9+ messages in thread
From: André Hartmann @ 2020-03-06 20:13 UTC (permalink / raw)
  To: linux-can

Hi all,

can someone help me interpreting the following ip output:

ip -s link show can1
      3: can1: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state
UNKNOWN mode DEFAULT group default qlen 100
          link/can
          RX: bytes  packets  errors  dropped overrun mcast
          0          9987413  1       74      1       0
          TX: bytes  packets  errors  dropped carrier collsns
          0          0        0       0       0       0

I'm especially interested in the meaning of the

* 1 errors
* 74 dropped
* 1 overrun

fields.

Thanks and best regards,
André

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

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

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-31 20:59 Need help in interpreting ip status output Gardner, Brent G. (GRC-LEM0)
  -- strict thread matches above, loose matches on Subject: below --
2020-03-06 20:13 André Hartmann
2020-03-12 17:43 ` André Hartmann
2020-03-21 12:38   ` Oliver Hartkopp
2020-03-21 15:19     ` André Hartmann
2020-03-21 17:04       ` Oliver Hartkopp
2020-03-23  7:19         ` André Hartmann
2020-03-23  7:44       ` Marc Kleine-Budde
2020-03-23 11:16         ` André Hartmann

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