On Tue, Jun 02, 2026 at 12:47:00PM +0200, Morten Brørup wrote: > > From: Bruce Richardson [mailto:[email protected]] > > Sent: Tuesday, 2 June 2026 11.09 > > > > We can enable the building of the HPET code by default on Linux, since > > the timers are not used - or even initialized - by default. Instead an > > app needs to explicitly call rte_eal_hpet_init() to use the HPET timer > > APIs. Therefore, let's simplify the user experience by deprecating the > > option "use_hpet" and make it a no-op. > > > > To avoid issue with the dpdk-test binary which was trying to initialize > > the hpet on startup, move the hpet init call to the timer autotest - > > the > > only place where it was used. > > > > Signed-off-by: Bruce Richardson <[email protected]> > > --- > > Careful! > I think this patch has unintended side effects: > > On Linux, it unconditionally enables HPET (and sets RTE_LIBEAL_USE_HPET), > which was previously disabled by default. > > So, if some Linux applications use #ifdef RTE_LIBEAL_USE_HPET, they will now > tell DPDK to use that timer instead of the TSC. > We can fix the apps/examples in the DPDK repo, but it will potentially change > behavior of DPDK user's applications. > > I'm not opposed to unconditionally enabling HPET ability in DPDK itself on > Linux. > But I'm worried about side effects of unconditionally enabling #ifdef > RTE_LIBEAL_USE_HPET in Linux user applications. >
Good point, I hadn't considered if end applications had code guarded by USE_HPET. However, even if HPET support is build-enabled, it still requires apps to explicitly opt-in a) to use it and then b) to make it the default for timer operations. That means that if apps have got the code present to use HPET by default, then they must have a valid reason for doing so and have explicitly opted in to doing so by adding the hpet API calls. It's not possible for apps to "accidentally" start using HPET. [I suppose there may be a risk from old/legacy code in apps, maybe where hpet was used in the past and forgotten about, but otherwise I can't see there being an issue.] More review and testing is welcome though, to ensure I'm not actually missing something here... /Bruce

