From patchwork Sat Nov 29 17:59:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Herbert X-Patchwork-Id: 416004 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 836A014017B for ; Sun, 30 Nov 2014 05:03:23 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751532AbaK2SDS (ORCPT ); Sat, 29 Nov 2014 13:03:18 -0500 Received: from mail-ig0-f182.google.com ([209.85.213.182]:58562 "EHLO mail-ig0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751351AbaK2SDR (ORCPT ); Sat, 29 Nov 2014 13:03:17 -0500 Received: by mail-ig0-f182.google.com with SMTP id hn15so6971945igb.15 for ; Sat, 29 Nov 2014 10:03:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:subject:date:message-id; bh=vSPjXa4erODdo9S/goZS+prnHzZtgpwL/HMeB/wtZ08=; b=WCArX/XzYmaJcD7UiqdNMhab8dySlbY2McNSOBc9gfSHTzTErrarUxBSFZBnVmvAvp Us6pOG7aX/Na4o0mr7WiwYBckHiRwOIpMKudG8rSNWfFsCVFeMpqSdPEjd0RvVQD1cyS 0hlTRtvvBz72muGouHBLY/fINHPm3SMJisxM1sr3JCQIaZ+EY9YOXXW7iMc53xNhWlQn TnrojHjrBT6wkkwDkAEnU13P3Loc5eyIUanVk70I5Ciyxu+C+d8CEKa9Xbm+gX66zTxB 2yuoaYQDBz0QNg+o2LWidbxWL57SGOyU5/cXlQO+boM3bbn3lxD3wn/jx/SzGV3SiiyL 6wkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=vSPjXa4erODdo9S/goZS+prnHzZtgpwL/HMeB/wtZ08=; b=DBU62XSZuOvLTAc8MrIsxNRXFzSu3PffplSPUkra8k5udTqFM/ViQSdrK8jm8QJryA NJDs1YzblTahWNADkZveuRdfvmopA2s3m2tjqDZeGrG+t2WH4BITi+Eg0RegTw+Cd7ro L/BzLZ9au787JqW0AQweytn6l+rU8ezLQOCvy2qutC+vwTtDUYlVS/KBdWElqYsqJSTd Vvo5m8JJosEeePYrKQgx01LY8d7QtWCUs9X0M/wJIzU1s7KNur0YmdYXcOFMrf4SrEKG ce95TucX4c3dt0DerP8HqigfTTpnHyow13VKCPHC/uRv87shfSuobAJdWY+XM6Asl6JX d4OQ== X-Gm-Message-State: ALoCoQmcM+fMwxVAOM6EJjX3y/EhuhSMAIAHFFuJsVKIUcVpsoko/vKd/Kl38KTzxUTi26juorn6 X-Received: by 10.50.138.166 with SMTP id qr6mr38470768igb.17.1417284197042; Sat, 29 Nov 2014 10:03:17 -0800 (PST) Received: from tomh.mtv.corp.google.com ([172.18.117.126]) by mx.google.com with ESMTPSA id b123sm6771799iob.4.2014.11.29.10.03.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 29 Nov 2014 10:03:16 -0800 (PST) From: Tom Herbert To: davem@davemloft.net, linux@stwm.de, netdev@vger.kernel.org Subject: [PATCH net] gre: Set inner mac header in gro complete Date: Sat, 29 Nov 2014 09:59:45 -0800 Message-Id: <1417283985-22269-1-git-send-email-therbert@google.com> X-Mailer: git-send-email 2.2.0.rc0.207.ga3a616c Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Set the inner mac header to point to the GRE payload when doing GRO. This is needed if we proceed to send the packet through GRE GSO which now uses the inner mac header instead of inner network header to determine the length of encapsulation headers. Fixes: 14051f0452a2 ("gre: Use inner mac length when computing tunnel length") Reported-by: Wolfgang Walter Signed-off-by: Tom Herbert --- net/ipv4/gre_offload.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ipv4/gre_offload.c b/net/ipv4/gre_offload.c index bb5947b..51973dd 100644 --- a/net/ipv4/gre_offload.c +++ b/net/ipv4/gre_offload.c @@ -247,6 +247,9 @@ static int gre_gro_complete(struct sk_buff *skb, int nhoff) err = ptype->callbacks.gro_complete(skb, nhoff + grehlen); rcu_read_unlock(); + + skb_set_inner_mac_header(skb, nhoff + grehlen); + return err; }