Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp177779rwi; Wed, 2 Nov 2022 10:36:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM75XwOjAibeufiRHsKzmjWXsLuHJ0aIyc0et3caWDUsCJ8qVOjzlHTJd0Wq95bU/e9f2vgP X-Received: by 2002:a05:6a00:32c9:b0:56b:a54e:68be with SMTP id cl9-20020a056a0032c900b0056ba54e68bemr26318813pfb.16.1667410578959; Wed, 02 Nov 2022 10:36:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667410578; cv=none; d=google.com; s=arc-20160816; b=XMU21mwJ48VXFN84Zp2+EP4/dgsO/fZxzarKMiRJl4vu4ekNGERJYx/ibtRtgQ3Gog rvkP7yJKkXvL0DX/bq7sLL6YkhE6HsV5apo3dUldTkWhwuAEn+0kQBbQyQllZlL/g4iy YrW5NXt+CvK0Xu78q2K5Sc92LVqjADNLyhL8xDfLn7FlGhrmuc9CJT4xI68JOw1jYute 62Kx+qUWI3X6DIXVN4nRHnFrX1GFTDwYrYmD6ChU8T1tJZOYdn6axVtQlHW2RN4Zj7dC veqjPXvUmqFaEMNeh5ycwAJDyqL+okLyaZQ1Cd0SRj4eCYo1Ym4nvOZF06iVKNtoZOrO 0n8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=STgAX5KnaEytv7+9IPe90yRFlFnZhTRxQJ1tKlplzNY=; b=IBoW3sWdZPcxGaj1KoDY8Hs5RvgNgpwohBx1bkwgJVW/N2NeIzzKH/84AL9eupBIJL 9YI8uguSZs4R6ggeXcuaxxncPguihsVrfGhdOkgxZwI4ffA2qPHT81YZRnOZQLzMvCJU FctxZS72Cl1Bkq41NjVZwS1VsmikkTeks9irL0THr6nKKEK5w2133ryTDu2mJv+ydk9u R0ss/cUx5Ja36wwgUPNupYsf7DGs2bHavQUmpIjWCTNjlaVm3AHrvQbprA3LWF8F9+OO j4FtrUQ+jzA1/Of88cBFcTHutzzaSMLeVTgTI7BiEHu91MDw5H7QvCOhaV0Jzqpt+wzq QVbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=QNm8eDzl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s8-20020a655848000000b00460358671e2si16652081pgr.547.2022.11.02.10.36.05; Wed, 02 Nov 2022 10:36:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=QNm8eDzl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231754AbiKBQs7 (ORCPT + 98 others); Wed, 2 Nov 2022 12:48:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231673AbiKBQs3 (ORCPT ); Wed, 2 Nov 2022 12:48:29 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED09495A7; Wed, 2 Nov 2022 09:46:02 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id q9so46963654ejd.0; Wed, 02 Nov 2022 09:46:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=STgAX5KnaEytv7+9IPe90yRFlFnZhTRxQJ1tKlplzNY=; b=QNm8eDzl4jNnafdm7MMx52kdHT8Ihe0nmOxlz9EcdsJAOgWQT5HQjtMJvJkLYTHTG2 baudCUAg1XMPRdytVbrV2tIQVAYn5YBK7R6V3ciZcGihilPgOy2L8G1zkIyvMKnsIPT7 /WJVR7wy3PB0edTUI8KzL690jZeYepx6Jpq8RMoq0//yxfsgo8bfWPOiHm1tpne0Spmc FzlHPSyUTRDlfPf27vxORLDaBk2nz5twOFiptmuJZmWOZNDX5eI7lJ4qKuqt6NMS4xwh 4WTjrKKlUm+8F4Hfywy62v3MH+m9ridWPuBlKj4hN1ktU8jyhz8QvMWh/73a+tkJBcmW Azxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=STgAX5KnaEytv7+9IPe90yRFlFnZhTRxQJ1tKlplzNY=; b=jaKX97xh5ycVc+8XUvgV8OqnyvU+KeartYDpJZh0gGgHXd539ffPuZPs6DJWS2/p0U 3ImPpMCRFuxXyq/Mhbn5kiSYrsKir25Kx/3fVtaFNUlQs+aqRcMznA4FA6dyc7rF4d2f P+Mrl72osQDTK5+ZDxwZkqa0q2uTma0TOl6MkWQV77ye37BQ/mrJW6T6+Wh+MG1toUOb MKeH2TEJ1jXxP+KuU6nWsqcp3fzSKe66CPV+FSq6d0RdNIYh2bo5SuFozs0Tyd0hA/A/ 18toGcwDTOKqm8J1HLpaVPhRN4X7d4NGFyMscbnr6POjkN9W7XOTPvwwBA62wmYjA4gZ FrXA== X-Gm-Message-State: ACrzQf0lKdVzDcgqPajdTLgaCE1O7c1zXLbBm99ddK3piQwNl6WMWl/q dH7B8Ti4oG656co/fjXMeQge9ibhquEgF+u247i0bV4ddn8= X-Received: by 2002:a17:906:6791:b0:78d:4051:fcf0 with SMTP id q17-20020a170906679100b0078d4051fcf0mr24494728ejp.591.1667407561357; Wed, 02 Nov 2022 09:46:01 -0700 (PDT) MIME-Version: 1.0 References: <20221024051744.GA48642@debian> <20221101085153.12ccae1c@kernel.org> In-Reply-To: <20221101085153.12ccae1c@kernel.org> From: Richard Gobert Date: Wed, 2 Nov 2022 17:45:27 +0100 Message-ID: Subject: Re: [PATCH net-next] gro: avoid checking for a failed search To: Jakub Kicinski Cc: davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, lixiaoyan@google.com, alexanderduyck@fb.com, steffen.klassert@secunet.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Why does it matter? You see a measurable perf win? In the common case, we will exit the loop with a break, so this patch eliminates an unnecessary check. On some architectures this optimization might be done automatically by the compiler, but I think it will be better to make it explicit here. Although on x86 this optimization happens automatically, I noticed that on my build target (ARM/GCC) this does change the binary.