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=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS 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 EEDB0C43387 for ; Thu, 17 Jan 2019 18:47:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BA64920859 for ; Thu, 17 Jan 2019 18:47:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HTZpVj1q" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727598AbfAQSr6 (ORCPT ); Thu, 17 Jan 2019 13:47:58 -0500 Received: from mail-qt1-f196.google.com ([209.85.160.196]:37274 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725878AbfAQSr6 (ORCPT ); Thu, 17 Jan 2019 13:47:58 -0500 Received: by mail-qt1-f196.google.com with SMTP id t33so12467305qtt.4 for ; Thu, 17 Jan 2019 10:47:57 -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=7baRz66m0bvFdSfTVAhEarE48gpQWznZRrbdxh3UHgA=; b=HTZpVj1q8TppOCB3B6noKEWynn6MDM+I76Ho1/R3ptSKwtLt3O7gJpSB4zqnDoF9AA ZU44cYmpadb4OSFJgIwsfpFNomE3x1Af/zAKs0m1BUeDbnj4dXRiw/34XnWOPRZ0jGJ1 FP/uIxBEzvBOP1C/Mm2FgMCalW8bUcALgfPjMzNCt/b/TLjuhXCmxHdaibABwUTEiNuM IxUYG4E+CZaGnOnqn559aOIBNUOF+UwPV0mH2u4+a5+wiiS7mKhrUCGIsoCClEAX/Xaw aiGSsHU0yreH/gQrnd5Zx1rVprGfUHxOSLwTiEa/HmC0c+FnGVxePUcgWy07baaPo781 AwYg== 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=7baRz66m0bvFdSfTVAhEarE48gpQWznZRrbdxh3UHgA=; b=Wj6M0cM1orf3g9bnyQXxTyovIuLLl6yIpqh59f8NHWX2N+RMWT/mmgmJGZKAtChi1H YV9xUr2oRQtZWUwxDLOtAcQ6RzHbqHINhKWEJ17z5zr6ho1LJgDFBKDKIzSJ9wBJND8p 0FCjajwxiRD6gylJtFm9L28Uwnk5PJ3MlXmuRNYlRkDsHozITGZUMaeNEWtwCGsX4qLK ndHMz7KlPjSwDxxKn6ngSt1vs34D4PdcT9Wg5hYufTP9Jvii7wJ/P64gcEOPNAA1ZsuZ Ohi4kzqCoTnbEtVhaR7BlXJp0HYrNXQHrQDiZQmwFOec2aP3vWBgzLWSN/LtYJfaMY95 R1lw== X-Gm-Message-State: AJcUukdi3lkJtHak9T/5c4a/5hb8TQ5iABqQ1c3PKfosur6cJyxQWkYa Ywzl95QysWBQ6NPf3zfAm4frByqEuhU= X-Google-Smtp-Source: ALg8bN7f6KqrickEmb4yqZF250gybOwByw8LnfmXXvWvdL9kCZNnMijvblFrfC4p/o0CVvz2HeOxeQ== X-Received: by 2002:ac8:108e:: with SMTP id a14mr11899898qtj.86.1547750877085; Thu, 17 Jan 2019 10:47:57 -0800 (PST) Received: from localhost (modemcable249.105-163-184.mc.videotron.ca. [184.163.105.249]) by smtp.gmail.com with ESMTPSA id t5sm29248545qkl.14.2019.01.17.10.47.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 Jan 2019 10:47:56 -0800 (PST) Date: Thu, 17 Jan 2019 13:47:55 -0500 Message-ID: <20190117134755.GJ13242@t480s.localdomain> From: Vivien Didelot To: Florian Fainelli Cc: netdev@vger.kernel.org, andrew@lunn.ch, davem@davemloft.net, idosch@mellanox.com, jiri@mellanox.com, ilias.apalodimas@linaro.org, ivan.khoronzhuk@linaro.org, roopa@cumulusnetworks.com, nikolay@cumulusnetworks.com Subject: Re: [PATCH net-next 03/14] net: dsa: b53: Properly account for VLAN filtering In-Reply-To: <0ee886f1-74cc-fe06-eca1-6567855785da@gmail.com> References: <20190116200102.2749-1-f.fainelli@gmail.com> <20190116200102.2749-4-f.fainelli@gmail.com> <20190117113647.GF13242@t480s.localdomain> <0ee886f1-74cc-fe06-eca1-6567855785da@gmail.com> 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 Thu, 17 Jan 2019 09:48:53 -0800, Florian Fainelli wrote: > On 1/17/19 8:36 AM, Vivien Didelot wrote: > > Hi Florian, > > > > On Wed, 16 Jan 2019 12:00:51 -0800, Florian Fainelli wrote: > > > >> + /* Handle the case were multiple bridges span the same switch device > >> + * and one of them has a different setting than what is being requested > >> + * which would be breaking filtering semantics for any of the other > >> + * bridge devices. > >> + */ > >> + b53_for_each_port(dev, i) { > >> + bridge_dev = dsa_to_port(ds, i)->bridge_dev; > >> + if (bridge_dev && > >> + bridge_dev != dsa_to_port(ds, port)->bridge_dev && > >> + br_vlan_enabled(bridge_dev) != vlan_filtering) { > >> + netdev_err(bridge_dev, > >> + "VLAN filtering is global to the switch!\n"); > >> + return -EINVAL; > >> + } > >> + } > > > > Unbridged ports must act as standard NICs and thus forward taggued frames. > > What happens to them if there's a bridge with VLAN filtering enabled spawned > > on other ports of your switch? Will the unbridged ports filter VLAN? > Because VLAN filtering a global setting to the switch, unbridged network > ports will effectively have VLAN filtering enabled, which is why the > ndo_vlan_rx_{add,kill}_vid functions to permit that use case. But then vlan_filtering must simply not be allowed on your switch if you have unbridged ports, no? I might be mixing things up here but I don't understand yet how you can have bridged and unbridged ports working correctly on your switch when it has global VLAN filtering turned on. I understand that the switch will drop the tagged frames on ingress. Thanks, Vivien