[PATCH net 1/2] net: airoha: Fix off-by-one in airoha_tc_remove_htb_queue()
Simon Horman
horms at kernel.org
Fri Jun 19 02:34:35 PDT 2026
On Thu, Jun 18, 2026 at 08:00:29AM +0200, Lorenzo Bianconi wrote:
> airoha_tc_htb_alloc_leaf_queue() computes the HTB QoS channel index
> as opt->classid % AIROHA_NUM_QOS_CHANNELS and stores it in qos_sq_bmap.
> However, airoha_tc_remove_htb_queue() clears the HTB configuration
> using queue + 1 as the channel index, causing an off-by-one error.
> Use queue directly as the QoS channel index to match the allocation
> logic.
>
> Fixes: ef1ca9271313b ("net: airoha: Add sched HTB offload support")
> Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
Reviewed-by: Simon Horman <horms at kernel.org>
More information about the Linux-mediatek
mailing list