提交 e1733de2 编写于 作者: M Michael Dalton 提交者: David S. Miller

flow_dissector: support L2 GRE

Add support for L2 GRE tunnels, so that RPS can be more effective.
Signed-off-by: NMichael Dalton <mwdalton@google.com>
Signed-off-by: NEric Dumazet <edumazet@google.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f4f3efda
......@@ -119,6 +119,17 @@ bool skb_flow_dissect(const struct sk_buff *skb, struct flow_keys *flow)
nhoff += 4;
if (hdr->flags & GRE_SEQ)
nhoff += 4;
if (proto == htons(ETH_P_TEB)) {
const struct ethhdr *eth;
struct ethhdr _eth;
eth = skb_header_pointer(skb, nhoff,
sizeof(_eth), &_eth);
if (!eth)
return false;
proto = eth->h_proto;
nhoff += sizeof(*eth);
}
goto again;
}
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册