[dpdk-users] Calling timers from a library

Stephen Hemminger stephen at networkplumber.org
Thu Apr 9 16:57:08 CEST 2020


On Thu, 9 Apr 2020 11:37:12 +0530
Archit Pandey <architpandeynitk at gmail.com> wrote:

> Hello DPDK users,
> 
> I'm building a library for DPDK which utilizes periodically called
> functions using the dpdk timer facility. Currently, I'm using the master
> core on an application to call timer_manage() and run the scheduled timers.
> 
> My doubt is whether its possible to call timer_manage() from inside the
> library to run the scheduled timers. This would allow for a much more
> streamlined design. An issue which comes to mind is that my library is not
> aware of the cores it is being run on, hence I cannot use
> rte_eal_remote_launch() for a function that calls rte_timer_manage().
> 
> Any help on how I can do this would be greatly appreciated!
> 
> Thanks and regards,
> 

In my experience, once you start running DPDK functions on
non-DPDK threads lots of things can break. The DPDK threads are pinned
to a core and therefore don't preempt each other. For non-DPDK threads
they are not pinned; therefore a DPDK library or other code using
rte_spinlocks can get preempted with and self-deadlock.


More information about the users mailing list