From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751497AbcBMVsk (ORCPT ); Sat, 13 Feb 2016 16:48:40 -0500 Received: from mail.savoirfairelinux.com ([208.88.110.44]:43638 "EHLO mail.savoirfairelinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751306AbcBMVsj (ORCPT ); Sat, 13 Feb 2016 16:48:39 -0500 From: Vivien Didelot To: Ido Schimmel Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Jiri Pirko , Scott Feldman , Nikolay Aleksandrov , Stephen Hemminger , Florian Fainelli , Andrew Lunn Subject: Re: [PATCH RFC 2/3] net: bridge: set forwarding state on port removal In-Reply-To: <20160213203738.GB17193@colbert.idosch.org> References: <1455312860-24666-1-git-send-email-vivien.didelot@savoirfairelinux.com> <1455312860-24666-3-git-send-email-vivien.didelot@savoirfairelinux.com> <20160213203738.GB17193@colbert.idosch.org> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-unknown-linux-gnu) Date: Sat, 13 Feb 2016 16:48:35 -0500 Message-ID: <87h9hcl1sc.fsf@ketchup.mtl.sfl> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ido, Ido Schimmel writes: > Fri, Feb 12, 2016 at 11:34:19PM IST, vivien.didelot@savoirfairelinux.com wrote: > > Hi Vivien, > >>When a port leaves a bridge, the bridge layer puts its STP state to >>Disabled. If the port is part of an hardware switch, the mode needs to >>be set to Forwarding in order to restore communication with the CPU. >> >>Call br_set_state() in del_nbp(), which only affects switchdev users. >> >>Signed-off-by: Vivien Didelot >>--- > > If you have a LAG device in the bridge and one of the ports leaves the > LAG, then the bridge's teardown sequence isn't invoked and you need to > do the cleanup yourself, by calling your dsa_slave_bridge_port_leave() > function (just an example, I know you don't currently support this). > > With this change, you'll have to call both the > dsa_slave_bridge_port_leave() function and dsa_slave_stp_update() > instead of always calling the same one when leaving a bridge. > > Also, I think this kind of things should be done by drivers, as it's > specific to them. For example, in the case of a physical port, this > wouldn't benefit mlxsw at all, as STP state is a per-VLAN setting and > since VLANs were already flushed in nbp_vlan_flush(), then nothing would > happen. Thanks for the explanation! I drop this RFC then. Best, -v