flow_dissector: support L2 GRE
authorMichael Dalton <mwdalton@google.com>
Mon, 11 Mar 2013 06:52:28 +0000 (06:52 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Mar 2013 09:14:06 +0000 (05:14 -0400)
Add support for L2 GRE tunnels, so that RPS can be more effective.

Signed-off-by: Michael Dalton <mwdalton@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/flow_dissector.c

index 9d4c7201400d154ab2fd00ccfab4f22f8bddb5ff..f8d9e03b7a7cff5add72728b98321cbd428479a2 100644 (file)
@@ -119,6 +119,17 @@ ipv6:
                                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;