Re: [PATCH v7 net-next] octeontx2-pf: add mqprio bandwidth offload for NIX TX schedulers
From: Ratheesh Kannoth
Date: Wed Aug 12 2026 - 05:05:45 EST
On 2026-08-11 at 14:20:50, Ratheesh Kannoth (rkannoth@xxxxxxxxxxx) wrote:
> Add TC_SETUP_QDISC_MQPRIO handling to offload per-queue MDQ CIR/PIR
> shaping for mqprio channel mode with TC_MQPRIO_SHAPER_BW_RATE. When
> bandwidth offload is enabled, allocate one SMQ per non-QoS transmit
> queue, parent all MDQs under TL4[0], and program min/max rates by
> dividing each traffic class byte/s limit across its queues.
>
> Setting up or tearing down the offload restarts the netdev via
> ndo_stop()/ndo_open() to rebuild the TX scheduler hierarchy. That
> clears carrier, tears down IRQ/NAPI and drops in-flight traffic; if
> ndo_open() fails the interface is left administratively down. Offload
> setup is rejected unless the interface is already running.
>
> Reject incompatible configurations (HTB, PFC, XDP, SDP rep, missing
> CIR+PIR support) and out-of-range rates. Validate queue mappings
> against hw.non_qos_queues and reject per-TC rates smaller than the
> queue count that integer division would truncate to zero. Track offload
> state in mqprio_rate_limit instead of pfvf->flags to avoid races with
> the mbox up-handler, skip spurious teardown on tc qdisc replace, and
> clear all MDQ shapers before applying a new mapping so queues dropped
> from a TC layout do not retain stale limits. Restore cached shapers
> across routine netdev stop/open via otx2_mqprio_up().
Will address sashiko issues in v8
https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260811085050.3212280-1-rkannoth%40marvell.com
pw-bot: changes-requested