rps: Infrastructure in __skb_get_rxhash for deep inspection
authorTom Herbert <therbert@google.com>
Sun, 14 Aug 2011 19:46:12 +0000 (19:46 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Aug 2011 03:06:03 +0000 (20:06 -0700)
Basics for looking for ports in encapsulated packets in tunnels.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c

index e485cb37228f8b837d988dd79cb19bc382680aa0..4bee9a9aeef639bcad82923f5e08806935595e76 100644 (file)
 #include <linux/pci.h>
 #include <linux/inetdevice.h>
 #include <linux/cpu_rmap.h>
+#include <linux/if_tunnel.h>
 
 #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) {