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] [thread-next>] [day] [month] [year] [list]
Message-ID: <64c13754-79b2-4480-9f97-7987fe097d8c@broadcom.com>
Date: Fri, 4 Oct 2024 09:09:25 -0700
From: Florian Fainelli <florian.fainelli@...adcom.com>
To: Sam Edwards <cfsworks@...il.com>, Rafał Miłecki
 <rafal@...ecki.pl>
Cc: Andrew Lunn <andrew@...n.ch>, Vladimir Oltean <olteanv@...il.com>,
 "David S . Miller" <davem@...emloft.net>, Eric Dumazet
 <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: dsa: bcm_sf2: fix crossbar port bitwidth logic

On 10/3/24 14:23, Sam Edwards wrote:
> The SF2 crossbar register is a packed bitfield, giving the index of the
> external port selected for each of the internal ports. On BCM4908 (the
> only currently-supported switch family with a crossbar), there are 2
> internal ports and 3 external ports, so there are 2 bits per internal
> port.
> 
> The driver currently conflates the "bits per port" and "number of ports"
> concepts, lumping both into the `num_crossbar_int_ports` field. Since it
> is currently only possible for either of these counts to have a value of
> 2, there is no behavioral error resulting from this situation for now.
> 
> Make the code more readable (and support the future possibility of
> larger crossbars) by adding a `num_crossbar_ext_bits` field to represent
> the "bits per port" count and relying on this where appropriate instead.
> 
> Signed-off-by: Sam Edwards <CFSworks@...il.com>

Reviewed-by: Florian Fainelli <florian.fainelli@...adcom.com>
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ