From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: therbert@google.com, victor@inliniac.net, netdev@vger.kernel.org,
willemb@google.com
Subject: Re: [PATCH 0/2] AF_PACKET fanout support
Date: Wed, 06 Jul 2011 06:07:46 +0200 [thread overview]
Message-ID: <1309925266.2545.48.camel@edumazet-laptop> (raw)
In-Reply-To: <20110705.201950.199250194399828543.davem@davemloft.net>
Le mardi 05 juillet 2011 à 20:19 -0700, David Miller a écrit :
> From: Tom Herbert <therbert@google.com>
> Date: Tue, 5 Jul 2011 20:13:27 -0700
>
> >>> Also, another useful mode of steering would be to steer packets to a
> >>> socket which was recently processed by a thread running on the same
> >>> CPU; somewhat analogous to RFS (cc'ed WIllem Bruijn who is already
> >>> working on this I believe).
> >>
> >> This sounds like a good way to overload a local socket and prevent
> >> pushing the work to lesser used sockets on other cpus.
> >>
> > Sure, it you're not using RPS or RSS! These should already be
> > distributing the RX work amongst CPUs.
>
> One idea I did have while working on the PACKET_FANOUT bits was
> to allow a packet socket to be bound to a particular cpu. And
> to implement this we'd have a per-cpu list of packet_type taps.
>
> But in order for the user to make sure he gets all the traffic,
> he'd have to make sure he bound one AF_PACKET socket to every
> online cpu and then listened for all cpu hotplug events.
>
> It doesn't really work.
It is working right now if you dont have too many cpus, adding as many
sockets as possible cpus, and convenient BPF filter (matching CPU X) per
packet socket. Of course, if a cpu is offlined, the corresponding socket
wont receive any packet.
Currently, with a multiqueue NIC, the two policies you have might be in
conflict with NIC flow distribution among its queues.
In the end, lot of different cpus will access all the sockets.
I suspect this can be solved adding a third policy : hash by CPU only
next prev parent reply other threads:[~2011-07-06 4:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-05 4:20 [PATCH 0/2] AF_PACKET fanout support David Miller
2011-07-06 0:46 ` Tom Herbert
2011-07-06 1:20 ` David Miller
2011-07-06 3:13 ` Tom Herbert
2011-07-06 3:19 ` David Miller
2011-07-06 4:07 ` Eric Dumazet [this message]
2011-07-06 6:44 ` David Miller
2011-07-06 6:55 ` David Miller
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=1309925266.2545.48.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=therbert@google.com \
--cc=victor@inliniac.net \
--cc=willemb@google.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