[PATCH v3] eal: fail initialization if TSC frequency is zero
Thomas Monjalon
thomas at monjalon.net
Tue Oct 13 10:20:10 CEST 2026
29/09/2026 16:13, Stephen Hemminger:
> Many parts of DPDK will fail with divide by zero and
> other errors if the initialization logic ever TSC hz was ever
> determined to be zero. This might happen on a broken get_tsc_freq_arch()
> or bad emulation in QEMU.
>
> If TSC hz is zero, log the error and propagate back to
> fail rte_eal_init().
>
> This fix doesn't need to go to stable since it is a purely
> theoretical problem; we aren't getting divide by zero reports
> from users.
>
> Also, clarify that DPDK TSC is stable and the same for all lcore's.
> The comment in rte_cycles.h implied that it could be different per lcore.
>
> Fixes: 040cf8a41187 ("eal: deduplicate timer functions")
>
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> Acked-by: Bruce Richardson <bruce.richardson at intel.com>
Applied, thanks.
More information about the dev
mailing list