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=-5.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS, URIBL_BLOCKED,USER_AGENT_MUTT 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 99147C10F11 for ; Sat, 13 Apr 2019 15:12:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 60FE12082E for ; Sat, 13 Apr 2019 15:12:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="ACCGQAGy" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727214AbfDMPMf (ORCPT ); Sat, 13 Apr 2019 11:12:35 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:60234 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726992AbfDMPMf (ORCPT ); Sat, 13 Apr 2019 11:12:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=iQ/DHvGIQva+aqa0oHl0opYyfiBNukdEYQGTKN5Eotk=; b=ACCGQAGyXrxeNEqnoNxtzR2Pcs 2D+eANuXC2b9ZB13ZwQycauAUTrIm8w0fcBZvWtwVnj8vC56FijTk+cctCeeFN3cITiOnQxS7r+M/ szG/CU47blJfuWliEvXIHWgQa5wTXEpckKrrYCYRgJONtfQdFH48BGWS961bEZtERSMo=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1hFKJs-0004nR-Q1; Sat, 13 Apr 2019 17:11:52 +0200 Date: Sat, 13 Apr 2019 17:11:52 +0200 From: Andrew Lunn To: Vladimir Oltean Cc: f.fainelli@gmail.com, vivien.didelot@gmail.com, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, georg.waibel@sensor-technik.de Subject: Re: [PATCH v3 net-next 10/24] net: dsa: Unset vlan_filtering when ports leave the bridge Message-ID: <20190413151152.GB17901@lunn.ch> References: <20190413012822.30931-1-olteanv@gmail.com> <20190413012822.30931-11-olteanv@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190413012822.30931-11-olteanv@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 13, 2019 at 04:28:08AM +0300, Vladimir Oltean wrote: > When ports are standalone (after they left the bridge), they should have > no VLAN filtering semantics (they should pass all traffic to the CPU). > Currently this is not true for switchdev drivers, because the bridge > "forgets" to unset that. > > Normally one would think that doing this at the bridge layer would be a > better idea, i.e. call br_vlan_filter_toggle() from br_del_if(), similar > to how nbp_vlan_init() is called from br_add_if(). > > However what complicates that approach, and makes this one preferable, > is the fact that for the bridge core, vlan_filtering is a per-bridge > setting, whereas for switchdev/DSA it is per-port. Also there are > switches where the setting is per the entire device, and unsetting > vlan_filtering one by one, for each leaving port, would not be possible > from the bridge core without a certain level of awareness. So do this in > DSA and let drivers be unaware of it. > > Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Andrew