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=-0.9 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 41C85C43381 for ; Tue, 19 Feb 2019 19:04:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0B89F20855 for ; Tue, 19 Feb 2019 19:04:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TUzwNsug" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729438AbfBSTEr (ORCPT ); Tue, 19 Feb 2019 14:04:47 -0500 Received: from mail-qt1-f193.google.com ([209.85.160.193]:45114 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726323AbfBSTEr (ORCPT ); Tue, 19 Feb 2019 14:04:47 -0500 Received: by mail-qt1-f193.google.com with SMTP id d18so14371331qtg.12 for ; Tue, 19 Feb 2019 11:04:46 -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=+SIOC2kxkq+IHnSPiHZnMqfR6PXD8osvLPrXNptPnwo=; b=TUzwNsugRZFC6mbOdzfS69Cwn8QqVFT3lABo+DLVXqjCcGB4W3CxE2HqE7rlj8qo75 GdBMQ5IeCAijZU6GHXL43VV9woFzn1kkljjkQ5oT03uFHlJizdS76/vNFPZqYkV4F8TK 9A/iuSr3fAJspGC5eoWFv/gY+8yTyxfn3kdZDhaDYEngTl5pYPur+qZ4CsPceZ235nb9 u4ad030ZkVueDycJpTH2c85rxmM5524hVGVzr6DKl9T7s92bFVWBX5OLXUtVPHMHIAUQ 8Zu7qV+NYb8Q/1ecWbnvIksWLwkylzH065FqeV2uyMsibZXCAiIy1j2W0eH0uLg0F9Bz rKAw== 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=+SIOC2kxkq+IHnSPiHZnMqfR6PXD8osvLPrXNptPnwo=; b=JZqVqA5zD18DZyXObGCLQJNKLA3SoPZQ1w60hkV3fDYM5UhURllheS9W/p7mjXNYH2 Jhb7O6Mc5ipm627mnKVqSpm2X5VSE0hjSOInaX8bD7bfOrcC0AMMoNYvO8xr0Vrgmrsg VWMlVe3LY6k7PS7Q+PFjxY9NXlfl+R2t+nwo064SHTG07eebMzMyXjtjk29zB+CDDIHF 4fJBE28IvGRDh6arj0S/A3phvuvFe2AswzshBmo6HU1MkvaJitsLPver3jPxQJG8K96v pMq3MOnwj+2mCfdsI3FZwFqUY1o6IpU0OAlhXMOO5Vi8ffHC9VFenoKBH+tb2dk+YFl7 ZySQ== X-Gm-Message-State: AHQUAuZGeY9Dp82oURhfFxRUg2Ey0uLQ8cZvD6sKcvjUoiSQZC+YBFHE gEo0t+bqB2uGFcBjW1q+FdY= X-Google-Smtp-Source: AHgI3IbGfOBts+jMA97L3kgWEi9BBMTkyjAegxOeC1+AXIlm5V7DpTBblBKkwduxNyZZieDb05eryA== X-Received: by 2002:ac8:2f4e:: with SMTP id k14mr23494348qta.76.1550603086202; Tue, 19 Feb 2019 11:04:46 -0800 (PST) Received: from localhost (modemcable249.105-163-184.mc.videotron.ca. [184.163.105.249]) by smtp.gmail.com with ESMTPSA id o128sm8978965qkc.7.2019.02.19.11.04.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Feb 2019 11:04:45 -0800 (PST) Date: Tue, 19 Feb 2019 14:04:44 -0500 Message-ID: <20190219140444.GD16594@t480s.localdomain> From: Vivien Didelot To: Russell King - ARM Linux admin 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 In-Reply-To: <20190219180811.qxsu2ss3g7jwhgfb@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> 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 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. Thanks, Vivien