linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: wouter van herpen <wouter.van.herpen@prodrive-technologies.com>,
	Marc Kleine-Budde <mkl@pengutronix.de>
Cc: linux-can@vger.kernel.org
Subject: Re: c_can: wrong frame order reception
Date: Thu, 22 Oct 2015 19:01:45 +0200	[thread overview]
Message-ID: <56291679.8060407@hartkopp.net> (raw)
In-Reply-To: <loom.20151022T114518-579@post.gmane.org>

Hi Wouter,



On 10/22/2015 11:50 AM, wouter van herpen wrote:
>> you can try to use the SMP-affinity to pin the innterrupt to a specific CPU:
>>
>> 	https://www.kernel.org/doc/Documentation/IRQ-affinity.txt
>>
>> But we're currently also checking the usability of receive packet steering 
>> (RPS) on SMP systems. Please check
>>
>> 	http://marc.info/?l=linux-can&m=144251788500555&w=2
>>
>> whether just using
>>
>> 	echo f > /sys/class/net/can0/queues/rx-0/rps_cpus
>>
>> helps in you case or whether you need to set the skb hash which is suggested 
>> there too.
>>
>>
> 
> Hi Oliver,
> 
> I have tried SMP affinity, in combination with adjusting
> /sys/class/net/can0/queues/rx-0/rps_cpus. These changes did not solve the
> out of order reception.
> Also adding skb_set_hash(skb, dev->ifindex, PKT_HASH_TYPE_L2); did not make
> a difference.

That's pretty bad!

> 
> Do you have any other suggestions?

No. Indeed setting an interrupt with SMP affinity to a single CPU is already
the 'strongest' tool I know.

Did you also try SMP affinity without changing the RPS settings?

> 
> I have also done some testing with the pch_can driver. I noticed there the
> out of order receptions are less frequent. Using the pch_can driver, OOO
> reception only occurs if we stress the CPU over e.g. UART.
> Using c_can driver, the OOO replies occur more often.

@Marc: Both drivers (c_can/pch_can) use NAPI. Would it make sense to convert
e.g. the c_can driver to non-NAPI for a test?

Regards,
Oliver

      reply	other threads:[~2015-10-22 17:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-05 14:58 c_can: wrong frame order reception Alexander Stein
2014-03-05 15:13 ` Alexander Stein
2014-04-01 18:33   ` Oliver Hartkopp
2014-04-02  5:57     ` Alexander Stein
2014-04-03 13:41     ` Alexander Stein
2014-04-03 14:01       ` Wolfgang Grandegger
2015-10-21  9:19         ` wouter van herpen
2015-10-21 14:12           ` Marc Kleine-Budde
2015-10-21 14:28             ` wouter van herpen
2015-10-21 14:33           ` Marc Kleine-Budde
2015-10-22  5:05             ` Oliver Hartkopp
2015-10-22  9:50               ` wouter van herpen
2015-10-22 17:01                 ` Oliver Hartkopp [this message]

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=56291679.8060407@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=wouter.van.herpen@prodrive-technologies.com \
    /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 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).