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:
parent
5df0ddfbc9
commit
f55d112e52
1 changed files with 1 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue