From e1733de2243609073534cf56afb146a62af3c3d8 Mon Sep 17 00:00:00 2001 From: Michael Dalton Date: Mon, 11 Mar 2013 06:52:28 +0000 Subject: [PATCH] flow_dissector: support L2 GRE Add support for L2 GRE tunnels, so that RPS can be more effective. Signed-off-by: Michael Dalton Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- net/core/flow_dissector.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c index 9d4c7201400d..f8d9e03b7a7c 100644 --- a/net/core/flow_dissector.c +++ b/net/core/flow_dissector.c @@ -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; -- GitLab