[PATCH 0/2] sched: fix byte clock computation for extreme port rates
Alexander.Chesnokov at kaspersky.com
Alexander.Chesnokov at kaspersky.com
Fri Nov 20 07:00:42 CET 2026
From: Alexander Chesnokov <Alexander.Chesnokov at kaspersky.com>
Bug fixes:
* sched: fix byte clock computation for extreme port rates
Docs / Tests:
* test/sched: check port rate byte clock limits
The port byte clock computed in rte_sched_port_config() divides by
zero for port rates above rte_get_tsc_hz() << 8, crashing the
application, and silently truncates its result for very low rates.
This series moves the computation into a helper shared with the
parameter check and rejects the rates the byte clock cannot
represent, then adds unit tests for both limits and the boundary.
app/test/test_sched.c | 16 ++++++++++++++++
lib/sched/rte_sched.c | 19 +++++++++++++++++--
2 files changed, 33 insertions(+), 2 deletions(-)
--
2.43.0
More information about the dev
mailing list