Re: [PATCH net-next] net: stmmac: fix mqprio and cbs combination
flat view
From: Maxime Chevallier <maxime.chevallier@bootlin.com>
Date: 2026-10-13 09:58:48
Also in:
linux-arm-kernel
Hi, On 10/12/26 23:14, Lorenzo Bianconi wrote:
The channel-mode mqprio offload and the CBS offload can currently not be
enabled at the same time. tc_mqprio_validate_chan_mode() refuses the
mqprio offload as soon as any TX queue is configured in AVB mode, and
tc_setup_cbs() refuses to enable CBS while the strict-priority scheduler
is active. As a result the combination is rejected whichever order the
two are configured in.
The strict-priority scheduler selected by the channel-mode mqprio
offload and the per-queue CBS shaper are independent MTL settings and do
not conflict, so drop the checks and let the combination be offloaded.
The following configuration, which was previously refused, now works:
$ tc qdisc replace dev eth0 handle 100 parent root mqprio num_tc 4 \
map 0 0 0 0 0 1 2 3 0 0 0 0 0 0 0 0 \
queues 1@0 1@1 1@2 1@3 mode channel hw 1
$ tc qdisc replace dev eth0 parent 100:2 handle 102: cbs \
idleslope 800000 sendslope -1700000 hicredit 494 locredit -1049 offload 0
$ tc qdisc replace dev eth0 parent 100:3 handle 103: cbs \
idleslope 400000 sendslope -2100000 hicredit 247 locredit -1296 offload 1
$ tc qdisc replace dev eth0 parent 100:4 handle 104: cbs \
idleslope 200000 sendslope -2300000 hicredit 124 locredit -1419 offload 1
Fixes: 47891d501e34 ("net: stmmac: add tc mqprio hw queue priority offload")
Tested-by: Daniel Thompson <redacted>
Signed-off-by: Lorenzo Bianconi <redacted>Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Thank you Lorenzo, Maxime