On Tue, 2017-01-24 at 00:31 -0800, Naoki Iwakami wrote: > Hi there, > > I am using SPDK application framework (spdk_app_init() and so on), > and struggling with figuring out the way to insert DPDK timer sub- > system in the framework. > > According to the DPDK documentation, you have to call function > rte_timer_manage() periodically in lcores main_loop() in order to > make the timer sub-system functioning properly. > Could anyone advice where where I can find the lcore main loop in the > SPDK app framework, and what is the recommended way to insert the > rte_timer_manage() function? The SPDK app framework spawns one thread per core for each core in the core mask provided in the initialization options (called reactor_mask). Each thread then sits in a tight loop polling queues for incoming events and executing pollers. The implementation is in lib/event/reactor.c. Our app framework implements its own timers, so you don't need to use the DPDK timers. You can just call /**  * \brief Register a poller on the given lcore.  */ void spdk_poller_register(struct spdk_poller **ppoller,   spdk_poller_fn fn,   void *arg,   uint32_t lcore,   uint64_t period_microseconds); and pass it a non-zero period. If you really do need to use a DPDK timer, just register a poller using the above function with a period of 0 and inside the spdk_poller_fn you provide, call rte_timer_manage. > > Regards, > -- Naoki > > _______________________________________________ > SPDK mailing list > SPDK(a)lists.01.org > https://lists.01.org/mailman/listinfo/spdk