From patchwork Fri Aug 19 05:53:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Changli Gao X-Patchwork-Id: 110569 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 9F9E6B6F6F for ; Fri, 19 Aug 2011 15:54:53 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752021Ab1HSFys (ORCPT ); Fri, 19 Aug 2011 01:54:48 -0400 Received: from mail-pz0-f42.google.com ([209.85.210.42]:41120 "EHLO mail-pz0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751293Ab1HSFys (ORCPT ); Fri, 19 Aug 2011 01:54:48 -0400 Received: by pzk37 with SMTP id 37so4276408pzk.1 for ; Thu, 18 Aug 2011 22:54:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; bh=0MhAk18Tcu+QEewRSd0Vlx5+i6PfXZc2Yv5WzGshuRc=; b=CCgwWaEyD6RN/E+td/qkTDoIx9+LlvhUppycS71oeMDG6gQbqL5qo9aV/QwS2iborO LkesmgaXmtlKegIJxK9sviGtKn2iNRVL8iOtsXG1VvmPnMCoRgk6/Xr2dO95PZwOuCR+ JaoB+5S3j5F83DGoFBlIE4DnKdm6dd+lF+0t4= Received: by 10.142.200.13 with SMTP id x13mr218084wff.287.1313733287742; Thu, 18 Aug 2011 22:54:47 -0700 (PDT) Received: from localhost.localdomain ([221.239.34.230]) by mx.google.com with ESMTPS id jg5sm2062330pbc.8.2011.08.18.22.54.38 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 18 Aug 2011 22:54:46 -0700 (PDT) From: Changli Gao To: "David S. Miller" Cc: Eric Dumazet , Tom Herbert , netdev@vger.kernel.org, Changli Gao Subject: [PATCH] net: rps: support PPPOE session messages Date: Fri, 19 Aug 2011 13:53:55 +0800 Message-Id: <1313733235-32238-1-git-send-email-xiaosuo@gmail.com> X-Mailer: git-send-email 1.7.3.4 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Inspect the payload of PPPOE session messages for the 4 tuples to generate skb->rxhash. Signed-off-by: Changli Gao --- net/core/dev.c | 8 ++++++++ 1 file changed, 8 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/core/dev.c b/net/core/dev.c index be7ee50..c2442b4 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -134,6 +134,7 @@ #include #include #include +#include #include "net-sysfs.h" @@ -2573,6 +2574,13 @@ again: 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; }