mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Razvan Stefanescu <razvan.stefanescu@nxp.com>
Cc: devel@driverdev.osuosl.org, arnd@arndb.de,
	gregkh@linuxfoundation.org, ioana.ciornei@nxp.com,
	alexandru.marginean@nxp.com, agraf@suse.de,
	linux-kernel@vger.kernel.org, stuyoder@gmail.com,
	netdev@vger.kernel.org, laurentiu.tudor@nxp.com
Subject: Re: [PATCH v5 2/6] staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet Switch driver
Date: Tue, 13 Mar 2018 15:22:51 +0100	[thread overview]
Message-ID: <20180313142251.GB3814@lunn.ch> (raw)
In-Reply-To: <20180313135156.3322-3-razvan.stefanescu@nxp.com>

> +/* 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
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  reply	other threads:[~2018-03-13 14:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-13 13:51 [PATCH v5 0/6] staging: Introduce " Razvan Stefanescu
2018-03-13 13:51 ` [PATCH v5 1/6] staging: fsl-dpaa2/ethsw: Add APIs for DPSW object Razvan Stefanescu
2018-03-14 12:17   ` Greg KH
2018-03-14 14:30     ` Razvan Stefanescu
2018-03-13 13:51 ` [PATCH v5 2/6] staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet Switch driver Razvan Stefanescu
2018-03-13 14:22   ` Andrew Lunn [this message]
2018-03-13 15:20     ` Razvan Stefanescu
2018-03-13 15:26       ` Andrew Lunn
2018-03-14 14:27         ` Razvan Stefanescu
2018-03-13 13:51 ` [PATCH v5 3/6] staging: fsl-dpaa2/ethsw: Add ethtool support Razvan Stefanescu
2018-03-13 13:51 ` [PATCH v5 4/6] staging: fsl-dpaa2/ethsw: Add maintainer for Ethernet Switch driver Razvan Stefanescu
2018-03-13 13:51 ` [PATCH v5 5/6] staging: fsl-dpaa2/ethsw: Add README Razvan Stefanescu
2018-03-13 13:51 ` [PATCH v5 6/6] staging: fsl-dpaa2/ethsw: Add TODO Razvan Stefanescu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180313142251.GB3814@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=agraf@suse.de \
    --cc=alexandru.marginean@nxp.com \
    --cc=arnd@arndb.de \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=ioana.ciornei@nxp.com \
    --cc=laurentiu.tudor@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=razvan.stefanescu@nxp.com \
    --cc=stuyoder@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®