From: Alexander Chesnokov <[email protected]>

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

Reply via email to