From: Florian Fainelli <florian.fainelli@broadcom.com>
To: "Sam Edwards" <cfsworks@gmail.com>, "Rafał Miłecki" <rafal@milecki.pl>
Cc: Andrew Lunn <andrew@lunn.ch>, Vladimir Oltean <olteanv@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: dsa: bcm_sf2: fix crossbar port bitwidth logic
Date: Fri, 4 Oct 2024 09:09:25 -0700 [thread overview]
Message-ID: <64c13754-79b2-4480-9f97-7987fe097d8c@broadcom.com> (raw)
In-Reply-To: <20241003212301.1339647-1-CFSworks@gmail.com>
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@gmail.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
--
Florian
next prev parent reply other threads:[~2024-10-04 16:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-03 21:23 Sam Edwards
2024-10-04 16:09 ` Florian Fainelli [this message]
2024-10-04 23:30 ` patchwork-bot+netdevbpf
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=64c13754-79b2-4480-9f97-7987fe097d8c@broadcom.com \
--to=florian.fainelli@broadcom.com \
--cc=andrew@lunn.ch \
--cc=cfsworks@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=rafal@milecki.pl \
/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
all inboxes | Powered by JetHome®