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

From: Ratheesh Kannoth

Date: Tue Aug 18 2026 - 22:55:14 EST


On 2026-08-17 at 21:12:12, Jakub Kicinski (kuba@xxxxxxxxxx) wrote:
> On Mon, 17 Aug 2026 08:57:47 +0530 Ratheesh Kannoth wrote:
> > Subject: [PATCH v9 net-next] octeontx2-pf: add mqprio bandwidth offload for NIX TX schedulers
>
> ## Form letter - net-next-closed
>
> The merge window for v7.3 has started, and therefore net-next is closed
> for new drivers, features, code refactoring and optimizations.
> We will only consider applying net-next patches which were posted
> before the announcement:
>
> https://lore.kernel.org/20260816155953.072d73da@xxxxxxxxxx
>
> Fixes are obviously welcome at any time. net-next patches may be sent
> for review and discussion only with an RFC tag.
>
> Please repost when net-next reopens.
>
> See: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#development-cycle

Jakub,

Will do. Thanks.

Resolving these pre-existing and error-handling issues from sashiko (see below table)
will require additional time and refactoring. I've added temporary TODO
comments and debug messages to track them.

If acceptable, we would prefer to re-submit v9 and a follow up patchset to address
these fully post-merge of this patch. Please let me know if this approach acceptable you.

+-----+------------------+-----------------------+------------------------+------------------------+
| # | Location | Issue | Impact | TODO / user warn/debug |
+-----+------------------+-----------------------+------------------------+------------------------+
| 1 | otx2_common.c — | Stale | MQPRIO transmit queues | TODO: yes (lines |
| | otx2_txschq_conf | NIX_AF_TL4X_TOPOLOGY | may be unexpectedly | 790–797). User |
| | ig() | from HTB teardown is | starved until topology | message: no — no |
| | | not reset; MQPRIO | is reprogrammed or HTB | netdev_warn/err/debug |
| | | parents all MDQs | teardown restores | when stale TL4 |
| | | under TL4[0], which | defaults. | topology may starve |
| | | may retain HTB | | queues. |
| | | RR_PRIO/PRIO_ANCHOR | | {pre-existing issue) |
| | | settings. | | |
+-----+------------------+-----------------------+------------------------+------------------------+
| 2 | otx2_pf.c — | If otx2_mqprio_up() | Subsequent ip link set | TODO: yes (lines |
| | otx2_open() / | fails during | up or driver reset | 1983–1987). User |
| | otx2_mqprio_up() | ndo_open(), the | retries | message: partial — |
| | | driver aborts open | otx2_mqprio_up() | otx2_mqprio_up() logs |
| | | and tears down HW but | blindly; interface | netdev_err per failed |
| | | does not clear | stays administratively | txq shaper restore; no |
| | | mqprio.rate_limit or | down until the qdisc | message that |
| | | the rate caches. | is removed and | rate_limit/cache |
| | | | reapplied. | remain set or that the |
| | | | | interface may stay |
| | | | | stuck down. |
+-----+------------------+-----------------------+------------------------+------------------------+
| 3 | otx2_tc.c — otx2 | otx2_mqprio_clear_sw( | Software reports | TODO: yes (lines |
| | _mqprio_down() | ) runs | offload inactive while | 1684–1688). User |
| | | unconditionally even | some queues retain | message: yes — |
| | | when otx2_nix_tm_clea | programmed CIR/PIR — | netdev_err when |
| | | r_queue_shaper() | silent, persistent | clear_queue_shaper |
| | | fails partway through | rate limiting; later | fails, noting some TX |
| | | the MDQ batch. | mqprio_up() may shape | queues may retain |
| | | | with wrong effective | bandwidth limits. |
| | | | rates. | |
+-----+------------------+-----------------------+------------------------+------------------------+
| 4 | otx2_tc.c — otx2 | After ndo_open() | Driver sends mailbox | TODO: no (for this |
| | _mqprio_restart_ | fails, otx2_free_hw_r | messages to clear | path; separate TODO at |
| | netdev() error | esources() frees TX | shapers on freed | line 1749 covers live |
| | path | schedulers but | queues; AF rejects | reprogramming only). |
| | | otx2_mqprio_down() | them, causing spurious | User message: partial |
| | | still runs because | firmware errors. | — netdev_err on |
| | | netif_running() | | restart failure and on |
| | | remains true | | otx2_mqprio_down() |
| | | (dev_close skipped). | | failure after restart; |
| | | | | no message about |
| | | | | clearing shapers on |
| | | | | already-freed |
| | | | | scheduler queues. |
+-----+------------------+-----------------------+------------------------+------------------------+
| 5 | otx2_tc.c — otx2 | On failed tc qdisc | Kernel keeps old qdisc | TODO: yes (lines |
| | _setup_tc_mqprio | replace, otx2_mqprio_ | but driver uses new or | 1626–1629, 1900–1903, |
| | () cleanup / otx | alloc_cache() already | zeroed config — state | 2088–2095). User |
| | 2_teardown_tc_mq | freed the old rate | desynchronization and | message: yes — otx2_mq |
| | prio() | cache; cleanup sets | incorrect bandwidth | prio_replace_failed_ms |
| | | qopt->hw = 0 and | shaping. | g() netdev_err + |
| | | skips HW/cache | | NL_SET_ERR_MSG_MOD; ot |
| | | rollback. Similar | | x2_mqprio_pre_graft_re |
| | | bypass when mqprio_re | | ject_msg() netdev_err |
| | | place_pending is true | | on related reject |
| | | in teardown. | | path. |
+-----+------------------+-----------------------+------------------------+------------------------+