Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1849348rwi; Thu, 3 Nov 2022 09:43:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4cBm0G2S0q3vzuN0MmbxrXOlE6nOgjPQ6AuKmNtId7k9pO8GLmZvL+u6hSRiwGOv8sW1ZJ X-Received: by 2002:a17:907:2719:b0:782:b261:e9eb with SMTP id w25-20020a170907271900b00782b261e9ebmr30900929ejk.104.1667493800701; Thu, 03 Nov 2022 09:43:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667493800; cv=none; d=google.com; s=arc-20160816; b=V+TNvpnUwhI+uQMNOeF7UCkPPawhtUZgjk2QYHUAifSaF6FB00eRrFU7mirtXYQBZR YhvVgXctl2lHDCEFraSgZsZQeZ3bkRkOJq1MrreajzlZn4KOnlXJAcUJdOC4fz6LJ+/2 GWB/sfexZTdiDlBoxxVZD9O8tKX4EHHvHEZmun48FLb8SQptwR82ViYosN6iwvVFrtiC AbkV6o0mjgcqf/LxEEh5PQYOOWZ1Q6FQ0FjPjo5u81r+6xKjte2GiEwMvkB+MD/+YoA3 jhZ+XnmGWw31dCyEsmvCjzGiqqLUvgfKkLztH8NVdnMdc3nTAH/iOQFRn/4OYOSuKRa5 QtNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=heCsF5+oksMkKllVhJuNqNh9mZu8ZtuLSZhGNPkuZUU=; b=pBT/ybFqEUBIS9PJQcARMkJADOMwss9UEQ6bA3tKVuOpRS0Ge0IRNTiXQnUIx7M1Ld 4WnysFBp9sw4ManynI1xu7PJynd82i+SuhSB7pOU5YG1cawvBmsOlqdhdtYaFmyY03rK UOG3LOuExW2yEvGvGbmrqBqQV3lqRiwoP7wcD6intWDeYHubbb3R3EmFkTsVIUznP+/P BhCMSRVcEFu72a+7vKuL1F0BZ3COIhJGl9zSxr/393PcOUAKfnIKxy+U37R5IU2jXd7t Jk2m2TopslMSjyCdvfDpLADZh/plJnXaW+Qy7i2LLO9ngAkRNkYPoONvWPtRDLuF/ljA oLQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arista.com header.s=google header.b=awPwB40A; 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=REJECT sp=REJECT dis=NONE) header.from=arista.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w1-20020a056402268100b0044f2fb68fe6si2146837edd.495.2022.11.03.09.42.57; Thu, 03 Nov 2022 09:43:20 -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=@arista.com header.s=google header.b=awPwB40A; 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=REJECT sp=REJECT dis=NONE) header.from=arista.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231869AbiKCPkY (ORCPT + 97 others); Thu, 3 Nov 2022 11:40:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231694AbiKCPkU (ORCPT ); Thu, 3 Nov 2022 11:40:20 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE92817592 for ; Thu, 3 Nov 2022 08:40:14 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id i5-20020a1c3b05000000b003cf47dcd316so3627200wma.4 for ; Thu, 03 Nov 2022 08:40:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=heCsF5+oksMkKllVhJuNqNh9mZu8ZtuLSZhGNPkuZUU=; b=awPwB40AqRzdI+kaKO27twDciZZUa4wRghMQ5H/0a2587mmwsT8ce5/+TwRPtir9qb Ue4YnZR0stUuot+GTLmCKAQphR/mSEXhy+ubpz8KJfPCEJzJVhMRNMXQCXLb6NJpUHTL UetbKMthucTcZE/68dqbYKFRtCiOee/L6nb3Ze3h2kWMdIE0zcxUoR/hGw/N9NFbiGxh pzv6WKvTAziZPBzbuivwaweJUDDVw3um7ka3zOz4dyEpmzTL/4Yn6NxxO0srkyX8p2W+ NS7wLNG8qRLep0Q7rjQQ9JHVAvJWTrOGOAAgfs6Ly7geOJFMcz0P1WxaVFbFyAgd1EZi CAPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=heCsF5+oksMkKllVhJuNqNh9mZu8ZtuLSZhGNPkuZUU=; b=hzTXLMWHFb712YaFOif9h+00pTPY7U95ei577QhoK8fQvLVs5mVH4XK10AkBxuw3/k yTxi7xejTQdRcXNunnkOURdR4fElvgKQpdnuBa/MR383ddX0i88za70abETit2E9wGdS r2u9Phkcz5trcy3AtOV6xhyhDKA3pQb+p9BHE9JVfhJRZUX0fI83HfLvQMxcJw7JGHqH XFI/9XESDkJRVjSa7aXZ3+7yABJqG74jbnv5BDVZ3rBD7/WivYN6ju1IEXeuxteMlL3o FPSQIVELv5BMZK0HMqdbq4ZS6s5lqbAD4FF7lt2m2JiPdyHQIVKwMyl6isiS5Gxyn4gL TR/g== X-Gm-Message-State: ACrzQf3jv2iH9OTFrhszpSfCeVDvhSogDnbVHjmmJfto8GsFRPCPHCXy DB58fMc3TXhSj2UZFOhqrjc7YQ== X-Received: by 2002:a05:600c:35cf:b0:3c6:e957:b403 with SMTP id r15-20020a05600c35cf00b003c6e957b403mr31542271wmq.162.1667490013382; Thu, 03 Nov 2022 08:40:13 -0700 (PDT) Received: from [10.83.37.24] ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id v20-20020adfa1d4000000b002238ea5750csm1459001wrv.72.2022.11.03.08.40.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Nov 2022 08:40:12 -0700 (PDT) Message-ID: Date: Thu, 3 Nov 2022 15:40:11 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Subject: Re: [PATCH 2/2] net/tcp: Disable TCP-MD5 static key on tcp_md5sig_info destruction Content-Language: en-US To: Eric Dumazet Cc: linux-kernel@vger.kernel.org, David Ahern , Bob Gilligan , "David S. Miller" , Dmitry Safonov <0x7f454c46@gmail.com>, Francesco Ruggeri , Hideaki YOSHIFUJI , Jakub Kicinski , Paolo Abeni , Salam Noureddine , netdev@vger.kernel.org References: <20221102211350.625011-1-dima@arista.com> <20221102211350.625011-3-dima@arista.com> <483848f5-8807-fd97-babc-44740db96db4@arista.com> From: Dmitry Safonov In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE 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 11/2/22 21:53, Eric Dumazet wrote: > On Wed, Nov 2, 2022 at 2:49 PM Eric Dumazet wrote: > >> >> Are you sure ? >> >> static_branch_inc() is what we want here, it is a nice wrapper around >> the correct internal details, >> and ultimately boils to an atomic_inc(). It is safe for all contexts. >> >> But if/when jump labels get refcount_t one day, we will not have to >> change TCP stack because >> it made some implementation assumptions. > > Oh, I think I understand this better now. > > Please provide a helper like > > static inline void static_key_fast_inc(struct static_key *key) > { > atomic_inc(&key->enabled); > } > > Something like that. Sure, that sounds like a better thing to do, rather than the hack I had. Thanks, will send v2 soon, Dmitry