Skip to content

Commit

Permalink
net: rps: reset network header before calling skb_get_rxhash()
Browse files Browse the repository at this point in the history
skb_get_rxhash() assumes the network header pointer of the skb is set
properly after the commit:

commit bfb564e
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Changli Gao authored and David S. Miller committed Aug 20, 2010
1 parent 91fe817 commit 2d47b45
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 2d47b45

Please sign in to comment.