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,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 186C6C43381 for ; Tue, 19 Feb 2019 19:10:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D64782147C for ; Tue, 19 Feb 2019 19:10:25 +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="j9HKhZr8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726612AbfBSTKY (ORCPT ); Tue, 19 Feb 2019 14:10:24 -0500 Received: from pandora.armlinux.org.uk ([78.32.30.218]:47060 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726225AbfBSTKY (ORCPT ); Tue, 19 Feb 2019 14:10:24 -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=cSU9vjM6nkTfkAO4CSPTIFPnkQsxPuSj9Y/x/cmCbYY=; b=j9HKhZr8bZp/lHAsRi2tQcHy4 bvMpbXUZYtw8mKHB1ubQBERoo0tmQ6O03fP6WAgbbd+UyMugogaWsp5vXm7CisjQz/PQH3GkNeFUT WK6QPsFKFkgHHMtzadSuRtTKGh/lFcO7Iey9RYugEN4NBEt/o+VDJ6sWl/adBxl07hwMv+96ZPvOz nS70epRJuvQ/KSWeC0J9uKP12bQXyvlnnfrUDFUesoIpBgB5anSKiVc489602ao9zLvo84UFIKlff e2EJEcrDTbO4dOFo9WOcWxWaqIkaBjJhNuFAUu0Vc0Hy7+wConVPeWnSbXTpXcgnsCOWcVH/h3b50 Q5kOjCFCg==; Received: from shell.armlinux.org.uk ([2002:4e20:1eda:1:5054:ff:fe00:4ec]:36900) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1gwAmZ-0007T3-23; Tue, 19 Feb 2019 19:10:19 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.89) (envelope-from ) id 1gwAmW-0008Fb-GO; Tue, 19 Feb 2019 19:10:16 +0000 Date: Tue, 19 Feb 2019 19:10:16 +0000 From: Russell King - ARM Linux admin To: Vivien Didelot Cc: Andrew Lunn , Florian Fainelli , Heiner Kallweit , "David S. Miller" , netdev@vger.kernel.org Subject: Re: [PATCH net-next v2 2/3] net: dsa: mv88e6xxx: add support for bridge flags Message-ID: <20190219191016.u65vvw5y3iydt5zx@shell.armlinux.org.uk> References: <20190217163114.yomawlljyxlqy3ob@shell.armlinux.org.uk> <20190219111612.GF27578@t480s.localdomain> <20190219162435.f5zl5harbarwy6bj@shell.armlinux.org.uk> <20190219120000.GB4140@t480s.localdomain> <20190219171414.cvaiw7u2xnd5zk3g@shell.armlinux.org.uk> <20190219123828.GD10959@t480s.localdomain> <20190219180811.qxsu2ss3g7jwhgfb@shell.armlinux.org.uk> <20190219140444.GD16594@t480s.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190219140444.GD16594@t480s.localdomain> 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 Tue, Feb 19, 2019 at 02:04:44PM -0500, Vivien Didelot wrote: > Hi Russell, > > On Tue, 19 Feb 2019 18:08:11 +0000, Russell King - ARM Linux admin wrote: > > Having these as separate functions means that we would then need > > additional complexity in mv88e6xxx to store the per-port flooding state, > > so we can do this: > > > > reg &= ~MV88E6352_PORT_CTL0_EGRESS_FLOODS_MASK; > > > > if (unicast && multicast) > > reg |= MV88E6352_PORT_CTL0_EGRESS_FLOODS_ALL_UNKNOWN_DA; > > else if (unicast) > > reg |= MV88E6352_PORT_CTL0_EGRESS_FLOODS_NO_UNKNOWN_MC_DA; > > else if (multicast) > > reg |= MV88E6352_PORT_CTL0_EGRESS_FLOODS_NO_UNKNOWN_UC_DA; > > else > > reg |= MV88E6352_PORT_CTL0_EGRESS_FLOODS_NO_UNKNOWN_DA; > > > > for some of the switches. It looks to me like mv88e6xxx would prefer > > having at least both the unicast and multicast flags together. > > > > Even without that, it means more code in mv88e6xxx to wrap each of > > these calls between the DSA ops and the chip specific ops... > > True, let's stick with ops->port_egress_flood(ds, port, bool uc, bool mc). > I do not think that it is necessary to add support for BR_BCAST_FLOOD yet, > we can extend this routine later if we need to. > > Your dsa_port_bridge_flags() core function can notify the understood > features. This will allow us to scope the support of the bridge flags in > the core, and preventing the drivers to do that themselves. So, if we have ops->port_egress_flood, then we tell bridge that we support BR_FLOOD | BR_MCAST_FLOOD, irrespective of whether the bridge actually supports both? -- 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