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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE448C4332F for ; Wed, 16 Nov 2022 22:15:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234443AbiKPWPZ (ORCPT ); Wed, 16 Nov 2022 17:15:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231448AbiKPWPY (ORCPT ); Wed, 16 Nov 2022 17:15:24 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CE28F5E; Wed, 16 Nov 2022 14:15:23 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EE23FB81D80; Wed, 16 Nov 2022 22:15:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B267C433C1; Wed, 16 Nov 2022 22:15:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668636920; bh=q8X165r74UwwSmeNoNKF3zS++peos+gHYcaI3lOLpmk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=WyLizanc7pR4cofvRgrdnnRL78SV4Ne05ZVfBAORjehHjCUM7kFgV0m8sTiww07pU HaE5rkcWuEqfcYK1OSwnR1RlCuN4NyCcFU3jjatTWKNV6aqklGPLq9fCwGqC8AwCg0 MItS9yoBg4dMc5gSnDKpDAKlWz4gSOCVNeeYx+aWemsqquMpNk1ZVmMy3Dn6PNTbiy s+x50KbZQP56P6D7yFLQi5+IiMsIhuIhxAWZTFW+F/XQ52S7gYoDY1uh0UM7+5tOD/ ohbKmzcF57nIW1ZkTYhquHt2WrlfEhLU02Dj39HnQhkmef6a71Ok8tvwV5FbaiUARq brSYfbn3UuFgQ== Date: Wed, 16 Nov 2022 14:15:19 -0800 From: Jakub Kicinski To: Jamie Bainbridge Cc: Geert Uytterhoeven , Eric Dumazet , "David S . Miller" , Hideaki YOSHIFUJI , David Ahern , Paolo Abeni , Chris Down , Stephen Hemminger , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] tcp: Fix tcp_syn_flood_action() if CONFIG_IPV6=n Message-ID: <20221116141519.0ef42fa2@kernel.org> In-Reply-To: References: <20221116123115.6b49e1b8@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, 17 Nov 2022 08:39:43 +1100 Jamie Bainbridge wrote: > > if (v6) { > > #ifdef v6 > > expensive_call6(); > > #endif > > } else { > > expensive_call6(); > > } > > These should work, but I expect they cause a comparison which can't be > optimised out at compile time. This is probably why the first style > exists. > > In this SYN flood codepath optimisation doesn't matter because we're > doing ratelimited logging anyway. But if we're breaking with existing > style, then wouldn't the others also have to change to this style? I > haven't reviewed all the other usage to tell if they're in an oft-used > fastpath where such a thing might matter. I think the word style already implies subjectivity.