From: Daniel Borkmann Date: Wed, 28 Aug 2013 20:13:10 +0000 (+0200) Subject: net: packet: use reciprocal_divide in fanout_demux_hash X-Git-Tag: MMI-PSA29.97-13-9~13727^2~148 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f55d112e529386af3667fac3a507132a361b2154;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Signed-off-by: David S. Miller --- diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index bee9bfdc8d05..2e8286b47c28 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,