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 X-Spam-Level: X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D102C433E0 for ; Thu, 28 Jan 2021 01:43:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2775F64DC4 for ; Thu, 28 Jan 2021 01:43:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231156AbhA1BnG (ORCPT ); Wed, 27 Jan 2021 20:43:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229892AbhA1Bmg (ORCPT ); Wed, 27 Jan 2021 20:42:36 -0500 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34885C061756 for ; Wed, 27 Jan 2021 17:41:55 -0800 (PST) Received: by mail-pj1-x1032.google.com with SMTP id cq1so2914021pjb.4 for ; Wed, 27 Jan 2021 17:41:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=EFMu19qyqL3SyD+3VB9YbFUH1W0+fr5OnZ2FjMJy2Og=; b=BE15wn3wX6ZZzlKg1tDy+bJErHg5jKyPXMGt5MbKGWTBETocCYBemOcU7kyvuuy1zw wl9Xg7DTGYHQ7dwByfrXTZeJDf4oBQG1yvaNQ+BW1fYiWRPPMIqIHH13r/dSN48vn8rg 2pJEuNmvUztDZ5IUP+AcbIxLI1Ma/X0uw2+G4Q9cFdr6LlTe7ACKoBPICx2TyeumdrTP e6yKuWdkII41ssIq6O3hDU+wYLdKrx+9SJLOgZJ18dn0mE4yv9/zYpRHOnb3RTmP5e6J vp9MFm4mU2Cn4P4MxOWH62StKwR7Vyc9J+Mpg+C1VX9tyl8+SovwUmxam7MK0+8814In LFbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=EFMu19qyqL3SyD+3VB9YbFUH1W0+fr5OnZ2FjMJy2Og=; b=TjKmeISb9rV1j65ygIriUI+gJpfBxSVJ3OwZH7RYe0CXFtSTK7A5r4xNparG2ik0XJ S8POOi7oiJgtECLHpghq2ZSlt4j6NC6SgaM35SASG0E0ZBmjQWvCyrxzYkqi8O+irw0d 1lzoiqGRxhlsnlj43m/7m33jtH0b7cRN+c3/VU9I9viZhSP8xIGO2F6M4gvPPhlUYRoG nxJLF18Way+YiyyeCEOtFZaNWx9lLO2G0oLLPG/P+TV8fQHGfG1wM9vHNpY50fbqzQyu byxKTKJNq5IpKR3RQW5dPSGHoT1wxzUqm/Y6k9JqNzKjJhnw0B39f9390gmBrRt+PZE2 q9oQ== X-Gm-Message-State: AOAM532UIUm8f1hOOgIk1Mja9R8w2MCUHBj3lBnx0YWg+4SK6jM22nRY fu6r+HVIVUBymdK2ItJa8pG0K3mY5DY= X-Google-Smtp-Source: ABdhPJwKr21MuejTrQqZ7RGLI28vIvNpw7MsGezRW6QCYNi9pUj1OJpMQ8kty6JTWUrDVvKHGYEhdQ== X-Received: by 2002:a17:90a:183:: with SMTP id 3mr8565048pjc.99.1611798114680; Wed, 27 Jan 2021 17:41:54 -0800 (PST) Received: from [10.230.29.30] ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id k6sm4032589pgk.36.2021.01.27.17.41.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Jan 2021 17:41:53 -0800 (PST) Subject: Re: [PATCH net-next 1/4] net: dsa: automatically bring up DSA master when opening user port To: Vladimir Oltean , "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org Cc: Andrew Lunn , Vivien Didelot , Hideaki YOSHIFUJI References: <20210127010028.1619443-1-olteanv@gmail.com> <20210127010028.1619443-2-olteanv@gmail.com> From: Florian Fainelli Message-ID: <18e4ade4-65db-c318-5365-99ef27f02c06@gmail.com> Date: Wed, 27 Jan 2021 17:41:52 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210127010028.1619443-2-olteanv@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 1/26/2021 5:00 PM, Vladimir Oltean wrote: > From: Vladimir Oltean > > DSA wants the master interface to be open before the user port is due to > historical reasons. The promiscuity of interfaces that are down used to > have issues, as referenced Lennert Buytenhek in commit df02c6ff2e39 > ("dsa: fix master interface allmulti/promisc handling"). > > The bugfix mentioned there, commit b6c40d68ff64 ("net: only invoke > dev->change_rx_flags when device is UP"), was basically a "don't do > that" approach to working around the promiscuity while down issue. > > Further work done by Vlad Yasevich in commit d2615bf45069 ("net: core: > Always propagate flag changes to interfaces") has resolved the > underlying issue, and it is strictly up to the DSA and 8021q drivers > now, it is no longer mandated by the networking core that the master > interface must be up when changing its promiscuity. > > From DSA's point of view, deciding to error out in dsa_slave_open > because the master isn't up is (a) a bad user experience and (b) missing > the forest for the trees. Even if there still was an issue with > promiscuity while down, DSA could still do this and avoid it: open the > DSA master manually, then do whatever. Voila, the DSA master is now up, > no need to error out. > > Doing it this way has the additional benefit that user space can now > remove DSA-specific workarounds, like systemd-networkd with BindCarrier: > https://github.com/systemd/systemd/issues/7478 > > And we can finally remove one of the 2 bullets in the "Common pitfalls > using DSA setups" chapter. > > Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli -- Florian