Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp647420rwi; Mon, 10 Oct 2022 05:35:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7IX89jGeTrDDI0e95Y+dTIBCbtX014jB0UhQ8JRb/te0V+kkjD7+1lRkgTS8ffglB8R3HN X-Received: by 2002:a17:903:48e:b0:17e:ea4a:394e with SMTP id jj14-20020a170903048e00b0017eea4a394emr18360345plb.48.1665405322531; Mon, 10 Oct 2022 05:35:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665405322; cv=none; d=google.com; s=arc-20160816; b=z1ENOshzXv1PEhriyh77rKKsi1xvn7QHNOnPxd37QvFJMe6to8wDP8Lo8BsybMxfFJ 3VEUq+JcFFGTFLCWQjE1pK8GQfGbBrQ7KXZ4W3TtMGvsbls09aUimyKDwT6RxQW2Ulf9 C+axrKN66PCgCccCig+QofbsneQq2xYTJXe8o8gCuRNJgAVOulZYpUeVPd3WB2E9hfyR 1lx9HlwQSM7T21YcBuMzXOLdv2ps9lXUv7OwFV/h1lVBkPs/tZoZRx8i8Nx6LxCmI4dK E8t3Z4V+rFVISmkTBflue8yzVbq4u5NOdvWu3pFPstzP66sRvrFdkpT7Mu6W6nlEYDis y3nA== 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=KGr4jSMmWA90fSl51SKsE39vGZMWNw/HAcCXt0fhKdY=; b=KT+wcIKWq3fO0cv9bkW/4TJ0Qa828zgJNMKWX70QdZ5rkZvBezB8H0fHrPY7djiipv 6Lw40BNC3c1AQcSGwIXqbhYj495Qb8UCzihm5eVmxEAyAlwpnqiqAlMhHLlXHJ1WmqhZ gv6iT9UQYHpPTzGvabaE5Ulbf0gdNrM2o/j6QUmHFHCQ9tNQw3OFVhqFTbsFNUUCJ6iR 7rKkzYDBT0MQ+ArPFNMOSZ9LLqlu0MvJW02Wb+TDALQRMlJSmwmKx1egbRYDYU6ks1dt KDvzN/AmWof6syuD/8LjHuyg22KeIMUJ5Ior7ol34BQaDXAnW1yGRtrqVyulzDfhQTXx GbaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kVxTKEZT; 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 u2-20020a17090341c200b00182d900bdc0si2022238ple.188.2022.10.10.05.35.09; Mon, 10 Oct 2022 05:35:22 -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=@gmail.com header.s=20210112 header.b=kVxTKEZT; 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 S231940AbiJJLzK (ORCPT + 99 others); Mon, 10 Oct 2022 07:55:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232103AbiJJLyn (ORCPT ); Mon, 10 Oct 2022 07:54:43 -0400 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D676B0F; Mon, 10 Oct 2022 04:54:35 -0700 (PDT) Received: by mail-ed1-x52e.google.com with SMTP id z3so14560876edc.10; Mon, 10 Oct 2022 04:54:34 -0700 (PDT) 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=KGr4jSMmWA90fSl51SKsE39vGZMWNw/HAcCXt0fhKdY=; b=kVxTKEZT0JE8DxPI1MKAO1+TSjUzqdK9Xb3/LvmgX4TB3kpU4d15e6WvDtPOMAiOqs 1c2fUpzymPh3GzRbb7YlquXYNwfmChAebHuikACAHDZNauveryBbTH0Y0lagv/fuyDQE gUkvcPbfz05D8QJLrzzmoUBABg8kVO8p8XaOI9k9U17jznxPq4dWpbCvbb1JQEEUuHDT 8/sqy3p/sLIo3HrZo1szWfYS2u54tgp28uewWRDJ4weTyc7As/SZkyj570CdS1g9s9EP 4sOpKArqRq1J9xJ1cx/g/Z4/s4wX8g/VKxhwVxWq19BlDSNkGAl/N+SGea5t1m1HtMOz Q9mg== 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=KGr4jSMmWA90fSl51SKsE39vGZMWNw/HAcCXt0fhKdY=; b=EQU5pMpQGd3rk2uaVBimxlhM3+K5MHR9/m2PEqaEyh2HRp5k2vHb8CIGDkTRqDXhai IZnsfAlUhTeRbrwgYLkFt2uaq5hWSEgA6sy8705ub1f8HlAj836i59MwXU0+C1CTlioC h7IAL1BugCNyX9P+KIeJe/MA8t1ZKh06JL1u8OEyYcCKubxFX7rfz/MhdjBYHSS4POo6 3ApSdtZSPgwlHsyNZKDqxFa/Cg0Sd+dhQMILAIAbMsd5AXBtdUqsW0NLRGaixcXTj3Lo S3Ui2dzj1fdSlHY9BuADfQlKVIyrLGgn3SA0Y5cEhq/alfyecODxXnIiycrCXWLSc5Gd noCQ== X-Gm-Message-State: ACrzQf3UMBG6csM0Qgu2R6H9ulMfkyJsybA4T0rEad6ao23Fm0hJj8sl qAaS2vfoEIIEbk7e80XjbHc= X-Received: by 2002:a05:6402:e9b:b0:454:351c:c222 with SMTP id h27-20020a0564020e9b00b00454351cc222mr17893846eda.216.1665402873268; Mon, 10 Oct 2022 04:54:33 -0700 (PDT) Received: from skbuf ([188.27.184.197]) by smtp.gmail.com with ESMTPSA id c18-20020aa7d612000000b0045720965c7asm6971501edr.11.2022.10.10.04.54.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Oct 2022 04:54:32 -0700 (PDT) Date: Mon, 10 Oct 2022 14:54:30 +0300 From: Vladimir Oltean To: Sasha Levin Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Vladimir Oltean , Florian Fainelli , Paolo Abeni , andrew@lunn.ch, vivien.didelot@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH AUTOSEL 6.0 11/77] net: dsa: all DSA masters must be down when changing the tagging protocol Message-ID: <20221010115430.kloc3urkycsbyele@skbuf> References: <20221009220754.1214186-1-sashal@kernel.org> <20221009220754.1214186-11-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221009220754.1214186-11-sashal@kernel.org> 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 On Sun, Oct 09, 2022 at 06:06:48PM -0400, Sasha Levin wrote: > From: Vladimir Oltean > > [ Upstream commit f41ec1fd1c20e2a4e60a4ab8490b3e63423c0a8a ] > > The fact that the tagging protocol is set and queried from the > /sys/class/net//dsa/tagging file is a bit of a quirk from > the single CPU port days which isn't aging very well now that DSA can > have more than a single CPU port. This is because the tagging protocol > is a switch property, yet in the presence of multiple CPU ports it can > be queried and set from multiple sysfs files, all of which are handled > by the same implementation. > > The current logic ensures that the net device whose sysfs file we're > changing the tagging protocol through must be down. That net device is > the DSA master, and this is fine for single DSA master / CPU port setups. > > But exactly because the tagging protocol is per switch [ tree, in fact ] > and not per DSA master, this isn't fine any longer with multiple CPU > ports, and we must iterate through the tree and find all DSA masters, > and make sure that all of them are down. > > Signed-off-by: Vladimir Oltean > Reviewed-by: Florian Fainelli > Signed-off-by: Paolo Abeni > Signed-off-by: Sasha Levin > --- Not needed for stable kernels, please drop, thanks.