mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <Arun.Ramadoss@microchip.com>
To: <andrew@lunn.ch>, <olteanv@gmail.com>, <davem@davemloft.net>,
	<Woojung.Huh@microchip.com>, <pabeni@redhat.com>,
	<o.rempel@pengutronix.de>, <edumazet@google.com>,
	<f.fainelli@gmail.com>, <kuba@kernel.org>
Cc: <kernel@pengutronix.de>, <linux-kernel@vger.kernel.org>,
	<netdev@vger.kernel.org>, <UNGLinuxDriver@microchip.com>
Subject: Re: [PATCH net-next v1 1/1] net: dsa: microchip: Add support for bridge port isolation
Date: Mon, 19 Feb 2024 14:56:27 +0000	[thread overview]
Message-ID: <e0108e653754a552409b822f22004964e57a902d.camel@microchip.com> (raw)
In-Reply-To: <20240219131614.3724037-1-o.rempel@pengutronix.de>

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@microchip.com>


      reply	other threads:[~2024-02-19 14:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-19 13:16 Oleksij Rempel
2024-02-19 14:56 ` Arun.Ramadoss [this message]

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=e0108e653754a552409b822f22004964e57a902d.camel@microchip.com \
    --to=arun.ramadoss@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=Woojung.Huh@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.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®