You could use the vlib_node_runtime_perf_counter callback hook to run code between node dispatches, which SHOULD give adequate precision.
Alternatively, spin up 1-N threads to run the shaper and driver TX path, and nothing else. See also the handoff node. HTH... Dave -----Original Message----- From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of Prashant Upadhyaya Sent: Thursday, July 23, 2020 2:39 AM To: vpp-dev@lists.fd.io Subject: [vpp-dev] Regarding worker loop in VPP Hi, I have implemented a shaper as a poll node in VPP. worker. The implementation is such that the shaper needs to send packets out which are sitting/scheduled in a timer wheel with microsecond granularity slots. The shaper must invoke at a precise regular interval, say every 250 microseconds where it will rotate the wheel and if any timers expire then send packets out corresponding to those timers. Everything works well, till the various other nodes start getting loaded and disturb the invocation of the shaper poll node at precise intervals. This leads to multiple slots expiring from the timer wheel at times leading to sending out of uneven amount of data depending on how many slots expire in the wheel. Given the nature of while(1) loop operating in the worker and the graph scheduling present there, is there any way I can have my poll node invoke at high precision time boundary as an exception out of the main loop, do the job there and go back to what the worker loop was doing. Regards -Prashant
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#17054): https://lists.fd.io/g/vpp-dev/message/17054 Mute This Topic: https://lists.fd.io/mt/75740975/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-