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=-6.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 AC0DCC55179 for ; Thu, 29 Oct 2020 00:05:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 654EC207E8 for ; Thu, 29 Oct 2020 00:05:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389845AbgJ2AFy (ORCPT ); Wed, 28 Oct 2020 20:05:54 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:50702 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389373AbgJ2AFj (ORCPT ); Wed, 28 Oct 2020 20:05:39 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kXvRb-0043T5-Dv; Thu, 29 Oct 2020 01:05:31 +0100 Date: Thu, 29 Oct 2020 01:05:31 +0100 From: Andrew Lunn To: Vladimir Oltean Cc: Kurt Kanzenbach , Vivien Didelot , Florian Fainelli , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org, Sebastian Andrzej Siewior , Richard Cochran , Kamil Alkhouri , ilias.apalodimas@linaro.org, Vladimir Oltean Subject: Re: [PATCH net-next v7 2/8] net: dsa: Give drivers the chance to veto certain upper devices Message-ID: <20201029000531.GD933237@lunn.ch> References: <20201028074221.29326-1-kurt@linutronix.de> <20201028074221.29326-3-kurt@linutronix.de> <20201028104344.56exyeh5tbwefyw5@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201028104344.56exyeh5tbwefyw5@skbuf> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Oct 28, 2020 at 12:43:44PM +0200, Vladimir Oltean wrote: > On Wed, Oct 28, 2020 at 08:42:15AM +0100, Kurt Kanzenbach wrote: > > From: Vladimir Oltean > > > > Some switches rely on unique pvids to ensure port separation in > > standalone mode, because they don't have a port forwarding matrix > > configurable in hardware. So, setups like a group of 2 uppers with the > > same VLAN, swp0.100 and swp1.100, will cause traffic tagged with VLAN > > 100 to be autonomously forwarded between these switch ports, in spite > > of there being no bridge between swp0 and swp1. > > > > These drivers need to prevent this from happening. They need to have > > VLAN filtering enabled in standalone mode (so they'll drop frames tagged > > with unknown VLANs) and they can only accept an 8021q upper on a port as > > long as it isn't installed on any other port too. So give them the > > chance to veto bad user requests. > > > > Signed-off-by: Vladimir Oltean > > Signed-off-by: Kurt Kanzenbach > > --- > > In case reviewers have doubts about this new DSA operation in general. > I would expect that when LAG support is merged, some drivers will > support it, but not any tx_type, but e.g. just NETDEV_LAG_TX_TYPE_HASH. > So it would also be helpful in that case, so they could veto other types > of bond interfaces cleanly. So I do see the need for a generic > "prechangeupper" operation given to drivers. There is always the interesting question, do we want to veto, or simply not accelerate it? We will want to consider that case by case. Andrew