Message ID | 20221103212524.865762-1-dima@arista.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a40e:b0:83:7221:86ba with SMTP id ck14csp1126663dyb; Thu, 3 Nov 2022 14:35:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6AP2iHt3zV5R8uc0Amqegsr7hyM/TxwP7NLrHerVqjKCLSI4VYbfRHFEjdC3OmThl2UYWx X-Received: by 2002:a17:902:7485:b0:17d:5176:fe6e with SMTP id h5-20020a170902748500b0017d5176fe6emr32301063pll.147.1667511338004; Thu, 03 Nov 2022 14:35:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667511337; cv=none; d=google.com; s=arc-20160816; b=xIOZmYjr+OBTVqdzKCId0+8otKPlRrsH7Gzw10utbSjVYaZoLp4w4MBCs7+YU5VoEn R63ES52oSNhGGwZwMdNO8czAF1+ajS8w0QHSqBO8bVNNfui+/kY+GKHF4ApWO4OIKAlW +k/kqikmh8MdVXQ0ZzXa3kV1d/kbSV9vGoN9vgBQks8seCdLOx0gzhAiafEqhMefqY9+ aDj9vviQu4XgZrpaF8XisLHXWawoCOQvup+v7uUNYGd5GKvF8uEnLkwxa5eNjKPxJLYE OxpvuxxZP3qRxXVnEEzHOZ8Qct/8FQ5njjDyWY2PDVh/01kyhYvgtw7xV2tgmwpaN+Yw ErJA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=dCqZNSHIaxnmzerwBb4XIzFYMc5x8wpQp8vL9SOeM7o=; b=gLR08jEwYjO66TzdvsRe+1ZiA5NvcTGUDJKRKNv0Kfg3U/J3n+zCVdQbhCGrFpE+xo GhNo6khjhtxOEyz0vg9w94FUyjSElHM7zss1moYWmqIrhBz4sf8V1vcC1qp+Z1t7tUV2 Uht9Lnqm3lCstL8TVbim/zc8R8KOnz0YKgnI3RCYTVxTK8DXkoNcQtHaurnfMADy4DGg G2krFXZ4+vyh9749y+Kxnfhh39tYoaak/bAhHnjO5VSGgh0CjMMPR+Lr1OUmdgPIFiTw 7cbRE8wbtrBkzPHsKPkdNdI5PWwen1LK49nFYojiRPBWKZjHoMM5E4JeP8cgmsBy7Alo 9bFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arista.com header.s=google header.b=I1KjqUir; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l190-20020a6388c7000000b0045750bb568asi2539901pgd.15.2022.11.03.14.35.25; Thu, 03 Nov 2022 14:35:37 -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=I1KjqUir; 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 S230075AbiKCVZg (ORCPT <rfc822;yves.mi.zy@gmail.com> + 99 others); Thu, 3 Nov 2022 17:25:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229539AbiKCVZe (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 3 Nov 2022 17:25:34 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DE8019001 for <linux-kernel@vger.kernel.org>; Thu, 3 Nov 2022 14:25:33 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id v124-20020a1cac82000000b003cf7a4ea2caso4215609wme.5 for <linux-kernel@vger.kernel.org>; Thu, 03 Nov 2022 14:25:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=dCqZNSHIaxnmzerwBb4XIzFYMc5x8wpQp8vL9SOeM7o=; b=I1KjqUirjGHXmo2eSE5H2LXCLOtZVk5v18PrxYKsfDtiV6Zxtkv54CjpdZ9FjmQbVv FLzazGxfdCvKYXgp7UUioFTUOxJ4GYre5vqKGLV9bAQHMminVeeH3louO6ugrTx3U7jp q/SuMBzDQ4FLoKCisko+Yp6Tf9Ujoir5sercRpbV0goa3PbcYxJIKS206I8vHL5glcH2 U9R/Npj4ZgbD6+2zIWBIeKVJMuB70ZklH7ugTNRJfDG52Up9jLixE5OR4PMdRnYtlQJX ezJutKj2JrTkTuU+fd+9tYnBlEZvdB+pXMe8xzhAt10J45tZOxU3WPR1nnj1GtcMf5zI Sfjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dCqZNSHIaxnmzerwBb4XIzFYMc5x8wpQp8vL9SOeM7o=; b=zLEDeK2lIQKTZ+NqRCoxu38gLpwtf2reMHCrzqwHhMy3fL7uPGBfdaJDIdjDS/NaxV OPBKRd1zcY3DAFNEWJWLVN81RESGa2Zz202/1fjE6CmZoXRsR+RPFbuOL/id041thBWm 4oaNYRHLIE1Kx59kv1hr1h4nKTi3sGKy4/9ykZ7zAlvKlh8dxeVGTDTLL+sH2B2kCdgq /kmOT8TmdgoTQHsQepQt+uhOPxBmOd1KCqJ+1bPoVbo8Su7eBP6dzPMGPjBiAccHqgKj QrfhTRKauRf1RDzRgCmUtqP32nbCOVrxV7NzO3335oJK4n1UAf/zh69EkSFYXmy8AAnu SQ1g== X-Gm-Message-State: ACrzQf0qT/FDyA/kzytX8EBat1CmCUZtVci6Vt1P8Kt1BF4x/hhwIuKC 7qfQs5NYbEPnPlnQoliPLqr8diXaWcnUgw== X-Received: by 2002:a05:600c:1553:b0:3c6:e12d:6f32 with SMTP id f19-20020a05600c155300b003c6e12d6f32mr30355982wmg.109.1667510731469; Thu, 03 Nov 2022 14:25:31 -0700 (PDT) Received: from Mindolluin.ire.aristanetworks.com ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id t18-20020a05600c199200b003a601a1c2f7sm1038652wmq.19.2022.11.03.14.25.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 14:25:31 -0700 (PDT) From: Dmitry Safonov <dima@arista.com> To: linux-kernel@vger.kernel.org, David Ahern <dsahern@kernel.org>, Eric Dumazet <edumazet@google.com> Cc: Dmitry Safonov <dima@arista.com>, Bob Gilligan <gilligan@arista.com>, "David S. Miller" <davem@davemloft.net>, Dmitry Safonov <0x7f454c46@gmail.com>, Francesco Ruggeri <fruggeri@arista.com>, Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Salam Noureddine <noureddine@arista.com>, netdev@vger.kernel.org Subject: [PATCH v2 0/3] net/tcp: Dynamically disable TCP-MD5 static key Date: Thu, 3 Nov 2022 21:25:21 +0000 Message-Id: <20221103212524.865762-1-dima@arista.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748512369123491851?= X-GMAIL-MSGID: =?utf-8?q?1748512369123491851?= |
Series |
net/tcp: Dynamically disable TCP-MD5 static key
|
|
Message
Dmitry Safonov
Nov. 3, 2022, 9:25 p.m. UTC
Changes to v2: - Add static_key_fast_inc() helper rather than open-coded atomic_inc() (as suggested by Eric Dumazet) Version 1: https://lore.kernel.org/all/20221102211350.625011-1-dima@arista.com/T/#u The static key introduced by commit 6015c71e656b ("tcp: md5: add tcp_md5_needed jump label") is a fast-path optimization aimed at avoiding a cache line miss. Once an MD5 key is introduced in the system the static key is enabled and never disabled. Address this by disabling the static key when the last tcp_md5sig_info in system is destroyed. Previously it was submitted as a part of TCP-AO patches set [1]. Now in attempt to split 36 patches submission, I send this independently. Cc: Bob Gilligan <gilligan@arista.com> Cc: David Ahern <dsahern@kernel.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Eric Dumazet <edumazet@google.com> Cc: Francesco Ruggeri <fruggeri@arista.com> Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> Cc: Jakub Kicinski <kuba@kernel.org> Cc: Paolo Abeni <pabeni@redhat.com> Cc: Salam Noureddine <noureddine@arista.com> Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org [1]: https://lore.kernel.org/all/20221027204347.529913-1-dima@arista.com/T/#u Thanks, Dmitry Dmitry Safonov (3): jump_label: Add static_key_fast_inc() net/tcp: Separate tcp_md5sig_info allocation into tcp_md5sig_info_add() net/tcp: Disable TCP-MD5 static key on tcp_md5sig_info destruction include/linux/jump_label.h | 21 +++++++++-- include/net/tcp.h | 10 ++++-- net/ipv4/tcp.c | 5 +-- net/ipv4/tcp_ipv4.c | 74 +++++++++++++++++++++++++++++--------- net/ipv4/tcp_minisocks.c | 9 +++-- net/ipv4/tcp_output.c | 4 +-- net/ipv6/tcp_ipv6.c | 10 +++--- 7 files changed, 96 insertions(+), 37 deletions(-) base-commit: f2f32f8af2b0ca9d619e5183eae3eed431793baf