diff options
-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 308a7d0c277f..e2e9e4af3ace 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) | |||
1735 | { | 1735 | { |
1736 | u32 hash; | 1736 | u32 hash; |
1737 | 1737 | ||
1738 | if (skb_rx_queue_recorded(skb)) { | 1738 | if (skb_rx_queue_recorded(skb)) |
1739 | hash = skb_get_rx_queue(skb); | 1739 | return skb_get_rx_queue(skb) % dev->real_num_tx_queues; |
1740 | } else if (skb->sk && skb->sk->sk_hash) { | 1740 | |
1741 | if (skb->sk && skb->sk->sk_hash) | ||
1741 | hash = skb->sk->sk_hash; | 1742 | hash = skb->sk->sk_hash; |
1742 | } else | 1743 | else |
1743 | hash = skb->protocol; | 1744 | hash = skb->protocol; |
1744 | 1745 | ||
1745 | hash = jhash_1word(hash, skb_tx_hashrnd); | 1746 | hash = jhash_1word(hash, skb_tx_hashrnd); |