From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B953C433EF for ; Mon, 23 May 2022 18:28:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230082AbiEWS2i (ORCPT ); Mon, 23 May 2022 14:28:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245120AbiEWS0h (ORCPT ); Mon, 23 May 2022 14:26:37 -0400 Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E69666FAB for ; Mon, 23 May 2022 11:02:06 -0700 (PDT) Received: by mail-il1-x12f.google.com with SMTP id d3so10345709ilr.10 for ; Mon, 23 May 2022 11:02:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=sy3QR4zyk+R77Hw76GpfK+HF51n89f59J8W2dYGPYco=; b=O0F8N6lmHv4FCTLzcTSgIZeVzzhPQskuJQrn06dqhOomIwqmuDn5DC0CefWX5Lra8Y Ga7vixS8zEI74dqPaiuGB3FVOcKkdqPW2u+fncvTBF4jFAc7KvoMAlO1l4Wsib7+oOSc Rlm9I+vzhrBdUsw8FFbIw4k2kR919sNRPiwsNejCqHORXZH41A4pZt5PlTQ+PkBZ4ZW6 uSjKE4Sv/FEbf/gsuwdfsjlOQzyFtYSmulIJ4mdVru3+B8oeGaX70jl/SKaaJyJqkrbC Ss8rNIpy5HKk0TQ9+4Di77Q5hj9TxhgtvCa2xtF8H3s9JVoURD5v8KIbgwiY+u3CjxUR pnvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=sy3QR4zyk+R77Hw76GpfK+HF51n89f59J8W2dYGPYco=; b=a6CMo1CAulqVI49J0oPFN4NKYJsnJzt2dYn2PpTaksnRoz1h5XOKDgqcCyslhIqjap VHlo4t5fjNcAYhZ12kjhySwY417KvovBWCf6jhioXQrEN1/PyAuBgaiKkzaotwUv+7lU qJq58nj0VlRtPVyE9MgeowOfl4C8IJ7BAWkFiHysGFcuHPMfI7xKpkkUeAJr6SdWJuDf tFRmckFqVM3rAcNF9V2STT3HH2xcnkTB+MOw/kX7UXYn3OOY7Umhx8pvVSud0efD/hdN JFu/uqCCF4AW5iKuU/+SRq6temrs81BW4N8JTrV1Ck1YJn0SnPobLR5vvw0ki87TSgvR V93w== X-Gm-Message-State: AOAM530QrN+3Y00wbE1ihrgjsB1cRLNgARjrZ7F0/77quaWLzL3wY8vM KIOAWHSBMEvBGRcmDjWPSAMbjNAimYM= X-Google-Smtp-Source: ABdhPJx4yHZV4Y1wiYMdQ1AmXc1XpJRewt/l1eRwt2RMJW6Pjgh6C3qnAhQplWjyJrY3oWt31MEyIA== X-Received: by 2002:a65:6a05:0:b0:3db:27cb:9123 with SMTP id m5-20020a656a05000000b003db27cb9123mr20794982pgu.497.1653328825211; Mon, 23 May 2022 11:00:25 -0700 (PDT) Received: from [10.67.48.245] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id q1-20020aa78421000000b0050dc76281e1sm7478405pfn.187.2022.05.23.11.00.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 May 2022 11:00:24 -0700 (PDT) Message-ID: Date: Mon, 23 May 2022 11:00:21 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [RFC PATCH net-next 07/12] net: dsa: all DSA masters must be down when changing the tagging protocol Content-Language: en-US To: Vladimir Oltean , netdev@vger.kernel.org Cc: Jakub Kicinski , Vivien Didelot , Andrew Lunn , Tobias Waldekranz , =?UTF-8?Q?Marek_Beh=c3=ban?= , Ansuel Smith , DENG Qingfang , =?UTF-8?Q?Alvin_=c5=a0ipraga?= , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Colin Foster , Linus Walleij , Luiz Angelo Daros de Luca , Roopa Prabhu , Nikolay Aleksandrov , Frank Wunderlich , Vladimir Oltean References: <20220523104256.3556016-1-olteanv@gmail.com> <20220523104256.3556016-8-olteanv@gmail.com> From: Florian Fainelli In-Reply-To: <20220523104256.3556016-8-olteanv@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 5/23/22 03:42, Vladimir Oltean wrote: > From: Vladimir Oltean > > 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 -- Florian