From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: victor@inliniac.net, netdev@vger.kernel.org
Subject: Re: [PATCH 2/2] packet: Add fanout support.
Date: Tue, 05 Jul 2011 08:21:15 +0200 [thread overview]
Message-ID: <1309846875.2720.43.camel@edumazet-laptop> (raw)
In-Reply-To: <20110704.212014.236340473910292460.davem@davemloft.net>
Le lundi 04 juillet 2011 à 21:20 -0700, David Miller a écrit :
> Fanouts allow packet capturing to be demuxed to a set of AF_PACKET
> sockets. Two fanout policies are implemented:
>
> 1) Hashing based upon skb->rxhash
...
> +
> +static struct sock *fanout_demux_hash(struct packet_fanout *f, struct sk_buff *skb)
> +{
> + u32 idx, hash = skb->rxhash;
> +
> + idx = ((u64)hash * f->num_members) >> 32;
> +
> + return f->arr[idx];
> +}
> +
rxhash is 0 unless skb_get_rxhash() was called, or some NIC set it in RX
path.
next prev parent reply other threads:[~2011-07-05 6:21 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-05 4:20 [PATCH 2/2] packet: Add fanout support David Miller
2011-07-05 4:33 ` Eric Dumazet
2011-07-05 4:36 ` David Miller
2011-07-05 6:21 ` Eric Dumazet [this message]
2011-07-05 6:56 ` Victor Julien
2011-07-05 7:00 ` Eric Dumazet
2011-07-05 7:06 ` Victor Julien
2011-07-05 7:50 ` David Miller
2011-07-05 7:52 ` Victor Julien
2011-07-05 8:02 ` David Miller
2011-07-05 8:47 ` Hagen Paul Pfeifer
2011-07-05 8:48 ` Victor Julien
2011-07-05 9:01 ` David Miller
2011-07-05 16:03 ` Loke, Chetan
2011-07-05 16:08 ` David Miller
2011-07-05 16:16 ` Eric Dumazet
2011-07-05 16:21 ` Victor Julien
2011-07-05 16:23 ` Eric Dumazet
2011-07-05 17:15 ` Victor Julien
2011-07-05 18:26 ` Eric Dumazet
2011-07-05 18:34 ` Victor Julien
2011-07-05 17:35 ` Loke, Chetan
2011-07-05 18:20 ` Eric Dumazet
2011-07-05 21:10 ` Loke, Chetan
2011-07-05 7:48 ` David Miller
2011-07-05 7:46 ` David Miller
2011-07-05 9:50 ` Eric Dumazet
2011-07-05 10:07 ` 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=1309846875.2720.43.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=victor@inliniac.net \
/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