From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Marek Kierdelewicz <marek@koba.pl>
Cc: netdev@vger.kernel.org
Subject: Re: skb processing in SMP kernel
Date: Wed, 14 Nov 2007 12:34:40 -0800 [thread overview]
Message-ID: <20071114123440.0fa0031d@freepuppy.rosehill> (raw)
In-Reply-To: <20071114211437.7f4c79d2@catlap>
On Wed, 14 Nov 2007 21:14:37 +0100
Marek Kierdelewicz <marek@koba.pl> wrote:
> Hi there,
>
> I'm looking at file /usr/src/linux/net/core/dev.c
> function "int netif_rx(struct sk_buff *skb)"
> and following line:
>
> queue = &__get_cpu_var(softnet_data);
>
> Is it possible to put skb into the queue of another CPU then the one
> servicing the interrupt? (Disclaimer: Yeah, I know it's probably not
> the smartest thing to do because of locks and cache line bounces). How
> could it be accomplished? Any lead, comment, link appreciated.
>
>
> pozdrawiam
You could but then you would need locking on the queue, and that would
defeat the whole purpose of per-cpu queue's. You would also need to do
an IPI to notify the other processor.
If you are trying to do packet distribution, look at the newest drivers that use MSI-X
and napi to do packet distribution.
--
Stephen Hemminger <shemminger@linux-foundation.org>
prev parent reply other threads:[~2007-11-14 20:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-14 20:14 skb processing in SMP kernel Marek Kierdelewicz
2007-11-14 20:34 ` Stephen Hemminger [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=20071114123440.0fa0031d@freepuppy.rosehill \
--to=shemminger@linux-foundation.org \
--cc=marek@koba.pl \
--cc=netdev@vger.kernel.org \
/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