Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: MD Danish Anwar <danishanwar@ti.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Simon Horman <horms@kernel.org>,
	Meghana Malladi <m-malladi@ti.com>
Cc: linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: ti: icssg-prueth: Fix link-local addresses being forwarded out of slave ports
Date: Tue, 7 Jul 2026 12:30:09 +0200	[thread overview]
Message-ID: <71a1bacf-c54f-45b0-80df-7175261cf2ac@redhat.com> (raw)
In-Reply-To: <20260701112535.4027920-1-danishanwar@ti.com>

On 7/1/26 1:25 PM, MD Danish Anwar wrote:
> Link-local multicast addresses (01:80:c2:00:00:0x) must only be
> delivered to the host port (P0) and must not be forwarded out of
> the physical slave ports. icssg_fdb_add_del() was programming these
> addresses with P1/P2 membership bits set, causing the firmware to
> forward them out of slave ports.
> 
> Clear P1/P2 membership and set only P0 membership when
> is_link_local_ether_addr() returns true.
> 
> Fixes: 487f7323f39a ("net: ti: icssg-prueth: Add helper functions to configure FDB")
> Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
> ---
>  drivers/net/ethernet/ti/icssg/icssg_config.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/net/ethernet/ti/icssg/icssg_config.c b/drivers/net/ethernet/ti/icssg/icssg_config.c
> index 3f8237c17d099..04a81402e3f3c 100644
> --- a/drivers/net/ethernet/ti/icssg/icssg_config.c
> +++ b/drivers/net/ethernet/ti/icssg/icssg_config.c
> @@ -732,6 +732,16 @@ int icssg_fdb_add_del(struct prueth_emac *emac, const unsigned char *addr,
>  	u8 fid = vid;
>  	int ret;
>  
> +	/* Link-local addresses (01:80:c2:00:00:0x) must only be delivered to
> +	 * the host port (P0). Clear P1/P2 membership to prevent the firmware
> +	 * from forwarding them out of the physical slave ports.
> +	 */
> +	if (is_link_local_ether_addr(addr)) {
> +		fid_c2 |= ICSSG_FDB_ENTRY_P0_MEMBERSHIP;
> +		fid_c2 &= ~(ICSSG_FDB_ENTRY_P1_MEMBERSHIP |
> +			    ICSSG_FDB_ENTRY_P2_MEMBERSHIP);
> +	}

Sashiko gemeni mentioned it could be safer to reject entirely wrong masks:

https://sashiko.dev/#/patchset/20260701112535.4027920-1-danishanwar%40ti.com

It's not clear to me if the mentioned bad scenario is actually possibly,
please have a look.

/P



  reply	other threads:[~2026-07-07 10:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01 11:25 [PATCH net] net: ti: icssg-prueth: Fix link-local addresses being forwarded out of slave ports MD Danish Anwar
2026-07-07 10:30 ` Paolo Abeni [this message]
2026-07-07 10:39   ` MD Danish Anwar

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=71a1bacf-c54f-45b0-80df-7175261cf2ac@redhat.com \
    --to=pabeni@redhat.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=danishanwar@ti.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m-malladi@ti.com \
    --cc=netdev@vger.kernel.org \
    /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