From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Howells <dhowells@redhat.com>,
Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev@vger.kernel.org, linux-afs@lists.infradead.org,
linux-kernel@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net 2/2] rxrpc: Fix the data_ready handler
Date: Fri, 5 Oct 2018 10:44:36 -0700 [thread overview]
Message-ID: <f423612c-db54-b59d-d2f1-9449bb997106@gmail.com> (raw)
In-Reply-To: <25989.1538757200@warthog.procyon.org.uk>
On 10/05/2018 09:33 AM, David Howells wrote:
> Eric Dumazet <eric.dumazet@gmail.com> wrote:
>
>> sk_data_ready is not meant to process packets, it is meant to signal
>> to another entity (preferably running in process context and thus with proper
>> schedule points, and not blocking BH) that there is data ready to be consumed.
>
> The issue is that I need to route the packets to the appropriate call, and the
> BH appears to be the right place to do this, especially as I can quickly parse
> and discard certain types of packet right there.
>
> If I move all of this to process context then that adds extra context switches
> between the routing process and the destination process.
>
>> Under DOS, it is possible multiple cpus will sk_data_ready in parallel.
>
> Ummm... I've been led to believe that sk_data_ready will *not* be called in
> parallel and that the code it calls can assume non-reentrancy. Is this not
> the case.
Certainly not for UDP.
TCP input processing uses the socket lock, but UDP is fully parallel.
>
> What about the patch I attached, whereby I use the encap_rcv() hook. Do you
> say that won't work?
I am kind of busy today, will look at it next week.
prev parent reply other threads:[~2018-10-05 17:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-05 13:42 [PATCH net 0/2] rxrpc: Fixes David Howells
2018-10-05 13:43 ` [PATCH net 1/2] rxrpc: Fix some missed refs to init_net David Howells
2018-10-05 13:43 ` [PATCH net 2/2] rxrpc: Fix the data_ready handler David Howells
2018-10-05 13:52 ` Eric Dumazet
2018-10-05 14:18 ` David Howells
2018-10-05 16:07 ` Eric Dumazet
2018-10-05 16:33 ` David Howells
2018-10-05 17:44 ` Eric Dumazet [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=f423612c-db54-b59d-d2f1-9449bb997106@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=dhowells@redhat.com \
--cc=linux-afs@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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).