Re: [PATCH net-next v6 2/2] net: dsa: mv88e6xxx: add support for credit based shaper
From: Cedric Jehasse
Date: Tue Jun 09 2026 - 07:14:23 EST
O Tue, Jun 09, 2026 at 12:05:41PM +0200, Paolo Abeni wrote:
> On 6/4/26 3:44 PM, Cedric Jehasse via B4 Relay wrote:
> > @@ -5679,6 +5686,27 @@ static const struct mv88e6xxx_ops mv88e6393x_ops = {
> > .tcam_ops = &mv88e6393_tcam_ops,
> > };
> >
> > +static const struct mv88e6xxx_qav_info mv88e6352_qav_info = {
> > + .rate_unit = 32,
> > + .rate_mask = GENMASK(14, 0),
> > + .hilimit_mask = GENMASK(14, 0),
> > + .queue_mask = GENMASK(3, 0),
> > +};
> > +
> > +static const struct mv88e6xxx_qav_info mv88e6341_qav_info = {
> > + .rate_unit = 64,
> > + .rate_mask = GENMASK(15, 0),
> > + .hilimit_mask = GENMASK(14, 0),
> > + .queue_mask = GENMASK(3, 0),
> > +};
> > +
> > +static const struct mv88e6xxx_qav_info mv88e6390_qav_info = {
> > + .rate_unit = 64,
> > + .rate_mask = GENMASK(15, 0),
> > + .hilimit_mask = GENMASK(13, 0),
> > + .queue_mask = GENMASK(7, 0),
> > +};
>
> Sashiko mentions that the above masks are not consistent with the switch
> datasheet.
>
> I'm quite surprised the LLM could check such fine grain detail, could
> you please double check if the comment makes sense:
>
> https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260604-net-next-mv88e6xxx-cbs-v6-0-b68c01142d1e%40luminex.be
>
The datasheet i have doesn't mention a QPriEn bit in the QPri Rate register,
that bit is marked as reserved in the datasheet. That comment doesn't seem
valid.
However, reviewing this i've spotted a mistake in the hilimit_mask for the 6341.
I will fix it.
Cedric