From: Eric Dumazet <eric.dumazet@gmail.com>
To: zhou rui <zhourui.cn@gmail.com>
Cc: Tom Herbert <therbert@google.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: RPS will assign different smp_processor_id for the same packet?
Date: Sun, 24 Apr 2011 12:53:36 +0200 [thread overview]
Message-ID: <1303642416.2747.74.camel@edumazet-laptop> (raw)
In-Reply-To: <BANLkTintzzpixPi+HDzGUV_agCGr6EX7AQ@mail.gmail.com>
Le dimanche 24 avril 2011 à 17:36 +0800, zhou rui a écrit :
> >
>
> my understanding:
>
> non-NAPI scenario:
>
> netif_rx( in irq, get_rps_cpu,enqueue_to_backlog to deliver packet to
> cpu queue) ------>net_rx_action(in softirq,deque and process packet)
>
>
> NAPI:
>
> what does RPS do?(in
> irq)------------------------>net_rx_action(softirq)----->netif_receive_skb(get_rps_cpu,enque
> packet)
>
> so my question is:
> for NAPI, get_rps_cpu will be done in softirq?
>
> if the above situation is true,will this happen?
> packet_for_cpu_1 --> cpu0(netif_receive_skb,in softirq) --->delivered
> to cpu1(softirq)
NAPI is done under softirq, yes.
netif_receive_skb()
cpu = get_rps_cpu()
if (othercpu(cpu))
enqueue_to_backlog(cpu)
else
__netif_receive_skb(skb);
enqueue_to_backlog() triggers an IPI (hard IRQ) to other cpu1,
to queue an NAPI context. (and triggers softirq)
next prev parent reply other threads:[~2011-04-24 10:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-21 15:50 RPS will assign different smp_processor_id for the same packet? zhou rui
2011-04-21 16:08 ` Eric Dumazet
2011-04-21 16:25 ` Eric Dumazet
2011-04-21 16:29 ` zhou rui
2011-04-23 15:31 ` zhou rui
2011-04-23 19:56 ` Tom Herbert
2011-04-24 2:00 ` zhou rui
2011-04-24 8:00 ` Eric Dumazet
2011-04-24 9:36 ` zhou rui
2011-04-24 10:53 ` Eric Dumazet [this message]
2011-04-25 11:02 ` Neil Horman
2011-04-21 16:27 ` zhou rui
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=1303642416.2747.74.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=therbert@google.com \
--cc=zhourui.cn@gmail.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