projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5df0ddf
)
net: packet: use reciprocal_divide in fanout_demux_hash
author
Daniel Borkmann
<dborkman@redhat.com>
Wed, 28 Aug 2013 20:13:10 +0000
(22:13 +0200)
committer
David S. Miller
<davem@davemloft.net>
Thu, 29 Aug 2013 20:43:29 +0000
(16:43 -0400)
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>
net/packet/af_packet.c
patch
|
blob
|
blame
|
history
diff --git
a/net/packet/af_packet.c
b/net/packet/af_packet.c
index bee9bfdc8d056cd771b0b726eaa6e706df1f0d82..2e8286b47c28e5bef7cb80162e12ddb8ca4b358e 100644
(file)
--- 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,