Re: [PATCH net-next v1 1/1] net: dsa: microchip: Add support for bridge port isolation

From: Arun.Ramadoss
Date: Mon Feb 19 2024 - 09:57:09 EST


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@xxxxxxxxxxxxx>