diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2013-08-28 22:13:10 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-29 16:43:29 -0400 |
commit | f55d112e529386af3667fac3a507132a361b2154 (patch) | |
tree | e4bb91c918f6ad6028e651d3c3287cd728cd3e60 /net | |
parent | 5df0ddfbc9209ffafc82236509ba0e975120e3c3 (diff) | |
download | op-kernel-dev-f55d112e529386af3667fac3a507132a361b2154.zip op-kernel-dev-f55d112e529386af3667fac3a507132a361b2154.tar.gz |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/packet/af_packet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index bee9bfd..2e8286b 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -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, |