* [net-next bugfix] tun, rfs: fix the incorrect hash value
@ 2014-01-02 5:24 Zhi Yong Wu
2014-01-02 5:41 ` Jason Wang
2014-01-02 7:41 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Zhi Yong Wu @ 2014-01-02 5:24 UTC (permalink / raw)
To: netdev; +Cc: jasowang, therbert, Zhi Yong Wu
From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
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>
---
drivers/net/tun.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 3cf0457..09f6662 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)
if (txq) {
e = tun_flow_find(&tun->flows[tun_hashfn(txq)], txq);
if (e) {
- txq = e->queue_index;
tun_flow_save_rps_rxhash(e, txq);
+ txq = e->queue_index;
} else
/* use multiply and shift instead of expensive divide */
txq = ((u64)txq * numqueues) >> 32;
--
1.7.6.5
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [net-next bugfix] tun, rfs: fix the incorrect hash value
2014-01-02 5:24 [net-next bugfix] tun, rfs: fix the incorrect hash value Zhi Yong Wu
@ 2014-01-02 5:41 ` Jason Wang
2014-01-02 7:41 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Jason Wang @ 2014-01-02 5:41 UTC (permalink / raw)
To: Zhi Yong Wu, netdev; +Cc: therbert, Zhi Yong Wu
On 01/02/2014 01:24 PM, Zhi Yong Wu wrote:
> From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
>
> 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>
> ---
> drivers/net/tun.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/tun.c b/drivers/net/tun.c
> index 3cf0457..09f6662 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)
> if (txq) {
> e = tun_flow_find(&tun->flows[tun_hashfn(txq)], txq);
> if (e) {
> - txq = e->queue_index;
> tun_flow_save_rps_rxhash(e, txq);
> + txq = e->queue_index;
> } else
> /* use multiply and shift instead of expensive divide */
> txq = ((u64)txq * numqueues) >> 32;
Acked-by: Jason Wang <jasowang@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [net-next bugfix] tun, rfs: fix the incorrect hash value
2014-01-02 5:24 [net-next bugfix] tun, rfs: fix the incorrect hash value Zhi Yong Wu
2014-01-02 5:41 ` Jason Wang
@ 2014-01-02 7:41 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-01-02 7:41 UTC (permalink / raw)
To: zwu.kernel; +Cc: netdev, jasowang, therbert, wuzhy
From: Zhi Yong Wu <zwu.kernel@gmail.com>
Date: Thu, 2 Jan 2014 13:24:28 +0800
> From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
>
> 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-02 7:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-02 5:24 [net-next bugfix] tun, rfs: fix the incorrect hash value Zhi Yong Wu
2014-01-02 5:41 ` Jason Wang
2014-01-02 7:41 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).