aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhi Yong Wu <wuzhy@linux.vnet.ibm.com>2014-01-02 00:24:28 -0500
committerDavid S. Miller <davem@davemloft.net>2014-01-02 02:41:22 -0500
commitfbe4d4565badba393a94927e16ae66654a025dca (patch)
tree289cd898e894410cf76450986a4275957943bb58
parent56022a8fdd874c56bb61d8c82559e43044d1aa06 (diff)
tun, rfs: fix the incorrect hash value
The code incorrectly save the queue index as the hash, so this patch is fixing it with the hash received in the stack receive path. Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/tun.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 3cf0457f5c69..09f66624eaca 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -378,8 +378,8 @@ static u16 tun_select_queue(struct net_device *dev, struct sk_buff *skb)
378 if (txq) { 378 if (txq) {
379 e = tun_flow_find(&tun->flows[tun_hashfn(txq)], txq); 379 e = tun_flow_find(&tun->flows[tun_hashfn(txq)], txq);
380 if (e) { 380 if (e) {
381 txq = e->queue_index;
382 tun_flow_save_rps_rxhash(e, txq); 381 tun_flow_save_rps_rxhash(e, txq);
382 txq = e->queue_index;
383 } else 383 } else
384 /* use multiply and shift instead of expensive divide */ 384 /* use multiply and shift instead of expensive divide */
385 txq = ((u64)txq * numqueues) >> 32; 385 txq = ((u64)txq * numqueues) >> 32;