From patchwork Thu Mar 18 18:42:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Lobakin X-Patchwork-Id: 12149027 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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 105D6C433DB for ; Thu, 18 Mar 2021 18:43:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D5BB964F38 for ; Thu, 18 Mar 2021 18:43:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232643AbhCRSmm (ORCPT ); Thu, 18 Mar 2021 14:42:42 -0400 Received: from mail2.protonmail.ch ([185.70.40.22]:58342 "EHLO mail2.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232523AbhCRSm0 (ORCPT ); Thu, 18 Mar 2021 14:42:26 -0400 Date: Thu, 18 Mar 2021 18:42:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1616092944; bh=RWcHWkX72BpuDYzZ08uRHn5rh75TT354Si0UcCXl5bM=; h=Date:To:From:Cc:Reply-To:Subject:From; b=JGb9Dek/wtBRJlXX2AKbbZ9HObgopvd0FQC6vRYmU4zTAPGEnnyqBYbcfr/YjYt9A tQg6cnSsuUBiF/Elxk0hA4LQVOsAwdGaI7tIFrcEoVPbqddEY4YizR49U0FphPscfr kzz1cWmTMKejqWI3h6tfwpvUb2V/C1rd6SBAgRVrkLFeiuGBICvzc3ULtMIPDYB/Hk vM37tvnXWXHa5s4tsf0taIS7wQ5oKdBIt5eS+jyPVp3xmB8TpgylORNXwbYaSaxOZ1 CkCQ+QUxJSaW6jhsmpGvS15J/HdmZNt2sHgSZLvo24/0mXfQM9Iv5sX/72Nf3nd+Cz nuByuUulN8cRg== To: "David S. Miller" , Jakub Kicinski From: Alexander Lobakin Cc: Alexander Lobakin , Mauro Carvalho Chehab , Kirill Tkhai , Bartosz Golaszewski , Leon Romanovsky , Eric Dumazet , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Reply-To: Alexander Lobakin Subject: [PATCH net-next 0/4] net: avoid retpoline overhead on VLAN and TEB GRO Message-ID: <20210318184157.700604-1-alobakin@pm.me> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org dev_gro_receive() uses indirect calls for IP GRO functions, but it works only for the outermost headers and untagged frames. Simple VLAN tag before an IP header restores the performance hit. This simple series straightens the GRO calls for IP headers going after VLAN tag or inner Ethernet header (GENEVE, NvGRE, VxLAN) for retpolined kernels. Alexander Lobakin (4): gro: make net/gro.h self-contained gro: add combined call_gro_receive() + INDIRECT_CALL_INET() helper vlan/8021q: avoid retpoline overhead on GRO ethernet: avoid retpoline overhead on TEB (GENEVE, NvGRE, VxLAN) GRO include/net/gro.h | 13 +++++++++++++ net/8021q/vlan_core.c | 10 ++++++++-- net/ethernet/eth.c | 11 ++++++++--- 3 files changed, 29 insertions(+), 5 deletions(-) --- 2.31.0