Patchwork [1/8] : net: rps: reset network header before calling skb_get_rxhash()

login
register
mail settings
Submitter Changli Gao
Date Aug. 18, 2010, 5 a.m.
Message ID <1282107656-3386-1-git-send-email-xiaosuo@gmail.com>
Download mbox | patch
Permalink /patch/61989/
State Accepted
Delegated to: David Miller
Headers show

Comments

Changli Gao - Aug. 18, 2010, 5 a.m.
skb_get_rxhash() assumes the network header pointer of the skb is set
properly after the commit: 

commit bfb564e7391340638afe4ad67744a8f3858e7566
Author: Krishna Kumar <krkumar2@in.ibm.com>
Date:   Wed Aug 4 06:15:52 2010 +0000

    core: Factor out flow calculation from get_rps_cpu

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
---
 net/core/dev.c |    1 +
 1 file changed, 1 insertion(+)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Aug. 20, 2010, 12:08 a.m.
From: Changli Gao <xiaosuo@gmail.com>
Date: Wed, 18 Aug 2010 13:00:56 +0800

> skb_get_rxhash() assumes the network header pointer of the skb is set
> properly after the commit: 
> 
> commit bfb564e7391340638afe4ad67744a8f3858e7566
> Author: Krishna Kumar <krkumar2@in.ibm.com>
> Date:   Wed Aug 4 06:15:52 2010 +0000
> 
>     core: Factor out flow calculation from get_rps_cpu
> 
> Signed-off-by: Changli Gao <xiaosuo@gmail.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/core/dev.c b/net/core/dev.c
index 586a11c..382a6d0 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2372,6 +2372,7 @@  static int get_rps_cpu(struct net_device *dev, struct sk_buff *skb,
 	if (!rxqueue->rps_map && !rxqueue->rps_flow_table)
 		goto done;
 
+	skb_reset_network_header(skb);
 	if (!skb_get_rxhash(skb))
 		goto done;