[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1309846875.2720.43.camel@edumazet-laptop>
Date: Tue, 05 Jul 2011 08:21:15 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Miller <davem@...emloft.net>
Cc: victor@...iniac.net, netdev@...r.kernel.org
Subject: Re: [PATCH 2/2] packet: Add fanout support.
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.
--
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