From patchwork Thu Jul 2 21:04:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Herbert X-Patchwork-Id: 490805 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 9119B1402AA for ; Fri, 3 Jul 2015 07:05:00 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753357AbbGBVE4 (ORCPT ); Thu, 2 Jul 2015 17:04:56 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:57815 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753455AbbGBVEw (ORCPT ); Thu, 2 Jul 2015 17:04:52 -0400 Received: from pps.filterd (m0004348 [127.0.0.1]) by m0004348.ppops.net (8.14.5/8.14.5) with SMTP id t62L4SSY006952 for ; Thu, 2 Jul 2015 14:04:51 -0700 Received: from mail.thefacebook.com ([199.201.64.23]) by m0004348.ppops.net with ESMTP id 1vd9tb0bgv-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Thu, 02 Jul 2015 14:04:51 -0700 Received: from mx-out.facebook.com (192.168.52.123) by PRN-CHUB05.TheFacebook.com (192.168.16.15) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 2 Jul 2015 14:04:50 -0700 Received: from facebook.com (2401:db00:20:702e:face:0:23:0) by mx-out.facebook.com (10.102.107.97) with ESMTP id fa9f7b6220fd11e58bf40002c99331b0-9e8da2b0 for ; Thu, 02 Jul 2015 14:04:50 -0700 Received: by devrs030.prn2.facebook.com (Postfix, from userid 12345) id C7ED3B402A8; Thu, 2 Jul 2015 14:04:50 -0700 (PDT) From: Tom Herbert To: , Subject: [PATCH net-next 1/3] gro: Pull headers into skb head for 1st skb in gro list Date: Thu, 2 Jul 2015 14:04:12 -0700 Message-ID: <1435871054-635096-2-git-send-email-tom@herbertland.com> X-Mailer: git-send-email 1.8.1 In-Reply-To: <1435871054-635096-1-git-send-email-tom@herbertland.com> References: <1435871054-635096-1-git-send-email-tom@herbertland.com> X-FB-Internal: Safe MIME-Version: 1.0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.14.151, 1.0.33, 0.0.0000 definitions=2015-07-02_14:2015-07-02, 2015-07-02, 1970-01-01 signatures=0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org When setting up the first skb in a gro list we ensure that all the headers up to skb_gro_offset have been pulled into head. In subsequent uses of this skb (e.g. determining same_flow) it is assumed that the headers can be accessed in the skb head. Signed-off-by: Tom Herbert --- net/core/dev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/core/dev.c b/net/core/dev.c index 6778a99..05e0e37 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4228,6 +4228,10 @@ static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff } else { napi->gro_count++; } + + /* Ensure all headers are pulled into head for 1st skb */ + skb_gro_header_slow(skb, skb_gro_offset(skb), 0); + NAPI_GRO_CB(skb)->count = 1; NAPI_GRO_CB(skb)->age = jiffies; NAPI_GRO_CB(skb)->last = skb;