On Tue, 24 Jan 2023 10:09:45 -0600 Erik Gabriel Carrillo <erik.g.carri...@intel.com> wrote:
> The software timer adapter converts event timer timeout ticks to a > number of CPU cycles at which an rte_timer should expire. The > computation uses integer operations that can result in overflow. > > Use floating point operations instead to perform the computation, and > convert the final result back to an integer type when returning. Also > move the logic that checks the timeout range into the function that > performs the above computation. > > Fixes: 6750b21bd6af ("eventdev: add default software timer adapter") > Cc: sta...@dpdk.org Don't like this solution. Floating point is slow and inaccurate. You can do it with fixed point math if you are careful.