|WARNING| [3/3] test/sched: check port survives config failure

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Fri Nov 27 06:42:56 CET 2026


Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/173266

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-11-27

**Patch 1/3: sched: keep port valid on subport and pipe config failure**

Warning: the new `rte_sched_pipe_config()` return-value Doxygen was copied from `rte_sched_subport_config()` and does not describe pipe configuration:

```
+ *   failed stays unconfigured and the call can be repeated with
+ *   corrected parameters. The subports configured before the failed
+ *   call keep their configuration, statistics and queued packets.
```

A rejected pipe configuration does not leave any subport unconfigured, and the subport-ordering wording does not apply to pipes. Reword it for pipes, for example: "On error, the port scheduler instance and the subport stay valid and unchanged; the call can be repeated with corrected parameters."

**Patch 2/3: sched: reject API calls on unconfigured subport**

Info: `rte_sched_subport_tc_ov_config()` and `rte_sched_subport_pipe_profile_add()` now also return -EINVAL for an unconfigured subport. Their header documentation is not updated, unlike `rte_sched_subport_read_stats()` and `rte_sched_queue_read_stats()`. Consider adding the same "-EINVAL if the subport is not configured" note for consistency.

**Patch 3/3: test/sched: check port survives config failure**

Info: each `TEST_ASSERT_*` failure after `rte_sched_port_config()` returns early without calling `rte_sched_port_free(port)`. This leaks the port when the test fails. Use a `goto` cleanup label, or a `unit_test_suite_runner` setup/teardown that owns the port, so a failure does not leak or affect later tests under ASAN.

Info: the new test is registered as a separate `REGISTER_FAST_TEST` rather than as a test case in a `unit_test_suite_runner` suite alongside `test_sched`. Grouping both into one suite would match the preferred test infrastructure. It would also let the cleanup above live in teardown.

Review-Result: WARNING


More information about the test-report mailing list