The only requirement is to call tw_timer_expire_timers_xxx (...) often enough so that timers expire accurately enough for correct operation. You can spin up an input node (as you describe), you can arrange to schedule a frame for an interior graph node, and so on.
I would suggest placing sessions, etc. onto specific threads; use one wheel per thread. Running one timer per thread is not suggested. D. From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of hari_akkin via Lists.Fd.Io Sent: Monday, June 17, 2019 6:54 AM To: vpp-dev@lists.fd.io Cc: vpp-dev@lists.fd.io Subject: Re: [vpp-dev] timer wheel usage queries Thanks Dave for the information on calling tw_timer_expire_timers_xxx(tw, now). However i have to make the node type as VLIB_NODE_TYPE_INPUT and set node state to VLIB_NODE_STATE_POLLING for polling to work. is this the right approach? I have one more query on how to implement per thread timer wheels. Lets I say I have N worker threads and want to have one timer per thread, what are the best ways to achieve this using TW framework. In my prototype the expiry function always lands on main thread. thanks
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#13297): https://lists.fd.io/g/vpp-dev/message/13297 Mute This Topic: https://lists.fd.io/mt/32039603/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-