netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/8] net: rps: skip fragment when computing rxhash
@ 2010-08-18  5:01 Changli Gao
  2010-08-18  6:25 ` Eric Dumazet
  0 siblings, 1 reply; 3+ messages in thread
From: Changli Gao @ 2010-08-18  5:01 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Changli Gao

Fragmented IP packets may have no transfer header, so when computing
rxhash, we should skip them.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
---
 net/core/dev.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 3f82781..b7c5309 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2284,7 +2284,10 @@ __u32 __skb_get_rxhash(struct sk_buff *skb)
 			goto done;
 
 		ip = (struct iphdr *) skb->data + nhoff;
-		ip_proto = ip->protocol;
+		if (ip->frag_off & htons(IP_MF|IP_OFFSET))
+			ip_proto = 0;
+		else
+			ip_proto = ip->protocol;
 		addr1 = (__force u32) ip->saddr;
 		addr2 = (__force u32) ip->daddr;
 		ihl = ip->ihl;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-20  0:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-18  5:01 [PATCH 2/8] net: rps: skip fragment when computing rxhash Changli Gao
2010-08-18  6:25 ` Eric Dumazet
2010-08-20  0:11   ` 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).