lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e0108e653754a552409b822f22004964e57a902d.camel@microchip.com>
Date: Mon, 19 Feb 2024 14:56:27 +0000
From: <Arun.Ramadoss@...rochip.com>
To: <andrew@...n.ch>, <olteanv@...il.com>, <davem@...emloft.net>,
	<Woojung.Huh@...rochip.com>, <pabeni@...hat.com>, <o.rempel@...gutronix.de>,
	<edumazet@...gle.com>, <f.fainelli@...il.com>, <kuba@...nel.org>
CC: <kernel@...gutronix.de>, <linux-kernel@...r.kernel.org>,
	<netdev@...r.kernel.org>, <UNGLinuxDriver@...rochip.com>
Subject: Re: [PATCH net-next v1 1/1] net: dsa: microchip: Add support for
 bridge port isolation

Hi Oleksij,

On Mon, 2024-02-19 at 14:16 +0100, Oleksij Rempel wrote:
> 
> diff --git a/drivers/net/dsa/microchip/ksz_common.c
> b/drivers/net/dsa/microchip/ksz_common.c
> index 7cd37133ec05..10e4a14671e2 100644
> --- a/drivers/net/dsa/microchip/ksz_common.c
> +++ b/drivers/net/dsa/microchip/ksz_common.c
> @@ -1926,7 +1926,8 @@ static void ksz_update_port_member(struct
> ksz_device *dev, int port)
>                 if (other_p->stp_state != BR_STATE_FORWARDING)
>                         continue;
> 
> -               if (p->stp_state == BR_STATE_FORWARDING) {
> +               if (p->stp_state == BR_STATE_FORWARDING &&
> +                   !(p->isolated && other_p->isolated)) {
>                         val |= BIT(port);
>                         port_member |= BIT(i);
>                 }
> @@ -1946,7 +1947,8 @@ static void ksz_update_port_member(struct
> ksz_device *dev, int port)
>                         if (third_p->stp_state !=
> BR_STATE_FORWARDING)
>                                 continue;
>                         third_dp = dsa_to_port(ds, j);
> -                       if (dsa_port_bridge_same(other_dp, third_dp))
> +                       if (dsa_port_bridge_same(other_dp, third_dp)
> &&
> +                           !(other_p->isolated && third_p-
> >isolated))

Reviewed w.r.to readability and maintainability.
blank line and comments above the if statement will be good.

otherwise
Acked-by: Arun Ramadoss <arun.ramadoss@...rochip.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ