From: Tom Herbert Date: Sun, 14 Aug 2011 19:46:12 +0000 (+0000) Subject: rps: Infrastructure in __skb_get_rxhash for deep inspection X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=e971b7225bcb1f318811ef04628c441497372999;p=openwrt%2Fstaging%2Fblogic.git rps: Infrastructure in __skb_get_rxhash for deep inspection Basics for looking for ports in encapsulated packets in tunnels. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller --- diff --git a/net/core/dev.c b/net/core/dev.c index e485cb37228f..4bee9a9aeef6 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -133,6 +133,7 @@ #include #include #include +#include #include "net-sysfs.h" @@ -2539,6 +2540,7 @@ void __skb_get_rxhash(struct sk_buff *skb) nhoff = skb_network_offset(skb); proto = skb->protocol; +again: switch (proto) { case __constant_htons(ETH_P_IP): if (!pskb_may_pull(skb, sizeof(*ip) + nhoff)) @@ -2567,6 +2569,11 @@ void __skb_get_rxhash(struct sk_buff *skb) goto done; } + switch (ip_proto) { + default: + break; + } + ports.v32 = 0; poff = proto_ports_offset(ip_proto); if (poff >= 0) {