From patchwork Tue Jan 28 13:59:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 232744 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A2CFC33CB3 for ; Tue, 28 Jan 2020 14:02:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 48256205F4 for ; Tue, 28 Jan 2020 14:02:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580220177; bh=eRPpBemmrylxoLQco6RIBVK3EcneMkMw+GNOefxkzqI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=UrQvQFoKRSiC5xbNVvIblDLWAy+BgJ5MvNXdNY3IPRkYBknDVfn5g9s++8wjvZHYM XRpLxI+hK5/mlyIfId7VSrKl3a3bGN8gxcjyDuFMHmki8jbHx99DzbvgIz44E04EvZ 2stVop6A593JK/AcuNf1D4++iGo47tgMsSK4Lz+U= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727746AbgA1OCz (ORCPT ); Tue, 28 Jan 2020 09:02:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:49320 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727745AbgA1OCw (ORCPT ); Tue, 28 Jan 2020 09:02:52 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2F6A1205F4; Tue, 28 Jan 2020 14:02:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580220171; bh=eRPpBemmrylxoLQco6RIBVK3EcneMkMw+GNOefxkzqI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lkajAEgWiVsf03PdZArrFfGCt3kuMjDLgGKWFr6olyyw+atISxwFaJj51vIxowzWv TJhqTAgsXES6Wd2L31ku4TxO6KbMTq+jKlT+kffycUPvnCVe/52l6xQPR5F4Vjrylq FJ8LnnwgVRlmfM/apH0WmMBmgl+BDY6f8vXrMEHQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yuki Taguchi , "David S. Miller" Subject: [PATCH 5.4 004/104] ipv6: sr: remove SKB_GSO_IPXIP6 on End.D* actions Date: Tue, 28 Jan 2020 14:59:25 +0100 Message-Id: <20200128135817.860523140@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135817.238524998@linuxfoundation.org> References: <20200128135817.238524998@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Yuki Taguchi [ Upstream commit 62ebaeaedee7591c257543d040677a60e35c7aec ] After LRO/GRO is applied, SRv6 encapsulated packets have SKB_GSO_IPXIP6 feature flag, and this flag must be removed right after decapulation procedure. Currently, SKB_GSO_IPXIP6 flag is not removed on End.D* actions, which creates inconsistent packet state, that is, a normal TCP/IP packets have the SKB_GSO_IPXIP6 flag. This behavior can cause unexpected fallback to GSO on routing to netdevices that do not support SKB_GSO_IPXIP6. For example, on inter-VRF forwarding, decapsulated packets separated into small packets by GSO because VRF devices do not support TSO for packets with SKB_GSO_IPXIP6 flag, and this degrades forwarding performance. This patch removes encapsulation related GSO flags from the skb right after the End.D* action is applied. Fixes: d7a669dd2f8b ("ipv6: sr: add helper functions for seg6local") Signed-off-by: Yuki Taguchi Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv6/seg6_local.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/net/ipv6/seg6_local.c +++ b/net/ipv6/seg6_local.c @@ -23,6 +23,7 @@ #include #include #include +#include #ifdef CONFIG_IPV6_SEG6_HMAC #include #endif @@ -135,7 +136,8 @@ static bool decap_and_validate(struct sk skb_reset_network_header(skb); skb_reset_transport_header(skb); - skb->encapsulation = 0; + if (iptunnel_pull_offloads(skb)) + return false; return true; }