From patchwork Mon Nov 24 18:16:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Herbert X-Patchwork-Id: 414054 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 D0CD21400D2 for ; Tue, 25 Nov 2014 05:16:32 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753833AbaKXSQ2 (ORCPT ); Mon, 24 Nov 2014 13:16:28 -0500 Received: from mail-ie0-f175.google.com ([209.85.223.175]:47755 "EHLO mail-ie0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753598AbaKXSQ1 (ORCPT ); Mon, 24 Nov 2014 13:16:27 -0500 Received: by mail-ie0-f175.google.com with SMTP id at20so9416728iec.20 for ; Mon, 24 Nov 2014 10:16:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=T7bKvDSYMb+VPNBJOww9OotXQ13+5tneyK+R3JciEto=; b=EJ8kCZ95PrUivPI167GfGQL8hTjftzmDjNetFXmSeldqnQp/gDTuA4ltZSsbMW3Pr1 3+QMt1uGO5wpUUYsb6H2fDxoOhxh+kJpv8SG55WUCevn7MFRPuv0I/t6mRWT7lSPZz68 3ibA9lm2JWefE9RUJWsxGoFIfV/+c55DTTCGYGsfvDpDnYosra8z+JVR5TcllKPiVbFe frecooR0rBHh+DOvqhMZeKUYuOFFdvpWDtWHOaRqsbXRKZVUh/ZmO4sNxnsiOUnj92s9 zubqDkU+A9GMsvZDrdBXC1AY6mg8WTMW5Y0wq0UQHr9SzqJKKH0PTSJ0lqAMbEi0lHFg f3pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=T7bKvDSYMb+VPNBJOww9OotXQ13+5tneyK+R3JciEto=; b=Gd/m6CcZUReSqMsVkJ4O6BZ9/SPX1oAUv7772AksGmHvVaZD9OL+nAl7gLumtx2IaN /Pvd7mlHOg8GnOx3Nd2xp4r/EQg/2R1UFfRcfVpojEMN5a3i4tmTKlogng34y4RJ8uLP oOVlvHMwpxFrYkJQ2VVwytgquZSW2MDLpxaLDwUCrCNZz0u5CAqW6op84esD9MlPSZVi k9mObmtggPOERX8SlX1ZYvQr5prN20VDWKvPg6msgyX/rhhTEOySC4MuR/h4qTzhLASn yRD6ZmwNXs+ZGKUXbVFhhPDAFXS4+D7xN/Z+qhbg+9UsMC+TEW72R2Gj+wwPOw/axNIG bm9w== X-Gm-Message-State: ALoCoQlEfB6eqdsV9eo+eQYm4P0oucU8WdaPRjWuE5FlMzeX42vCw3MJV6x1rvrnZbh/aVaPIB+j MIME-Version: 1.0 X-Received: by 10.50.141.136 with SMTP id ro8mr12959060igb.32.1416852986267; Mon, 24 Nov 2014 10:16:26 -0800 (PST) Received: by 10.64.149.5 with HTTP; Mon, 24 Nov 2014 10:16:26 -0800 (PST) In-Reply-To: <1416847696.17888.64.camel@edumazet-glaptop2.roam.corp.google.com> References: <2340533.MickblD7NF@h2o.as.studentenwerk.mhn.de> <1416847696.17888.64.camel@edumazet-glaptop2.roam.corp.google.com> Date: Mon, 24 Nov 2014 10:16:26 -0800 Message-ID: Subject: Re: GRE with GRO very slow when forwarding starting with 3.14.24 From: Tom Herbert To: Eric Dumazet Cc: Wolfgang Walter , Linux Netdev List , Alexander Duyck Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Nov 24, 2014 at 8:48 AM, Eric Dumazet wrote: > > On Mon, 2014-11-24 at 17:13 +0100, Wolfgang Walter wrote: > > Hello, > > > > starting with 3.14.24 GRE with GRO on is very slow. To be more specific: > > > > yyyy <--> GRO_endpoint <-_> .... <--> |eth0<->GRO-endpoint | eth1 |<-> xxxx > > > > routing (IPv4) between xxxx and yyyy is very slow when GRO is enabled on eth0 > > and/or eth1 starting with stable kernel 3.14.24 > > > > Regards, > > > tcpdump might help, but I presume GSO is no longer working properly on > egress. > Inner mac header is probably not being set in GRO->GSO GRE path. Please try this also: > Can you try to revert : > > commit abe640984aa492652232b65d3579361cf6d461f5 > Author: Tom Herbert > Date: Thu Oct 30 08:40:56 2014 -0700 > > gre: Use inner mac length when computing tunnel length > > [ Upstream commit 14051f0452a2c26a3f4791e6ad6a435e8f1945ff ] > > Currently, skb_inner_network_header is used but this does not account > for Ethernet header for ETH_P_TEB. Use skb_inner_mac_header which > handles TEB and also should work with IP encapsulation in which case > inner mac and inner network headers are the same. > > Tested: Ran TCP_STREAM over GRE, worked as expected. > > Signed-off-by: Tom Herbert > Acked-by: Alexander Duyck > Signed-off-by: David S. Miller > Signed-off-by: Greg Kroah-Hartman > > diff --git a/net/ipv4/gre_offload.c b/net/ipv4/gre_offload.c > index 2d24f293f977..8c8493ea6b1c 100644 > --- a/net/ipv4/gre_offload.c > +++ b/net/ipv4/gre_offload.c > @@ -50,7 +50,7 @@ static struct sk_buff *gre_gso_segment(struct sk_buff *skb, > > greh = (struct gre_base_hdr *)skb_transport_header(skb); > > - ghl = skb_inner_network_header(skb) - skb_transport_header(skb); > + ghl = skb_inner_mac_header(skb) - skb_transport_header(skb); > if (unlikely(ghl < sizeof(*greh))) > goto out; > > --- 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/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; }