Re: [vpp-dev] Can vlib_time_now be used in worker threads

2019-09-19 Thread Vamsi Krishna
Makes sense now. Thanks Dave. -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#14023): https://lists.fd.io/g/vpp-dev/message/14023 Mute This Topic: https://lists.fd.io/mt/34196878/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists

Re: [vpp-dev] Can vlib_time_now be used in worker threads

2019-09-19 Thread Dave Barach via Lists.Fd.Io
Each thread has its own vlib_main_t. From: vpp-dev@lists.fd.io On Behalf Of Vamsi Krishna Sent: Thursday, September 19, 2019 7:51 AM To: vpp-dev@lists.fd.io Subject: Re: [vpp-dev] Can vlib_time_now be used in worker threads Hi Damjan, I was going through the following code which vlib_time_now

Re: [vpp-dev] Can vlib_time_now be used in worker threads

2019-09-19 Thread Vamsi Krishna
Hi Damjan, I was going through the following code which vlib_time_now calls internally. This function takes 'c' as an input which is the timing context and vlib_time_now passes a reference to global timing context in vlib_main. If multiple threads call the function at the same time then it can r

Re: [vpp-dev] Can vlib_time_now be used in worker threads

2019-09-19 Thread Damjan Marion via Lists.Fd.Io
> On 19 Sep 2019, at 07:42, Vamsi Krishna wrote: > > Hi, > > Can the vlib_time_now api be used in worker threads? Looking at the code, > this api does not seam to be thread safe. > But there are a few places where it is used in nodes that do packet > processing. For example in nat, cdp and f

[vpp-dev] Can vlib_time_now be used in worker threads

2019-09-18 Thread Vamsi Krishna
Hi, Can the vlib_time_now api be used in worker threads? Looking at the code, this api does not seam to be thread safe. But there are a few places where it is used in nodes that do packet processing. For example in nat, cdp and few other places. Found the following thread where it is mentioned