[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOiHx=mBPv-BDO2sDfW0wi_50BUsDje3t0HixVCXaQWLtkOkgQ@mail.gmail.com>
Date: Tue, 3 Jun 2025 12:31:39 +0200
From: Jonas Gorski <jonas.gorski@...il.com>
To: Álvaro Fernández Rojas <noltari@...il.com>
Cc: Florian Fainelli <florian.fainelli@...adcom.com>, andrew@...n.ch, olteanv@...il.com,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
vivien.didelot@...il.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, dgcbueu@...il.com
Subject: Re: [RFC PATCH 08/10] net: dsa: b53: fix unicast/multicast flooding
on BCM5325
On Tue, Jun 3, 2025 at 12:18 PM Álvaro Fernández Rojas
<noltari@...il.com> wrote:
>
> Hi Jonas,
>
> El lun, 2 jun 2025 a las 22:08, Jonas Gorski
> (<jonas.gorski@...il.com>) escribió:
> >
> > On Mon, Jun 2, 2025 at 8:09 PM Florian Fainelli
> > <florian.fainelli@...adcom.com> wrote:
> > >
> > > On 5/31/25 03:13, Álvaro Fernández Rojas wrote:
> > > > BCM5325 doesn't implement UC_FLOOD_MASK, MC_FLOOD_MASK and IPMC_FLOOD_MASK
> > > > registers.
> > > > This has to be handled differently with other pages and registers.
> > > >
> > > > Fixes: a8b659e7ff75 ("net: dsa: act as passthrough for bridge port flags")
> > > > Signed-off-by: Álvaro Fernández Rojas <noltari@...il.com>
> > > > ---
> > >
> > > [snip]
> > >
> > > > +/*************************************************************************
> > > > + * IEEE 802.1X Registers
> > > > + *************************************************************************/
> > > > +
> > > > +/* Multicast DLF Drop Control register (16 bit) */
> > > > +#define B53_IEEE_MCAST_DLF 0x94
> > > > +#define B53_IEEE_MCAST_DROP_EN BIT(11)
> > > > +
> > > > +/* Unicast DLF Drop Control register (16 bit) */
> > > > +#define B53_IEEE_UCAST_DLF 0x96
> > > > +#define B53_IEEE_UCAST_DROP_EN BIT(11)
> > >
> > > Are you positive the 5325 implements all of those registers? They are
> > > not documented in my databook.
> >
> > They are in 5325E-DS14-R pages 112 - 112 (134/135)
> >
> > That being said, I don't thing we need to touch the MC/BC/DLF rate
> > control registers when enabling/disabling flooding - these only limit
> > how much traffic may be UC / MC on a port, but apart from that they
> > do not limit flooding. We don't limit this on other switch models
> > either.
>
> In that case there's nothing to enable/disable on the BCM5325 and we
> should do an early return on b53_port_set_ucast_flood and
> b53_port_set_mcast_flood since UC_FLOOD_MASK, MC_FLOOD_MASK and
> IPMC_FLOOD_MASK don't exist.
You are adding calls to modify the B53_IEEE_UCAST_DLF and
B53_IEEE_MCAST_DLF registers, which are fine and look correct. And
AFAICT these are the equivalent to UC_FLOOD_MASK and MC_FLOOD_MASK,
with no IPMC_FLOOD_MASK equivalent.
It's only the rate control ones I'm not sure are the right thing to
do, at least in the same patch.
Regards,
Jonas
Powered by blists - more mailing lists