All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Mirza Krak <mirza.krak@hostmobility.com>,
	Marc Kleine-Budde <mkl@pengutronix.de>
Cc: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: Re: rx-fifo: add implmentation and switch flexcan driver to use it
Date: Wed, 11 May 2016 11:12:14 +0200	[thread overview]
Message-ID: <5732F76E.6080804@hartkopp.net> (raw)
In-Reply-To: <CAJ=nTsuQgeLpjA6RrL-CKAx+2P9HQhXsad1Y-zk0Cm4b9FNA1g@mail.gmail.com>



On 05/10/2016 02:55 PM, Mirza Krak wrote:
> 2016-05-10 10:27 GMT+02:00 Mirza Krak <mirza.krak@hostmobility.com>:
>> 2016-05-09 12:52 GMT+02:00 Marc Kleine-Budde <mkl@pengutronix.de>:
>>> Hello,
>>>
>>> this patch add support for a software bases rx-fifo implementation (patches
>>> 1+2). The remaining patches modify the flexcan driver to make use of it. imx6
>>> and vf610 SoCs can make use of the 64 mailbox software FIFO, while older SoCs
>>> still use flexcan's 6 mailbox deep hardware FIFO.
>>>
>>> Testing on any flexcan core is highly appreciated.
>>
>> Hi Marc.
>>
>> Tested your patch series on a vf610 SOC. I ran 2 x CAN @ 1Mbit, 80-90 % busload.
>>
>> I do no longer get any "overrun" errors, which I got without your
>> patch series. And it seems to be stable, unlike previous patch series.
>> Improvement!
>>
>> However I ran a simple sequence test and there seems to be some
>> ordering issues. I have some memory of that similar issues have been
>> discussed earlier on the mailing list and I am not quite sure if this
>> is related to your patch series but I get following:
>>
>> root@mx4-v61-1000000:~/test/can_test# uname -a
>> Linux mx4-v61-1000000 4.1.15-00056-ge0b8ccc-dirty #12 Mon May 9
>> 15:59:54 CEST 2016 armv7l GNU/Linux
>> root@mx4-v61-1000000:~/test/can_test# ./cansequence -r can1
>> interface = can1, family = 29, type = 3, proto = 1
>> received wrong sequence count. expected: 60, got: 61
>> received wrong sequence count. expected: 62, got: 60
>> received wrong sequence count. expected: 61, got: 62
>> received wrong sequence count. expected: 118, got: 119
>> received wrong sequence count. expected: 120, got: 118
>> received wrong sequence count. expected: 119, got: 120
>> received wrong sequence count. expected: 76, got: 77
>> received wrong sequence count. expected: 78, got: 76
>> received wrong sequence count. expected: 77, got: 78
>>
>> One strange thing is that the sequence errors only occur on can1, can0
>> does not show any errors.

Hello Marc,

is it possible that the indirection irq -> rx-fifo -> napi can shuffle 
the CAN frames when the can1 irq is served by different CPUs?

We can probably set the processing CPU number into can_frame.__res0 for 
a test and print it in cansequence then.

Regards,
Oliver

ps. @Mirza: Thanks for testing!

>
> Some follow-up information.
>
> Sequence errors occurs only if I run at 500 kbit/s or faster, which
> suggests that higher CPU load triggers it.
>
> I also ran same tests without your patch series and do not get any
> sequence errors.
>

  reply	other threads:[~2016-05-11  9:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-09 10:52 rx-fifo: add implmentation and switch flexcan driver to use it Marc Kleine-Budde
2016-05-09 10:52 ` [PATCH 01/10] can: rx-fifo: Add support for simple irq offloading Marc Kleine-Budde
2016-05-09 10:52 ` [PATCH 02/10] can: rx-fifo: introduce software rx-fifo implementation Marc Kleine-Budde
2016-05-09 10:52 ` [PATCH 03/10] can: flexcan: calculate default value for imask1 during runtime Marc Kleine-Budde
2016-05-09 10:52 ` [PATCH 04/10] can: flexcan: make TX mailbox selectable " Marc Kleine-Budde
2016-05-09 10:52 ` [PATCH 05/10] can: flexcan: make use of rx-fifo's irq_offload_simple Marc Kleine-Budde
2016-05-20 11:31   ` Mirza Krak
2016-05-09 10:52 ` [PATCH 06/10] can: flexcan: add missing register definitions Marc Kleine-Budde
2016-05-09 10:52 ` [PATCH 07/10] can: flexcan: activate individual RX masking and initialize reg_rximr Marc Kleine-Budde
2016-05-09 10:52 ` [PATCH 08/10] can: flexcan: add quirk FLEXCAN_QUIRK_ENABLE_EACEN_RRS Marc Kleine-Budde
2016-05-09 10:52 ` [PATCH 09/10] can: flexcan: add support for rx-fifo based software FIFO implementation Marc Kleine-Budde
2016-05-09 10:52 ` [PATCH 10/10] can: flexcan: switch imx6 and vf610 to software based fifo Marc Kleine-Budde
2016-05-09 10:54 ` rx-fifo: add implmentation and switch flexcan driver to use it Marc Kleine-Budde
2016-05-10  8:27 ` Mirza Krak
2016-05-10 12:55   ` Mirza Krak
2016-05-11  9:12     ` Oliver Hartkopp [this message]
     [not found]       ` <CAJ=nTssNPDeGW+pEAHTpa+5ARQCQHfXumE=a=cr9prmjhgeJxQ@mail.gmail.com>
2016-05-11 19:07         ` Mirza Krak
2016-05-13 11:44       ` Tom Evans

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=5732F76E.6080804@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=linux-can@vger.kernel.org \
    --cc=mirza.krak@hostmobility.com \
    --cc=mkl@pengutronix.de \
    /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.