|SUCCESS| [v2] sched: fix infinite loop in rational approximation
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Thu Nov 26 08:17:41 CET 2026
Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/173188
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-11-26
Info
1. The new precision limits are not documented in the header. The patch introduces a visible input constraint, but `rte_approx.h` is not touched.
- `rte_approx()` now fails for `d` below roughly 1e-4.
- `rte_approx_64()` now fails for `d` below roughly 1e-9.
The behaviour comes from these added lines:
```
+ if (denum > UINT32_MAX / denum)
+ return -1;
```
Consider adding a sentence to the Doxygen of both functions stating the minimum supported `d`. Callers would then know why `-1` is returned for a well-formed request.
2. The new test does not use the suite infrastructure. `test_sched_approx()` is a standalone function returning `0`, rather than a `unit_test_suite_runner` suite returning `TEST_SUCCESS`. Since it is a new autotest, consider wrapping the four checks as separate `TEST_CASE()` entries in a suite. A failure would then identify which case broke.
Review-Result: CLEAN
More information about the test-report
mailing list