Skip to content

Commit

Permalink
flow_dissector: support L2 GRE
Browse files Browse the repository at this point in the history
Add support for L2 GRE tunnels, so that RPS can be more effective.

Signed-off-by: Michael Dalton <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Michael Dalton authored and davem330 committed Mar 12, 2013
1 parent f4f3efd commit e1733de
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions net/core/flow_dissector.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e1733de

Please sign in to comment.