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=-2.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED, USER_AGENT_NEOMUTT 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 74094C43381 for ; Mon, 18 Feb 2019 11:24:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 41CF42147C for ; Mon, 18 Feb 2019 11:24:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="Xobob8oI" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730627AbfBRLYI (ORCPT ); Mon, 18 Feb 2019 06:24:08 -0500 Received: from pandora.armlinux.org.uk ([78.32.30.218]:52616 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728448AbfBRLYG (ORCPT ); Mon, 18 Feb 2019 06:24:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: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=9qCLtNh84bMJvBMgpfQpL9UMMkSFI+7TRg8/yYBwxo0=; b=Xobob8oIuruPCX15WyA7Gx2aJ eKaqlOgtLeRw+N1ywoW2Hl+a1s0yNX2iDSsrIAUFL8bMP5hgzHmVqSUoISNadYA0zrZzT/yFeMRRT 7nyilX9KkQwgFCHxpHHtBZMC8so7DWrPtOQ8nfkWqd3q3phfHpwrslXHOUrOWBfsaPwncAvilqgq6 mYSkj68zGuYywi6NuRqoqaDps6kdhSJhFvXpNV7FIcraj+ImXTqHKUtxzh2JGhlRWJy9mMbbiWe8B LnfiTnb2TxDHP155BWpEIyAqZO5tv8m1JJSKSwiv4EISIOz+7uq9RwMLa4vc2TjmzObF2ll13sj8Z dMKP9OLiw==; Received: from shell.armlinux.org.uk ([2001:4d48:ad52:3201:5054:ff:fe00:4ec]:54568) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1gvh1i-0006hy-4W; Mon, 18 Feb 2019 11:23:58 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.89) (envelope-from ) id 1gvh1f-00077p-9b; Mon, 18 Feb 2019 11:23:55 +0000 Date: Mon, 18 Feb 2019 11:23:55 +0000 From: Russell King - ARM Linux admin To: Florian Fainelli Cc: Andrew Lunn , Vivien Didelot , "David S. Miller" , netdev@vger.kernel.org Subject: Re: [PATCH net-next 1/3] net: dsa: add support for bridge flags Message-ID: <20190218112355.gxroatrcaigo5nqh@shell.armlinux.org.uk> References: <20190217142414.cjtmpi5y2l5rtdlb@shell.armlinux.org.uk> <20190217220439.zqu7dz7kfukssrlz@shell.armlinux.org.uk> <0f607109-c037-2b7f-cf66-845ce4e7bf33@gmail.com> <20190218005031.wqj54o6ilqfng5nb@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190218005031.wqj54o6ilqfng5nb@shell.armlinux.org.uk> User-Agent: NeoMutt/20170113 (1.7.2) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Feb 18, 2019 at 12:50:31AM +0000, Russell King - ARM Linux admin wrote: > From what I can see, the port_vlan_add()/port_vlan_del() implementation > is far from ideal, just like "always enabling flooding for CPU/DSA > ports" is not ideal. There also seems to be a discrepency between what net/dsa wants to do and some of the implementations in drivers/net/dsa: dsa_switch_vlan_add() does this: bitmap_zero(ds->bitmap, ds->num_ports); if (ds->index == info->sw_index) set_bit(info->port, ds->bitmap); for (port = 0; port < ds->num_ports; port++) if (dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port)) set_bit(port, ds->bitmap); We then call ds->ops->port_vlan_add() for each port in ds->bitmap, which will include DSA and CPU ports on every switch in the tree. For rtl8366, this calls into rtl8366_vlan_add(), which does: if (dsa_is_dsa_port(ds, port) || dsa_is_cpu_port(ds, port)) dev_err(smi->dev, "port is DSA or CPU port\n"); which is surely a guaranteed error message if we have any CPU or DSA ports specified on a rtl8366. The example in the DT documentation for this driver does suggest that it is capable of having CPU ports. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up