Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp662879rwi; Mon, 10 Oct 2022 05:47:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5JYWlhrFOIjI3QF2eoT8/78wzsE5zZAPRqy8XFhdRZJma2bRCwLKDWwCYWy25CGhWi6xbd X-Received: by 2002:a17:907:9493:b0:78d:1eca:1cda with SMTP id dm19-20020a170907949300b0078d1eca1cdamr14696773ejc.407.1665406067583; Mon, 10 Oct 2022 05:47:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665406067; cv=none; d=google.com; s=arc-20160816; b=luv/QHq86v+iPOi7CpJ0AqT2DUZWn3vZS+41YrhCqWuvPWIAAQDTUZhz+a5I9mIuJ0 JstkLJYcOM8yW+P3HGZI9PUWhfwaI3IUD2uvffVQKhx6UHXDd7joTwwzfy2Wjk7NVLR6 3b7/c5CmsvNgBV5+lo3hgsBYHEHO3GWGeONNr9OhspYkkM2MyqoKlSiLk7AdmiFucBHh bR6QhSqznwSsVrT12itZ2x3ONXatex8JP9YeH6+bRmk7Tlr67jiiGKtm8WjfLrtnTHbk nth7e85crrvn17ddEGiGFcaQ9TbAsvOlrH8c9Vxfx6NFvrc6G/9vF3wgfczslNcLVcn7 KTVA== 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=r8MQPm1VfyR8WR3YDKpuy0rJ4sH/UdP+G9t2xvIlExE=; b=KiwJ1wD92zPSXE/UPlQt5sIPpwgcgrVPtJy/LinE6mXQNQAZkkhZhkuVNaUPoPdVts EwiNrwsjis7ve545WDPnKKWpm1Py66ajEBOR9HOIUUJrGAHQulE8W9NLgABdEoVhCT2L nZWYzscvE+BvQEUwEAvp+pix2SmlnsmDDw3rUM7Y6/14zyczrr7rhJ4t262R01kitizL TfOp/DvT9zvcuojblp1gc8H+NAUHEZ6VKYDWTSvGLUnsggaFuS+jJXFw075v2MEJq/nB lW4sf2g/SgErz9QemQ1W1IJj9KanBgUv6AUzkLQKSVijdy+tWGjujqa3hv1QJ5ZHVg+x lBdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=B8XNUCS3; 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 qa44-20020a17090786ac00b007806a566bc2si10996189ejc.457.2022.10.10.05.47.22; Mon, 10 Oct 2022 05:47:47 -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=B8XNUCS3; 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 S231946AbiJJLy3 (ORCPT + 99 others); Mon, 10 Oct 2022 07:54:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232165AbiJJLyM (ORCPT ); Mon, 10 Oct 2022 07:54:12 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C6BD71BCB; Mon, 10 Oct 2022 04:53:58 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id ot12so24387844ejb.1; Mon, 10 Oct 2022 04:53:57 -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=r8MQPm1VfyR8WR3YDKpuy0rJ4sH/UdP+G9t2xvIlExE=; b=B8XNUCS398qRKnyuP7lY3magbVPGqQS07zishCxCW532zytekRB9zlpJXOIpsGcb7q +Yp1VrQwFI+QvAAqm1rNsFbqZyFCyw4e4GVLXRTz2aNUkIqyU3+5JY4YvntdWU8dsbfh JII4Ombw0QwY6pMTk/cZ8E6VjCo4I4MowHD7YXa1LGFvcomxNE9/iUa1IN+PWquV2FHh xvb0Ks8UMqE+jiJN30viSGg4kjMpTSu40Moa/E+Py0OJcHQwXYb9bdXmRUebtVsASFN1 SojX53ZPznZeD0GAVPP52CjfLouowHucLnB8pLc7nU66Avy/CScftEI5EmEtPsHgkF0F jpwg== 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=r8MQPm1VfyR8WR3YDKpuy0rJ4sH/UdP+G9t2xvIlExE=; b=6upctFKbC2aX3UfspGDYYEyzx7d6/pcFRr1DmOKeAGUjjt3uH5XK5humfZCYueuc1U lOOMHXZHaIecMRV30XTcsJlG2tce/ZciGlx5/I00IZ9a4wOApWXbrq8ibDoVJ5K4nxfS O6/ZQBudqXPDlqR9HrFvnmxZCvU0Ngtv3r5RHLJm2Mkv9C5oJ/FP+JI2kZ+P9jNWda/T t5in+6JkN1cd/s/8M7LSmXeH/0J3Mcl9vyHwXzhCvvdMZYGUOIA1koziO6JXQs+KeZEu yd3SUGLs99zYdaGF10HZFL1+ycX3n7Kvx73DD19K5oWiV2iB4WnmH7W5rNLOGiSoe3Ha 1jPg== X-Gm-Message-State: ACrzQf33uHnF+7Ndxm2N1Qhb0q76A1EknER1fpA/BvM8ZjBytmOvsv5f qaIqhz5bSb6ddQjhIERGRTC2u1LA4H0= X-Received: by 2002:a17:907:2cf1:b0:78d:cafc:caba with SMTP id hz17-20020a1709072cf100b0078dcafccabamr1455430ejc.154.1665402835990; Mon, 10 Oct 2022 04:53:55 -0700 (PDT) Received: from skbuf ([188.27.184.197]) by smtp.gmail.com with ESMTPSA id ti5-20020a170907c20500b0073d9630cbafsm5223140ejc.126.2022.10.10.04.53.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Oct 2022 04:53:54 -0700 (PDT) Date: Mon, 10 Oct 2022 14:53:52 +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 5.19 10/73] net: dsa: all DSA masters must be down when changing the tagging protocol Message-ID: <20221010115352.dhei6vmdtlhod2bh@skbuf> References: <20221009221453.1216158-1-sashal@kernel.org> <20221009221453.1216158-10-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221009221453.1216158-10-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:13: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.