Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp795975pxf; Thu, 18 Mar 2021 11:43:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8s+OLB/EOleD4+Uvv3AE3AxVFhKo13A9oKUyvB8IqFf10pJro4jaLpKZusvCOY5N2KS8M X-Received: by 2002:a17:906:bcfc:: with SMTP id op28mr41971564ejb.238.1616093039439; Thu, 18 Mar 2021 11:43:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616093039; cv=none; d=google.com; s=arc-20160816; b=VUynzvTY2dx2B0LnGOwojfFpjGLRa3u7GzzQ8VpY1Y1EpKAQAVFhHaihWaiNIi2Y+s Hn3lpVd/3b4nZmVZcSyOP5YJeyf1XmKC5dmgI9qym+GN0sxSZ0k6ilxR+bFiuiruliWy ros37KWtXP9owJ6QFsFpHSEYz2BGMZcYABcDwZa/ftHSYLFT9DWKK5I+zmdqeHlBRFwj q8AFfene7c6YDmmEOQc6McWBBBT3Dzg23Kn12OC9surBuO4fSm80ZmR4YF7vsQDXxfsv RqmFlIwOevrhDDvnKFJ01hOXKnxiN+7V9iUYdgOsWCp3CiMHEBMF5Jul3kq7cXyxQ3P1 Q4SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:subject:reply-to:cc:from:to:dkim-signature:date; bh=RWcHWkX72BpuDYzZ08uRHn5rh75TT354Si0UcCXl5bM=; b=xlryqCdA3zEDgN56eXlmGlM7WLAU9CFixJxd16wy0s1sj4haloe/lXF/j7uaKBXhtg bfy2Lppc3IJRQjq0Gb5oHmcwNqOMYInOq67d63prBSVzsmOPlsdi1fT5eEEtZ6gfF7x0 PCZcIj9SjNsdLjL3M/Q+1JFVE76MZ0h/pJc/1LcQiPa7tpK2xayBN4JMSGwaGXkscHA9 tcIfepUywNqnoLWzTkRa/Wcazaqp1XLpy6nJ6G1cKKct8T7hI7AFPbn0cGwJmtW9AvSd MWCkVv9Tvq+FnYJu9lGMz3ym4L2JN7/QuFa9RJMf6Kh9tC+XrpLn3aC1FW3iEkO0AO5P r+fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b="JGb9Dek/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h28si2214837edj.546.2021.03.18.11.43.37; Thu, 18 Mar 2021 11:43:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b="JGb9Dek/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232674AbhCRSml (ORCPT + 99 others); Thu, 18 Mar 2021 14:42:41 -0400 Received: from mail1.protonmail.ch ([185.70.40.18]:47957 "EHLO mail1.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232494AbhCRSm0 (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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.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