From: Simon Horman <horms@kernel.org>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: "David S. Miller" <davem@davemloft.net>,
Andrew Lunn <andrew@lunn.ch>, Eric Dumazet <edumazet@google.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Vladimir Oltean <olteanv@gmail.com>,
Woojung Huh <woojung.huh@microchip.com>,
Arun Ramadoss <arun.ramadoss@microchip.com>,
kernel@pengutronix.de, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, UNGLinuxDriver@microchip.com
Subject: Re: [PATCH net-next v2 1/1] net: dsa: microchip: Add support for bridge port isolation
Date: Wed, 21 Feb 2024 17:53:57 +0000 [thread overview]
Message-ID: <20240221175357.GE722610@kernel.org> (raw)
In-Reply-To: <20240221093429.802077-1-o.rempel@pengutronix.de>
On Wed, Feb 21, 2024 at 10:34:29AM +0100, Oleksij Rempel wrote:
> Implement bridge port isolation for KSZ switches. Enabling the isolation
> of switch ports from each other while maintaining connectivity with the
> CPU and other forwarding ports. For instance, to isolate swp1 and swp2
> from each other, use the following commands:
> - bridge link set dev swp1 isolated on
> - bridge link set dev swp2 isolated on
>
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> Acked-by: Arun Ramadoss <arun.ramadoss@microchip.com>
> ---
> changes v2:
> - add comments and new lines
>
> drivers/net/dsa/microchip/ksz_common.c | 55 +++++++++++++++++++++++---
> drivers/net/dsa/microchip/ksz_common.h | 1 +
> 2 files changed, 51 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
> index 7cd37133ec05..efe54c9492e8 100644
> --- a/drivers/net/dsa/microchip/ksz_common.c
> +++ b/drivers/net/dsa/microchip/ksz_common.c
> @@ -1898,6 +1898,29 @@ static void ksz_get_strings(struct dsa_switch *ds, int port,
> }
> }
>
> +/**
> + * ksz_adjust_port_member - Adjust port forwarding rules based on STP state and
> + * isolation settings.
> + * @dev: A pointer to the struct ksz_device representing the device.
> + * @port: The port number to adjust.
> +
> + * This function dynamically adjusts the port membership configuration for a
> + * specified port and other device ports, based on Spanning Tree Protocol (STP)
> + * states and port isolation settings. Each port, including the CPU port, has a
> + * membership register, represented as a bitfield, where each bit corresponds
> + * to a port number. A set bit indicates permission to forward frames to that
> + * port. This function iterates over all ports, updating the membership register
> + * to reflect current forwarding permissions:
> + *
> + * 1. Forwards frames only to ports that are part of the same bridge group and
> + * in the BR_STATE_FORWARDING state.
> + * 2. Takes into account the isolation status of ports; ports in the
> + * BR_STATE_FORWARDING state with BR_ISOLATED configuration will not forward
> + * frames to each other, even if they are in the same bridge group.
> + * 3. Ensures that the CPU port is included in the membership based on its
> + * upstream port configuration, allowing for management and control traffic
> + * to flow as required.
> + */
> static void ksz_update_port_member(struct ksz_device *dev, int port)
...
Hi Oleksij,
I haven't looked over this patch closely.
But it does seem to have some Kernel doc problems.
.../ksz_common.c:1905: warning: bad line:
.../ksz_common.c:1924: warning: expecting prototype for ksz_adjust_port_member(). Prototype was for ksz_update_port_member() instead
You can observe these by running ./scripts/kernel-doc -none
I'm going to flag this as Changes Requested in patchwork
as typically this kind of problem gets flagged by bots sooner or later.
pw-bot: changes-requested
next prev parent reply other threads:[~2024-02-21 17:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-21 9:34 [PATCH net-next v2 1/1] net: dsa: microchip: Add support for bridge port isolation Oleksij Rempel
2024-02-21 17:53 ` Simon Horman [this message]
2024-02-22 7:33 ` Oleksij Rempel
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=20240221175357.GE722610@kernel.org \
--to=horms@kernel.org \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=arun.ramadoss@microchip.com \
--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 \
--cc=woojung.huh@microchip.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;
as well as URLs for NNTP newsgroup(s).