Received: by 10.213.65.68 with SMTP id h4csp382918imn; Tue, 13 Mar 2018 07:24:11 -0700 (PDT) X-Google-Smtp-Source: AG47ELs0pwmnAIgpKQ9wOSVpeyBjsdG3O+unVVgBeilWhk82WhToZr87Vu5jZNHui44QQIUiikAI X-Received: by 10.99.152.68 with SMTP id l4mr639521pgo.75.1520951051469; Tue, 13 Mar 2018 07:24:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520951051; cv=none; d=google.com; s=arc-20160816; b=U7VzlDESA1mtV7ua93eCJJlw9PL3tRC966t2W699wHWuhqQUrEixx6ffS2CLKP/2wX E3/XylhSpHXWjvf2OqjnV84w0sjzxvuYjA5scK4CYT7xs+xgNn6KWlIzIVUkQAUQmL4K S9JQ9aQZvfA+OVEaz64QtitOK3PuTpBoI8C3YswGmUaVjM/e8/e9mh+2qaagOX+0Ln+a iWOcIawGrNmMkDi6nambP+kf2Ad4UXprCGH/8KLtPg/wlqnvKnoDJ0kpy1P2STA5Oya5 nz4hWUZAcxiGOd9mvm1k94hyKJqJQdArBkmpyKPECsZA3uK41+NyF1raEjUINOzyPiD1 NdJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=BUbyNeuJB5AiUC4rGwnTA4jJjVbQeTKVez5sgLu3ezk=; b=wUfvDuWYrkkFJgPbNEKKrCDNtI0wqB6GTSSN3zAQfayQhDG+a2pywlP06pezepnlR4 3HMNc7/abV3fV0VL6ut+kJck2U6Uw2KaP1GZNG5nZrUtu7xlzkf1eONvWWZBMiRayNXy g+Szjud3+0E/RejeDEpjqj7VHBVo+N0tR/M8HIBldllPxUveeU0vuZR0wtrF7nNQUwqt CqGZT1IY9xataZC4zcg3WEkiiHO0IhSFFKG9xs7vcU8QvJY9X0UpZUnbH40fQDlThl2p QC5tpjsM9PEuZRpoqn4JvbSHgwGd/4x2UwSvriIWhsaId5Wf5h1FUXBV6TVx91Uki9LI yltQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=T/YBEfcp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c16-v6si195755plo.258.2018.03.13.07.23.56; Tue, 13 Mar 2018 07:24:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=T/YBEfcp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752594AbeCMOW6 (ORCPT + 99 others); Tue, 13 Mar 2018 10:22:58 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:56475 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752281AbeCMOW5 (ORCPT ); Tue, 13 Mar 2018 10:22:57 -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; bh=BUbyNeuJB5AiUC4rGwnTA4jJjVbQeTKVez5sgLu3ezk=; b=T/YBEfcpuy01CyYNy8wGk9YYbSxq68mCFf2K/AU5DxYnDAy/WFWJ4dcPofn6cKbbjJnVSqxwnnoYfjfEIQ774FqUisJ/5JArnPsaY0dpkq3YiH39SdO8FpWcSul1qraSMXK9/oLv2zH2ffIA5pCLkqXKMY+LNtS9h6y1BM7ZugI=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1evkpH-0004Vz-5X; Tue, 13 Mar 2018 15:22:51 +0100 Date: Tue, 13 Mar 2018 15:22:51 +0100 From: Andrew Lunn To: Razvan Stefanescu Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, agraf@suse.de, arnd@arndb.de, alexandru.marginean@nxp.com, ruxandra.radulescu@nxp.com, ioana.ciornei@nxp.com, laurentiu.tudor@nxp.com, stuyoder@gmail.com Subject: Re: [PATCH v5 2/6] staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet Switch driver Message-ID: <20180313142251.GB3814@lunn.ch> References: <20180313135156.3322-1-razvan.stefanescu@nxp.com> <20180313135156.3322-3-razvan.stefanescu@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180313135156.3322-3-razvan.stefanescu@nxp.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 > +/* For the moment, only flood setting needs to be updated */ > +static int port_bridge_join(struct net_device *netdev, > + struct net_device *upper_dev) > +{ > + struct ethsw_port_priv *port_priv = netdev_priv(netdev); > + struct ethsw_core *ethsw = port_priv->ethsw_data; > + int i, err; > + > + for (i = 0; i < ethsw->sw_attr.num_ifs; i++) > + if (ethsw->ports[i]->bridge_dev && > + (ethsw->ports[i]->bridge_dev != upper_dev)) { > + netdev_err(netdev, > + "Another switch port is connected to %s\n", > + ethsw->ports[i]->bridge_dev->name); > + return -EINVAL; > + } > + > + /* Enable flooding */ > + err = ethsw_port_set_flood(port_priv, 1); > + if (!err) > + port_priv->bridge_dev = upper_dev; > + > + return err; > +} Hi Razvan That is not what i was meaning. brctl addbr br0 brctl addbr br1 brctl addif br0 lan0 brctl addif br0 lan1 brctl addif br1 lan2 brctl addif br1 lan3 Is there somewhere in the code which sets the scope for the flooding? lan0 can flood to lan1, but it should not flood to lan2 or lan3, since they are in a different bridge. I was expecting that ethsw_port_set_flood() takes upper_dev, in order to configure which ports it should flood to. Andrew