[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <83a867729ac8fa08709c52e2a357c97ef1bac27e.camel@ti.com>
Date: Thu, 5 Feb 2026 13:45:38 +0530
From: Siddharth Vadapalli <s-vadapalli@...com>
To: Chintan Vankar <c-vankar@...com>
CC: Thomas Gleixner <tglx@...nel.org>, Ingo Molnar <mingo@...nel.org>,
"Vignesh Raghavendra" <vigneshr@...com>, Vadim Fedorenko
<vadim.fedorenko@...ux.dev>, Matthias Schiffer
<matthias.schiffer@...tq-group.com>, Nishanth Menon <nm@...com>, Michael
Walle <mwalle@...nel.org>, Simon Horman <horms@...nel.org>, Roger Quadros
<rogerq@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Jakub Kicinski
<kuba@...nel.org>, Eric Dumazet <edumazet@...gle.com>, "David S. Miller"
<davem@...emloft.net>, Andrew Lunn <andrew+netdev@...n.ch>,
<linux-omap@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<netdev@...r.kernel.org>
Subject: Re: [PATCH net 1/2] net: ethernet: ti: am65-cpsw-nuss: Update
port_mask while adding multicast entry
On Thu, 2026-02-05 at 12:39 +0530, Chintan Vankar wrote:
> Multicast entry rules are mainly evaluated for receiving traffic and do not
> require MAC ports to be explicitly associated with them. However, setting
> associated MAC port's bit to the port_mask of the ALE entry ensures
> technical correctness and helps maintaining ALE entries linked to MAC
> ports.
>
> Signed-off-by: Chintan Vankar <c-vankar@...com>
> ---
> drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
> index 5924db6be3fe..967918050433 100644
> --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
> +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
> @@ -391,7 +391,7 @@ static void am65_cpsw_nuss_ndo_slave_set_rx_mode(struct net_device *ndev)
> cpsw_ale_set_allmulti(common->ale,
> ndev->flags & IFF_ALLMULTI, port->port_id);
>
> - port_mask = ALE_PORT_HOST;
> + port_mask = BIT(port->port_id) | ALE_PORT_HOST;
Since the port_mask setup above is passed to 'cpsw_ale_flush_multicast()'
below, wouldn't it temporarily cause the forwarded multicast traffic to be
dropped?
> /* Clear all mcast from ALE */
> cpsw_ale_flush_multicast(common->ale, port_mask, -1);
>
>
The code in the driver following the above function call is:
if (!netdev_mc_empty(ndev)) {
struct netdev_hw_addr *ha;
/* program multicast address list into ALE register */
netdev_for_each_mc_addr(ha, ndev) {
cpsw_ale_add_mcast(common->ale, ha->addr,
port_mask, 0, 0, 0);
}
}
So we do add back the multicast entries for the same 'port_mask' that we
removed earlier during cpsw_ale_flush_multicast(), but, there is a delay
between flushing the entries in cpsw_ale_flush_multicast() and adding them
back via cpsw_ale_add_mcast(). During that period, the multicast traffic on
the forwarding path between MAC Ports will be momentarily dropped. Please
clarify if that isn't the case.
Regards,
Siddharth.
Powered by blists - more mailing lists