diff options
author | David S. Miller <davem@davemloft.net> | 2009-05-04 01:07:43 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-04 01:07:43 +0400 |
commit | d252a5e7b73026b3ba3c49940724292099e634f0 (patch) | |
tree | c151797f0daecf457ef7a4bad027ecfdd8d79ad6 /net/core/dev.c | |
parent | f0a3a1538d57dfb51c73d012cbb72f985cd419aa (diff) | |
parent | 1824a9897473fda5e5e42f991ddc674c175e3a09 (diff) | |
download | linux-d252a5e7b73026b3ba3c49940724292099e634f0.tar.xz |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 6785b067ad50..81442957c5c2 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1735,11 +1735,12 @@ u16 skb_tx_hash(const struct net_device *dev, const struct sk_buff *skb) { u32 hash; - if (skb_rx_queue_recorded(skb)) { - hash = skb_get_rx_queue(skb); - } else if (skb->sk && skb->sk->sk_hash) { + if (skb_rx_queue_recorded(skb)) + return skb_get_rx_queue(skb) % dev->real_num_tx_queues; + + if (skb->sk && skb->sk->sk_hash) hash = skb->sk->sk_hash; - } else + else hash = skb->protocol; hash = jhash_1word(hash, skb_tx_hashrnd); |