提交 e971b722 编写于 作者: T Tom Herbert 提交者: David S. Miller

rps: Infrastructure in __skb_get_rxhash for deep inspection

Basics for looking for ports in encapsulated packets in tunnels.
Signed-off-by: NTom Herbert <therbert@google.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 bdeab991
...@@ -133,6 +133,7 @@ ...@@ -133,6 +133,7 @@
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/inetdevice.h> #include <linux/inetdevice.h>
#include <linux/cpu_rmap.h> #include <linux/cpu_rmap.h>
#include <linux/if_tunnel.h>
#include "net-sysfs.h" #include "net-sysfs.h"
...@@ -2539,6 +2540,7 @@ void __skb_get_rxhash(struct sk_buff *skb) ...@@ -2539,6 +2540,7 @@ void __skb_get_rxhash(struct sk_buff *skb)
nhoff = skb_network_offset(skb); nhoff = skb_network_offset(skb);
proto = skb->protocol; proto = skb->protocol;
again:
switch (proto) { switch (proto) {
case __constant_htons(ETH_P_IP): case __constant_htons(ETH_P_IP):
if (!pskb_may_pull(skb, sizeof(*ip) + nhoff)) if (!pskb_may_pull(skb, sizeof(*ip) + nhoff))
...@@ -2567,6 +2569,11 @@ void __skb_get_rxhash(struct sk_buff *skb) ...@@ -2567,6 +2569,11 @@ void __skb_get_rxhash(struct sk_buff *skb)
goto done; goto done;
} }
switch (ip_proto) {
default:
break;
}
ports.v32 = 0; ports.v32 = 0;
poff = proto_ports_offset(ip_proto); poff = proto_ports_offset(ip_proto);
if (poff >= 0) { if (poff >= 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册