From: Vivien Didelot <vivien.didelot@gmail.com>
To: Russell King <rmk+kernel@armlinux.org.uk>
Cc: Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next v3 2/3] net: dsa: mv88e6xxx: add support for bridge flags
Date: Wed, 20 Feb 2019 12:26:48 -0500 [thread overview]
Message-ID: <20190220122648.GD32192@t480s.localdomain> (raw)
In-Reply-To: <E1gwR7O-0003ig-0P@rmk-PC.armlinux.org.uk>
Hi Russell,
On Wed, 20 Feb 2019 12:36:54 +0000, Russell King <rmk+kernel@armlinux.org.uk> wrote:
> Add support for the bridge flags to Marvell 88e6xxx bridges, allowing
> the multicast and unicast flood properties to be controlled. These
> can be controlled on a per-port basis via commands such as:
>
> bridge link set dev lan1 flood on|off
> bridge link set dev lan1 mcast_flood on|off
>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
> ---
> drivers/net/dsa/mv88e6xxx/chip.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
> index 32e7af5caa69..937370639fe4 100644
> --- a/drivers/net/dsa/mv88e6xxx/chip.c
> +++ b/drivers/net/dsa/mv88e6xxx/chip.c
> @@ -4692,6 +4692,24 @@ static int mv88e6xxx_port_mdb_del(struct dsa_switch *ds, int port,
> return err;
> }
>
> +static int mv88e6xxx_port_egress_floods(struct dsa_switch *ds, int port,
> + bool unicast, bool multicast)
> +{
> + struct mv88e6xxx_chip *chip = ds->priv;
> + int ret = -EOPNOTSUPP;
I'd prefer "err" like in the rest of the driver.
> +
> + WARN_ON_ONCE(dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port));
No need to warn, the driver does not need to care about which port is targeted
by a call.
> +
> + mutex_lock(&chip->reg_lock);
> + if (chip->info->ops->port_set_egress_floods)
> + ret = chip->info->ops->port_set_egress_floods(chip, port,
> + unicast,
> + multicast);
> + mutex_unlock(&chip->reg_lock);
> +
> + return ret;
> +}
> +
> static const struct dsa_switch_ops mv88e6xxx_switch_ops = {
> #if IS_ENABLED(CONFIG_NET_DSA_LEGACY)
> .probe = mv88e6xxx_drv_probe,
> @@ -4719,6 +4737,7 @@ static const struct dsa_switch_ops mv88e6xxx_switch_ops = {
> .set_ageing_time = mv88e6xxx_set_ageing_time,
> .port_bridge_join = mv88e6xxx_port_bridge_join,
> .port_bridge_leave = mv88e6xxx_port_bridge_leave,
> + .port_egress_floods = mv88e6xxx_port_egress_floods,
> .port_stp_state_set = mv88e6xxx_port_stp_state_set,
> .port_fast_age = mv88e6xxx_port_fast_age,
> .port_vlan_filtering = mv88e6xxx_port_vlan_filtering,
Otherwise it looks good to me.
next prev parent reply other threads:[~2019-02-20 17:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-20 12:36 [PATCH net-next v3 0/3] net: dsa: mv88e6xxx: fix IPv6 Russell King - ARM Linux admin
2019-02-20 12:36 ` [PATCH net-next v3 1/3] net: dsa: add support for bridge flags Russell King
2019-02-20 17:30 ` Vivien Didelot
2019-02-20 12:36 ` [PATCH net-next v3 2/3] net: dsa: mv88e6xxx: " Russell King
2019-02-20 17:26 ` Vivien Didelot [this message]
2019-02-20 12:36 ` [PATCH net-next v3 3/3] net: dsa: enable flooding for bridge ports Russell King
2019-02-20 17:23 ` Vivien Didelot
2019-02-20 17:33 ` Russell King - ARM Linux admin
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=20190220122648.GD32192@t480s.localdomain \
--to=vivien.didelot@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=rmk+kernel@armlinux.org.uk \
/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