net: packet: use reciprocal_divide in fanout_demux_hash

Instead of hard-coding reciprocal_divide function, use the inline
function from reciprocal_div.h.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Daniel Borkmann 2013-08-28 22:13:10 +02:00 committed by David S. Miller
parent 5df0ddfbc9
commit f55d112e52
1 changed files with 1 additions and 1 deletions

View File

@ -1135,7 +1135,7 @@ static unsigned int fanout_demux_hash(struct packet_fanout *f,
struct sk_buff *skb,
unsigned int num)
{
return (((u64)skb->rxhash) * num) >> 32;
return reciprocal_divide(skb->rxhash, num);
}
static unsigned int fanout_demux_lb(struct packet_fanout *f,