Skip to content

Commit

Permalink
net: rps: support PPPOE session messages
Browse files Browse the repository at this point in the history
Inspect the payload of PPPOE session messages for the 4 tuples to generate
skb->rxhash.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Changli Gao authored and David S. Miller committed Aug 19, 2011
1 parent 1ff1986 commit ae1511b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
#include <linux/inetdevice.h>
#include <linux/cpu_rmap.h>
#include <linux/if_tunnel.h>
#include <linux/if_pppox.h>

#include "net-sysfs.h"

Expand Down Expand Up @@ -2573,6 +2574,13 @@ void __skb_get_rxhash(struct sk_buff *skb)
proto = vlan->h_vlan_encapsulated_proto;
nhoff += sizeof(*vlan);
goto again;
case __constant_htons(ETH_P_PPP_SES):
if (!pskb_may_pull(skb, PPPOE_SES_HLEN + nhoff))
goto done;
proto = *((__be16 *) (skb->data + nhoff +
sizeof(struct pppoe_hdr)));
nhoff += PPPOE_SES_HLEN;
goto again;
default:
goto done;
}
Expand Down

0 comments on commit ae1511b

Please sign in to comment.