|SUCCESS|dpdk|3b5f9faee3| Intel-Testing
sys_stv at intel.com
sys_stv at intel.com
Thu Nov 26 16:23:52 CET 2026
Test-Label: intel-Testing
Test-Status: SUCCESS
_Testing PASS_
DPDK git repo: dpdk
commit 7c945c2718bd3c5b2a77211abe862d7c0b995699
Author: Alexander Chesnokov <Alexander.Chesnokov at kaspersky.com>
Date: Thu Nov 26 13:17:41 2026 +0300
sched: fix infinite loop in rational approximation
rte_approx() scales alpha and d by 10 until d reaches 1,
multiplying denum by 10 on every step. For d below 1e-9 the loop
makes 10 or more steps, denum wraps in uint32_t and no longer
equals 10^k. The input check still passes, the search compares
against the wrapped denum, never finds a match and spins forever.
A fuzzer input with alpha = 2.65e-23 and d = 1.13e-23 (23 scaling
steps, denum = 4135583744) hangs the function.
The same wrapping breaks rte_approx_64() for d below 1e-19. Besides,
both variants hang even with an intact denum once denum squared does
not fit the type: the products in the search overflow and the
comparisons produce garbage. The 32-bit variant hangs on
alpha = 0.333333333 with d = 1.5e-9, the 64-bit variant on
alpha = 7.38e-19 with d = 6.78e-19.
Reject requests whose precision cannot be represented: stop scaling
before denum wraps and require denum * denum to fit the type, so
that every product in the search stays exact. Requests outside these
bounds could hang forever, or compute against a wrapped denominator
and return a fraction unrelated to the request. Requests within the
bounds behave exactly as before; the sched configuration calls
rte_approx_64() with the constant 1e-7, which keeps working. The
smallest supported precision, 1e-4 for rte_approx() and 1e-9 for
rte_approx_64(), is now stated in the API header.
Add sched_approx_autotest cases for the 32-bit variant: the two
hanging requests are rejected, and a coarse request still returns
the minimal fraction inside the requested interval. rte_approx_64()
gets the same guards but is not called by the test: the symbol is
not exported from the shared library, so an external caller cannot
link against it.
Fixes: de3cfa2c9823 ("sched: initial import")
Cc: stable at dpdk.org
Cc: jasvinder.singh at intel.com
Signed-off-by: Alexander Chesnokov <Alexander.Chesnokov at kaspersky.com>
Testing Summary : 18 Case Done, 18 Successful, 0 Failures
TestPlan:
pf_smoke: http://git.dpdk.org/tools/dts/tree/test_plans/pf_smoke_test_plan.rst
vf_smoke: http://git.dpdk.org/tools/dts/tree/test_plans/vf_smoke_test_plan.rst
virtio_smoke: http://git.dpdk.org/tools/dts/tree/test_plans/virtio_smoke_test_plan.rst
TestSuite:
pf_smoke: http://git.dpdk.org/tools/dts/tree/tests/TestSuite_pf_smoke.py
vf_smoke: http://git.dpdk.org/tools/dts/tree/tests/TestSuite_vf_smoke.py
virtio_smoke: http://git.dpdk.org/tools/dts/tree/tests/TestSuite_virtio_smoke.py
OS : Ubuntu 24.04.4 LTS
Kernel : 6.8.0-71-generic
GCC : 13.3.0-6ubuntu2~24.04.1
NIC : Ethernet Controller XL710 for 40GbE QSFP+
Target : x86_64-native-linuxapp-gcc
Test result details:
+-------------+---------------------------+-------+
| suite | case | status|
+-------------+---------------------------+-------+
| asan_smoke | test_rxtx_with_ASan_enable| passed|
| pf_smoke | test_pf_jumbo_frames | passed|
| pf_smoke | test_pf_rss | passed|
| pf_smoke | test_pf_tx_rx_queue | passed|
| vf_smoke | test_vf_rss | passed|
| vf_smoke | test_vf_tx_rx_queue | passed|
| vf_smoke | test_vf_jumbo_frames | n/a |
| virtio_smoke| test_virtio_loopback | passed|
| virtio_smoke| test_virtio_pvp | passed|
+-------------+---------------------------+-------+
OS : Ubuntu 24.04.4 LTS
Kernel : 6.8.0-87-generic
GCC : 13.3.0-6ubuntu2~24.04.1
NIC : Ethernet Controller E810-C for SFP
Target : x86_64-native-linuxapp-gcc
Test result details:
+-------------+---------------------------+-------+
| suite | case | status|
+-------------+---------------------------+-------+
| asan_smoke | test_rxtx_with_ASan_enable| passed|
| pf_smoke | test_pf_jumbo_frames | passed|
| pf_smoke | test_pf_rss | passed|
| pf_smoke | test_pf_tx_rx_queue | passed|
| vf_smoke | test_vf_jumbo_frames | passed|
| vf_smoke | test_vf_rss | passed|
| vf_smoke | test_vf_tx_rx_queue | passed|
| virtio_smoke| test_virtio_loopback | passed|
| virtio_smoke| test_virtio_pvp | passed|
+-------------+---------------------------+-------+
DPDK STV team
More information about the test-report
mailing list