From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Eric Dumazet <eric.dumazet@gmail.com>, Tom Herbert <tom@herbertland.com>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>,
"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>,
Sunil Kovvuri <sunil.kovvuri@gmail.com>,
Jonathon Reinhart <jonathon.reinhart@gmail.com>
Subject: Re: Fighting out-of-order reception with RPS?
Date: Tue, 14 Jul 2015 19:09:31 +0200 [thread overview]
Message-ID: <55A5424B.2000803@hartkopp.net> (raw)
In-Reply-To: <1436763470.24939.66.camel@edumazet-glaptop2.roam.corp.google.com>
On 13.07.2015 06:57, Eric Dumazet wrote:
> On Sun, 2015-07-12 at 21:15 +0200, Oliver Hartkopp wrote:
>
>> E.g. with
>>
>> skb_set_hash(skb, dev->ifindex, PKT_HASH_TYPE_L2);
>>
>> and
>>
>> echo f > /sys/class/net/can0/queues/rx-0/rps_cpus
>>
>> I get properly ordered CAN frames - even with netif_rx() processed skbs. I
>> just want to have this stuff to be enabled by default for CAN interfaces to
>> kill the OOO frame issue.
>
> I doubt your skb_set_hash() makes any difference.
>
> RPS prefers a L4 hash anyway (skb_get_hash()), so flow dissection
> happens.
>
Please take a look into netif_rx_internal() in net/core/dev.c
http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/net/core/dev.c?id=v4.2-rc1#n3486
with CONFIG_RPS netif_rx() takes care about the rps cpu and puts the skb into
the correct hash specific queue.
As we usually have several PF_CAN sockets which get CAN frames from a specific
CAN interface it makes no sense to enqueue packets into queues sorted by
receiving sockets or L4 hash (we don't have L4 addressing on CAN).
The skb_set_hash(skb, dev->ifindex, PKT_HASH_TYPE_L2) makes sure that the skbs
from a specific CAN netdev are always processed in the same queue.
When this is not wanted in 'fastpath netif_rx()' why is the CONFIG_RPS section
in there?
What is the advantage of implementing NAPI and a 'private sk_buf queue'
suggested by Tom in http://marc.info/?l=linux-can&m=143681458003381&w=2 to set
the hash as shown and enable rps_cpus?
The latter just looks just like a complexity boost to have a functionality
that already exists in netif_rx(). I just want to understand it.
Regards,
Oliver
next prev parent reply other threads:[~2015-07-14 17:09 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-08 17:49 Fighting out-of-order reception with RPS? Oliver Hartkopp
2015-07-08 21:17 ` Tom Herbert
2015-07-09 5:55 ` Oliver Hartkopp
2015-07-10 2:48 ` Tom Herbert
2015-07-10 20:36 ` Oliver Hartkopp
2015-07-11 4:35 ` Eric Dumazet
2015-07-12 19:15 ` Oliver Hartkopp
2015-07-13 3:22 ` David Miller
2015-07-13 4:57 ` Eric Dumazet
2015-07-14 17:09 ` Oliver Hartkopp [this message]
2015-07-14 18:02 ` Tom Herbert
2015-07-14 19:03 ` David Miller
2015-07-14 19:05 ` Oliver Hartkopp
2015-07-13 19:08 ` Tom Herbert
2015-07-09 6:34 ` Holger Schurig
2015-07-09 8:48 ` Oliver Hartkopp
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=55A5424B.2000803@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=eric.dumazet@gmail.com \
--cc=jonathon.reinhart@gmail.com \
--cc=linux-can@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sunil.kovvuri@gmail.com \
--cc=tom@herbertland.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).