From mboxrd@z Thu Jan 1 00:00:00 1970 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 CF554C433E0 for ; Fri, 12 Mar 2021 16:22:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9E5CF64EC0 for ; Fri, 12 Mar 2021 16:22:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229728AbhCLQWT (ORCPT ); Fri, 12 Mar 2021 11:22:19 -0500 Received: from mail-40133.protonmail.ch ([185.70.40.133]:58374 "EHLO mail-40133.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231894AbhCLQWB (ORCPT ); Fri, 12 Mar 2021 11:22:01 -0500 Date: Fri, 12 Mar 2021 16:21:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1615566120; bh=EPyxtkpOV0rtQrrZHCg1xpqZt46LZWrmCOQTPzRuzYA=; h=Date:To:From:Cc:Reply-To:Subject:From; b=EKHGhAMkK4ER+10mdzNmG6VdJIIEzgJEKBv6kMYaC6tcb0/6RjLBl1IcRC1y0OZRr un88+YNB3sIM7aoVUJ1w3i3Y7VK8vMhpFfPpT7U89H7gnjxTUXiuJdGhQhpAZ00NlY eD+rLcQ3KA9XPa3O443qF+ocURhPhhJAFvr19BAB1M2C6vxXN11D5n8KrRAfzH7gxZ 0plt2RWiKDyOGVZyJapPNOGd6V/o4UpWTp+RIw3FkXtPTS8NlDkPMrI98jAdSt1+uX y1EvbNpSVI62awMGnNWOM9vOh1mTVvec9/eVaO75eHukN6AMoVooo2f3xxSjy72DXo M/4SLt0KAn6Yg== To: "David S. Miller" , Jakub Kicinski From: Alexander Lobakin Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Alexander Lobakin , Eric Dumazet , Wei Wang , Cong Wang , Taehee Yoo , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Reply-To: Alexander Lobakin Subject: [PATCH net-next 0/4] gro: micro-optimize dev_gro_receive() Message-ID: <20210312162127.239795-1-alobakin@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This random series addresses some of suboptimal paths used in the main GRO entry point. The main body is patches 3-4 which simplify the code and improve flow distribution. Two others are mostly cosmetic to make code more readable. The benetifs are not so huge and mostly depend on NIC RSS hash function and a number of Rx flows per single NAPI instance. I got something like +10-15 Mbps on 4-8 flows NATing. Alexander Lobakin (4): gro: give 'hash' variable in dev_gro_receive() a less confusing name gro: don't dereference napi->gro_hash[x] multiple times in dev_gro_receive() gro: simplify gro_list_prepare() gro: improve flow distribution across GRO buckets in dev_gro_receive() net/core/dev.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) -- 2.30.2