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=-3.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS, URIBL_BLOCKED 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 AD3DCC43381 for ; Wed, 20 Feb 2019 16:38:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7889A2147C for ; Wed, 20 Feb 2019 16:38:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iXgP6Zgr" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726232AbfBTQiZ (ORCPT ); Wed, 20 Feb 2019 11:38:25 -0500 Received: from mail-qt1-f194.google.com ([209.85.160.194]:46887 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725798AbfBTQiZ (ORCPT ); Wed, 20 Feb 2019 11:38:25 -0500 Received: by mail-qt1-f194.google.com with SMTP id z25so6144492qti.13 for ; Wed, 20 Feb 2019 08:38:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:from:to:cc:subject:in-reply-to:references :mime-version:content-disposition:content-transfer-encoding; bh=dd1fxjmkYsTyi1e6cSH/z27SH+5AnBmhCzU25BtXuI0=; b=iXgP6ZgrFaoG8kKbe1q7j59oU01+yescnJGUSBhRoDbe4EmhMZl31MyUbKmv8pKxQ7 57xpYWjZ6X/abA0AGm8m8U3BMZd3eNrdK7VKCPW2ttuG2DhqJQ6nKs2XnK2gpme98LPJ FSYu5y0rWEv+CPNs49QymmeLWFC8RnRBK8PJ7Yz2HqtYxTWl3gr1iYxqVptDX8wOS5ya QBD9pJophGga2vthPuvSCt4tIQWC2k6QaTiN18r3DU+mGepw++pOSqv4CnZf765coaAm aMu9Jq/glyntU4R+g3un/eAWyArEQNeJo2MMv3Y4q0phjFhERWp1xQashl5k5+/uZGQp PoOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:from:to:cc:subject:in-reply-to :references:mime-version:content-disposition :content-transfer-encoding; bh=dd1fxjmkYsTyi1e6cSH/z27SH+5AnBmhCzU25BtXuI0=; b=Caz4IaisYRnvtI1QRBokBJLZQdot03H9xlz+jcr1DeP8fu7Ye9FW6l6+1z4s2q4Aqz RJQBGTPZ0FbzZypI+wxGp/FDH9IIapbBY4VnkrKglCfEJUzkBF4GHsJIUMK190caxeGk ntbEHGu/9WFBH3+w5s9mGTEaWQWLkveu9SWE7yErOo7lZX3o0YzhWSyeBbjURyQuhcqi APIlfnlHOaEip2pevDW73vFy/umRVZJprNfKalt+O0KAmdIil4BOc0lkX6cR1CFmpAv6 mf7eaaVzG/nt5NLtlb6z8IidY2vO2kUxCFl0MuZN8d5igUYYDL2SlolwIiCvdTIsZNr1 xJOw== X-Gm-Message-State: AHQUAuZJgYX6OZEZ9bHGJPa9uy78KkKfRI5bqa+s3/2svan7bREZhcHl ApyTyiNqj+gCgi4ZzLAQwgJ5E1+7zRs= X-Google-Smtp-Source: AHgI3IaLwnerQKoN/BabkGbSWoDC445dHMpPdFVbxN99bDfQ3NUr3GbyitKoA89pT/S2ixD/kSkQ/A== X-Received: by 2002:a0c:eac9:: with SMTP id y9mr12648005qvp.82.1550680703770; Wed, 20 Feb 2019 08:38:23 -0800 (PST) Received: from localhost (modemcable249.105-163-184.mc.videotron.ca. [184.163.105.249]) by smtp.gmail.com with ESMTPSA id b66sm10598991qkf.64.2019.02.20.08.38.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Feb 2019 08:38:23 -0800 (PST) Date: Wed, 20 Feb 2019 11:38:22 -0500 Message-ID: <20190220113822.GD26057@t480s.localdomain> From: Vivien Didelot To: Russell King Cc: Andrew Lunn , Florian Fainelli , "David S. Miller" , netdev@vger.kernel.org Subject: Re: [PATCH net] net: dsa: fix unintended change of bridge interface STP state In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, 20 Feb 2019 10:32:52 +0000, Russell King wrote: > When a DSA port is added to a bridge and brought up, the resulting STP > state programmed into the hardware depends on the order that these > operations are performed. However, the Linux bridge code believes that > the port is in disabled mode. > > If the DSA port is first added to a bridge and then brought up, it will > be in blocking mode. If it is brought up and then added to the bridge, > it will be in disabled mode. > > This difference is caused by DSA always setting the STP mode in > dsa_port_enable() whether or not this port is part of a bridge. Since > bridge always sets the STP state when the port is added, brought up or > taken down, it is unnecessary for us to manipulate the STP state. > > Apparently, this code was copied from Rocker, and the very next day a > similar fix for Rocker was merged but was not propagated to DSA. See > e47172ab7e41 ("rocker: put port in FORWADING state after leaving bridge") > > Fixes: b73adef67765 ("net: dsa: integrate with SWITCHDEV for HW bridging") > Signed-off-by: Russell King Reviewed-by: Vivien Didelot