Re: [PATCH v8 net-next] octeontx2-pf: add mqprio bandwidth offload for NIX TX schedulers

Ratheesh Kannoth <[email protected]>
Newsgroups gmane.linux.kernel.bpf,gmane.linux.kernel,gmane.linux.network
Message-ID <aoJ6FhtWue0FHDQV@rkannoth-OptiPlex-7090>
On 2026-08-13 at 13:57:54, Ratheesh Kannoth ([email protected]) 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().
>
> Signed-off-by: Ratheesh Kannoth <[email protected]>

Will address sashiko comments in v9.

pw-bot: changes-requested
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.