Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1281193rwb; Wed, 16 Nov 2022 15:08:22 -0800 (PST) X-Google-Smtp-Source: AA0mqf7qw3CuTtyalTNPkRlabjv0h7ppJ+5CBOvJ5q7L2qyMUxLbyKoD5XEESE6IPSAahLMr1ZbM X-Received: by 2002:a17:903:3296:b0:188:e1a8:8291 with SMTP id jh22-20020a170903329600b00188e1a88291mr13515plb.91.1668640102672; Wed, 16 Nov 2022 15:08:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668640102; cv=none; d=google.com; s=arc-20160816; b=P2SEf8pIvv92uLyc94jv6zYogziVnAWYeinR4RLhN5Aw4TEkdgNOwByWD2TBy2oztW 0KVWnnOQffiM+dEJL1GI7mTaPY1zOXPzF+udSZ4EEZIqNXxCnEoXBMLFMfBuWkWV3xIp FynXZvHUSKF6vWvlb0+tj9YgkZQlOkN5/Ccr1vsdfFjrcpTFxy/tVBoi8pCPc4dftIiF HoE9CC152isFclvjGWT1lxBm/dgp+yfDYhlGentacxkRhaWiimKbW9OWItmhmerRqh4V 0Nkdz0X5VdEjAjA8myATfA3XTNvMxmtQ/eyJzCoT+J3faHkzIO+I0dgQhXaoRXjIlcYZ fO5A== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=n59fz+JZfUUkNPzn9HeKz0r3GjY3GlvNhH8YnjKRPLA=; b=QlTR78MufM5/OPJJr6LftF7gRWHxDAiLBDRrDBm5tbF5snk2bYcgcLW99RKmAdXIOW qoKAI2NxBy+Ay6ZBwu21o9pNQBAgPzfioQwuOl8HyugcDhjvE2bqtbEfIjJvBkqzLMZB B2kzGDPknq9N/ImsUTej4bZH5T6tOMok6ga6q8L0c1j/A8WodUbSOZUrfINI1FRoABJB eqp/FFldBKt8rqzwmE6objlDpOf09ohLsvmIZkG6JWtvcmmyD8H/8/+l0iY0BFmm6p6W nshygBupEYjhg5OzaXEd+3h0M0ymT8IpdVf4VZmjXmTwcJxJelsPAuSdVz3DQHBzeNIl 8mTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WyLizanc; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l1-20020a170902ec0100b00186f1a1fb83si15159497pld.352.2022.11.16.15.08.10; Wed, 16 Nov 2022 15:08:22 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=WyLizanc; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234469AbiKPWP0 (ORCPT + 90 others); Wed, 16 Nov 2022 17:15:26 -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 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 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.