lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 24 Apr 2011 10:00:33 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	zhou rui <zhourui.cn@...il.com>
Cc:	Tom Herbert <therbert@...gle.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: RPS will assign different smp_processor_id for the same packet?

Le dimanche 24 avril 2011 à 10:00 +0800, zhou rui a écrit :
> On Sun, Apr 24, 2011 at 3:56 AM, Tom Herbert <therbert@...gle.com> wrote:
> > On Sat, Apr 23, 2011 at 8:31 AM, zhou rui <zhourui.cn@...il.com> wrote:
> >> one more question is:
> >>
> >> in the function "int netif_receive_skb(struct sk_buff *skb)"
> >>
> >> cpu = get_rps_cpu(skb->dev, skb, &rflow);
> >> if (cpu >= 0) {
> >>  ret = enqueue_to_backlog(skb, cpu, &rflow->last_qtail);
> >> ....
> >>
> >> probably the cpu is different from the current processor id?(smp_processor_id)
> >> let's say: get_rps_cpu->cpu 0, smp_processor_id->cpu1
> >> when this happen, does it mean that cpu1 is handling the softirq but
> >> have to divert the packet to cpu0?(via a new softirq?)
> >>
> >> so for one packet it involve 2 softirqs?
> >>
> >> possible to get_rps_cpu in interrupt,then let the target cpu do only
> >> one softirq to hanle the packet?
> >>
> > Yes, this is what a non-NAPI driver would do.
> >
> > Tom
> >
> non-NAPI will get_rps_cpu in irq, but why NAPI will get_rps_cpu in
> softirq?(if I understand correctly netif_receive_skb executed in
> softirq?)

Thats hard to understand what your problem or question is.

All heavy Receive networking stuff is handled in softirq.

NAPI allows to reduce number of hardware IRQS in stress/load situations,
fetching several frames at once.



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ