diff options
author | Tom Herbert <therbert@google.com> | 2011-08-14 15:46:12 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-08-17 23:06:03 -0400 |
commit | e971b7225bcb1f318811ef04628c441497372999 (patch) | |
tree | 0c860fe9fe988cc117a5275168833a585211be17 /net | |
parent | bdeab991918663aed38757904219e8398214334c (diff) |
rps: Infrastructure in __skb_get_rxhash for deep inspection
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/dev.c | 7 |
1 files changed, 7 insertions, 0 deletions
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 @@ | |||
133 | #include <linux/pci.h> | 133 | #include <linux/pci.h> |
134 | #include <linux/inetdevice.h> | 134 | #include <linux/inetdevice.h> |
135 | #include <linux/cpu_rmap.h> | 135 | #include <linux/cpu_rmap.h> |
136 | #include <linux/if_tunnel.h> | ||
136 | 137 | ||
137 | #include "net-sysfs.h" | 138 | #include "net-sysfs.h" |
138 | 139 | ||
@@ -2539,6 +2540,7 @@ void __skb_get_rxhash(struct sk_buff *skb) | |||
2539 | nhoff = skb_network_offset(skb); | 2540 | nhoff = skb_network_offset(skb); |
2540 | proto = skb->protocol; | 2541 | proto = skb->protocol; |
2541 | 2542 | ||
2543 | again: | ||
2542 | switch (proto) { | 2544 | switch (proto) { |
2543 | case __constant_htons(ETH_P_IP): | 2545 | case __constant_htons(ETH_P_IP): |
2544 | if (!pskb_may_pull(skb, sizeof(*ip) + nhoff)) | 2546 | if (!pskb_may_pull(skb, sizeof(*ip) + nhoff)) |
@@ -2567,6 +2569,11 @@ void __skb_get_rxhash(struct sk_buff *skb) | |||
2567 | goto done; | 2569 | goto done; |
2568 | } | 2570 | } |
2569 | 2571 | ||
2572 | switch (ip_proto) { | ||
2573 | default: | ||
2574 | break; | ||
2575 | } | ||
2576 | |||
2570 | ports.v32 = 0; | 2577 | ports.v32 = 0; |
2571 | poff = proto_ports_offset(ip_proto); | 2578 | poff = proto_ports_offset(ip_proto); |
2572 | if (poff >= 0) { | 2579 | if (poff >= 0) { |