lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKR-sGe6K=Za+eSspTc92Fj=XjAwSm1UQCzunU4TVovZ_4V_fA@mail.gmail.com>
Date: Wed, 11 Jun 2025 09:55:35 +0200
From: Álvaro Fernández Rojas <noltari@...il.com>
To: Jonas Gorski <jonas.gorski@...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 net-next v2 01/10] net: dsa: b53: add support for FDB
 operations on 5325/5365

El mié, 4 jun 2025 a las 8:32, Jonas Gorski (<jonas.gorski@...il.com>) escribió:
>
> On Wed, Jun 4, 2025 at 12:10 AM Florian Fainelli
> <florian.fainelli@...adcom.com> wrote:
> >
> > On 6/3/25 13:48, Álvaro Fernández Rojas wrote:
> > > From: Florian Fainelli <f.fainelli@...il.com>
> > >
> > > BCM5325 and BCM5365 are part of a much older generation of switches which,
> > > due to their limited number of ports and VLAN entries (up to 256) allowed
> > > a single 64-bit register to hold a full ARL entry.
> > > This requires a little bit of massaging when reading, writing and
> > > converting ARL entries in both directions.
> > >
> > > Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
> > > Signed-off-by: Álvaro Fernández Rojas <noltari@...il.com>
> > > ---
> >
> > [snip]
> >
> > >   static int b53_arl_op(struct b53_device *dev, int op, int port,
> > >                     const unsigned char *addr, u16 vid, bool is_valid)
> > >   {
> > > @@ -1795,14 +1834,18 @@ static int b53_arl_op(struct b53_device *dev, int op, int port,
> > >
> > >       /* Perform a read for the given MAC and VID */
> > >       b53_write48(dev, B53_ARLIO_PAGE, B53_MAC_ADDR_IDX, mac);
> > > -     b53_write16(dev, B53_ARLIO_PAGE, B53_VLAN_ID_IDX, vid);
> > > +     if (!is5325(dev))
> > > +             b53_write16(dev, B53_ARLIO_PAGE, B53_VLAN_ID_IDX, vid);
> >
> > I used the 5325M-DS113-RDS datasheet for this code initially but the
> > 5325E-DS14-R datasheet shows that this register is defined. It's not
> > clear to me how to differentiate the two kinds of switches. The 5325M
> > would report itself as:
> >
> > 0x00406330
> >
> > in the integrated PHY PHYSID1/2 registers, whereas a 5325E would report
> > itself as 0x0143bc30. Maybe we can use that to key off the very first
> > generation 5325 switches?
>
> According to the product brief and other documents BCM5325M does not
> support 802.1Q VLANs, which would explain the missing register
> descriptions. It does have 2k ARL entries compared to 1k for the 5325E
> though, so I now see where that value comes from.
>
> If it really doesn't support 802.1Q, then checking if related
> registers are writable might also work.

Considering that I don't have access to a 5325M in order to properly
test it, I prefer the solution proposed by Florian.

I've implemented it in the following branch:
https://github.com/Noltari/linux/commits/b53-bcm5325-v3/
https://github.com/Noltari/linux/commit/e2d3d541ac421bbb5d2fc783e07fda26b105d1a5

I will wait a bit just in case there are some comments for the
recently submitted v2 of the dsa tag patches and then I will merge
both sets of patches into one since your proposed change of checking
the tag protocol for the BRCM_HDR register access requires having the
new legacy FCS tag.

>
> Jonas

Best regards,
Álvaro.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ