|SUCCESS| sched: fix subport free on RED/PIE config failure

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Wed Nov 25 07:24:43 CET 2026


Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/173140

_AI Code Review_

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

**Info**

1. **The new test cases in `app/test/test_sched.c` leak `port` when an assertion fails.**
   Each case allocates a port with `rte_sched_port_config()` and then checks the result of `rte_sched_subport_config()`. For example:
   ```c
   err = rte_sched_subport_config(port, SUBPORT, &sp, 0);
   TEST_ASSERT_FAIL(err, "Invalid PIE tailq threshold accepted\n");
   rte_sched_port_free(port);
   ```
   - If `rte_sched_subport_config()` unexpectedly succeeds, `TEST_ASSERT_FAIL` returns early and the port is never freed.
   - The same applies to the first two cases. If the bad config is wrongly accepted, the library does not free the port, and `port = NULL;` is never reached.
   - This only matters when the test is already failing, but it leaks hugepage memory into later tests in the same run.
   - Suggested fix: on assertion failure, free the port before returning, either with an explicit check or a cleanup label. For the third and fourth cases, a simpler option is to call `rte_sched_port_free(port)` before asserting on `err`.

Review-Result: CLEAN


More information about the test-report mailing list