Re: [PATCH net-next v6 2/2] net: dsa: mv88e6xxx: add support for credit based shaper

From: Luke Howard

Date: Thu Jun 04 2026 - 18:38:13 EST




> On 4 Jun 2026, at 11:44 pm, Cedric Jehasse via B4 Relay <devnull+cedric.jehasse.luminex.be@xxxxxxxxxx> wrote:
>
> From: Cedric Jehasse <cedric.jehasse@xxxxxxxxxx>
>
> Some of the chips supported by this driver have credit based shaper
> support. Support is added for the 6341, 6352, 6390 and 6393 families.
> This is configured using the Qav registers in the AVB register block.
> There are small differences in the Qav registers between the chip
> families (eg. the unit used for the rate and number of bits in the
> registers). mv88e6xxx_qav_info is introduced to configure this per chip.
>
> Eg. setting up 20mbps credit based shaper on a 1GBit link:
> tc qdisc add dev p8 parent root handle 100: mqprio \
> num_tc 8 \
> map 0 0 6 7 0 5 0 0 0 0 0 0 0 0 0 0 \
> queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 \
> hw 0
>
> tc qdisc replace dev p8 parent 100:8 cbs locredit -1470 hicredit 30 \
> sendslope -980000 idleslope 20000 offload 1
>
> Note: only idleslope and hicredit can be programmed in the switch
> registers, other parameters won't affect settings.

Reviewed-by: Luke Howard <lukeh@xxxxxxxx>