Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751570AbdG0NbZ (ORCPT ); Thu, 27 Jul 2017 09:31:25 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:42492 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751160AbdG0NbX (ORCPT ); Thu, 27 Jul 2017 09:31:23 -0400 Date: Thu, 27 Jul 2017 15:31:13 +0200 From: Andrew Lunn To: Egil Hjelmeland Cc: corbet@lwn.net, vivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com, davem@davemloft.net, kernel@pengutronix.de, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH net-next v2 07/10] net: dsa: lan9303: Added basic offloading of unicast traffic Message-ID: <20170727133113.GB18666@lunn.ch> References: <20170725161553.30147-1-privat@egil-hjelmeland.no> <20170725161553.30147-8-privat@egil-hjelmeland.no> <20170726172443.GR12049@lunn.ch> <19cbabee-a0e5-03f1-d2fa-eea3521311a8@egil-hjelmeland.no> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19cbabee-a0e5-03f1-d2fa-eea3521311a8@egil-hjelmeland.no> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 918 Lines: 23 > >I think you are over-simplifying here. Say i have a layer 2 VPN and i > >bridge port 1 and the VPN? The software bridge still wants to do STP > >on port 1, in order to solve loops. > > > > Problem is that the mainline lan9303_separate_ports() does its > work by setting port 1 & 2 in STP BLOCKING state (and port 0 in > FORWARDING state). So my understanding is that it would break port > separation if LAN9303_SWE_PORT_STATE is written while the driver > is in the non-bridged state. If the hardware cannot do it, that is a different matter. But if the hardware can do STP states per port, you should try to make use of it here. > I thought the SW bridge would carry doing its STP work even if > there is a port_stp_state_set method on a DSA port? It will, but it means you are dropping frames in software, adding extra load to the CPU, reducing the available bandwidth for the other port, etc. Andrew