Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp5980126rwl; Mon, 9 Jan 2023 02:32:24 -0800 (PST) X-Google-Smtp-Source: AMrXdXt6KmUemTt+7ckev5BjmYRvFGmmT+R4q+pZju87nkHeJvu7fmJoBwbTgBumbGFdAuhK1dc2 X-Received: by 2002:a17:907:d38c:b0:7c0:b0f9:e360 with SMTP id vh12-20020a170907d38c00b007c0b0f9e360mr55667339ejc.16.1673260344637; Mon, 09 Jan 2023 02:32:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673260344; cv=none; d=google.com; s=arc-20160816; b=WJZ8Hb3ASyLBLNOJiIhe7ueCRu0SCH3OVFf3Bs+BuIhVO4TV+ITyAFnhL6wO2K/JUk nYTxng86ZAg/AQzWCyqfmFxxoo6rVg9geUY8IPsk5yZyisYe2IW4ppXbgt2xJr8SEBj1 CT07IKuO9xI188p1QYQflzYEno2lwa+5FIDIBPcoWQZRcAKJO0MJTBXDPIwLt6Ute71P Tid9qG3y4X9wzE20vt2qL8/l9s6oTsl3Z4TCdSeH4TFXZ1IjFxdUtr4TcSzkI9SG8B5u ghQ3txTW0OOEqxuf6DFqT/2tC+k6VSM23GGTCOtTbqcGKTostXo6VyfhN0bpBldR4wk6 HfqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=631yiMfd/HSHyv7vF2uoZkf1bP44ApXazpR4vBm2RS0=; b=x6BIVJeNEdcb1EHt20bCKoAQQqscmUrXZsXsCCXYxwlykA+4P6Ab4I0XL/YBuXFcto P66+LdSqGh70NtfOMfcBpsJ5sDPC25afqF30qJfP7XJwHusryxwtdBgHtGrSFQP0lDO6 nRLzOsCsY65sseqSSEKxxpEgzsUfQcgxye3UBcuKeRPcQoh5g8S806uODC4/G7drp/ws 1ESNn1MpCOsUtum/lCxspYVqLW6+jwGxMtYa5WwKf74O418XUNHjQba+jSQvJ0Lbcdff VmHWY6QOdcxrW+h9Bbj1ofSVzdncIILcrBmmy9ycdXxKVpplZTsNixsYON+K/7DniozS o12g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="FK/6LiCc"; 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 sb36-20020a1709076da400b0081feab6d351si10159539ejc.414.2023.01.09.02.32.11; Mon, 09 Jan 2023 02:32:24 -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=@gmail.com header.s=20210112 header.b="FK/6LiCc"; 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 S233658AbjAIKDk (ORCPT + 54 others); Mon, 9 Jan 2023 05:03:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233297AbjAIKCy (ORCPT ); Mon, 9 Jan 2023 05:02:54 -0500 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 004C01147F; Mon, 9 Jan 2023 02:02:40 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id u9so18773609ejo.0; Mon, 09 Jan 2023 02:02:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=631yiMfd/HSHyv7vF2uoZkf1bP44ApXazpR4vBm2RS0=; b=FK/6LiCca2iJVfpTUna4Ww6HscuDHHrb0lOds2yd33X2MBsF/BH4Wc7PQPwBisKShr I8VO/kU7HFssvgkbvUFCoXm30lO5msX4+rqYLDj2cXu0JkkUAkeiQRwMMku4NIghMpcS hOeh//p3hVDZjrvjYfNpHaHPoAm8cZcyqvU1z9pBJZwIp5LiZZEwRNdmW8WW55CFfERJ Y59m8Okr/Frg4EZTfmRVIGSDG/WtE3fyX1FMz+wB3gZqdxyw7xY6LdWd2xSiK4TtvlcX WEZ/CoYq6TBFB4nwbO275ChseLUfZS+m3sMIpeDHIJ5K31xg8xXQBRrXiGRvSNTSYezb d9nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=631yiMfd/HSHyv7vF2uoZkf1bP44ApXazpR4vBm2RS0=; b=eOo8Wp2pK2A3Z01gL+cBfPDHGscG51MF5kyk6FaB+8tgBBf2W0QPsfJ4OCp1S9JNio IJS9/H8IXzfZsMU8nFjkU0Lv2dsETFK5WNjE3t5NzpAha3+upRHSsMNCvjRHPym7H4KP rblDeF86KugCVRXF07d/2n+24Bs/TOzfbKI5OISnE6jEIIigrYIWhB++GMK02GAkgAdy wnyiKjEBngORMLn3EcvTVpDm7bZjkZfZ3hDjvBOEha2g8Ixhu/oBVi17CRQCINWKw7v0 Zf0h1Kizw0l2Vly+kHJ+89IUhNQHmld1eWAHMOK9HMa0CZSRVkE+6ZNTfKmcbQIM0kIY VaEw== X-Gm-Message-State: AFqh2kotBC9nLn+e7vg/wrd4ZvJfciTcJe4OzGHGIYtKfEfbfM488m5I ixgJHwG5ES8aMbx2zi5JPFc= X-Received: by 2002:a17:907:6f09:b0:7c1:37:6d5e with SMTP id sy9-20020a1709076f0900b007c100376d5emr35230503ejc.2.1673258559272; Mon, 09 Jan 2023 02:02:39 -0800 (PST) Received: from skbuf ([188.27.185.38]) by smtp.gmail.com with ESMTPSA id b21-20020a17090630d500b0084f7d38713esm94403ejb.108.2023.01.09.02.02.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Jan 2023 02:02:38 -0800 (PST) Date: Mon, 9 Jan 2023 12:02:36 +0200 From: Vladimir Oltean To: Ido Schimmel Cc: Tobias Waldekranz , davem@davemloft.net, kuba@kernel.org, Nikolay Aleksandrov , Andrew Lunn , Vivien Didelot , Florian Fainelli , Jiri Pirko , Ivan Vecera , Roopa Prabhu , Russell King , Petr Machata , Ido Schimmel , Matt Johnston , Cooper Lees , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bridge@lists.linux-foundation.org Subject: Re: [PATCH v5 net-next 01/15] net: bridge: mst: Multiple Spanning Tree (MST) mode Message-ID: <20230109100236.euq7iaaorqxrun7u@skbuf> References: <20220316150857.2442916-1-tobias@waldekranz.com> <20220316150857.2442916-2-tobias@waldekranz.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Hi Ido, On Mon, Jan 09, 2023 at 10:05:53AM +0200, Ido Schimmel wrote: > > + if (on) > > + static_branch_enable(&br_mst_used); > > + else > > + static_branch_disable(&br_mst_used); > > Hi, > > I'm not actually using MST, but I ran into this code and was wondering > if the static key usage is correct. The static key is global (not > per-bridge), so what happens when two bridges have MST enabled and then > it is disabled on one? I believe it would be disabled for both. If so, > maybe use static_branch_inc() / static_branch_dec() instead? Sounds about right. FWIW, br_switchdev_tx_fwd_offload does use static_branch_inc() / static_branch_dec().