> On 19 Sep 2019, at 07:42, Vamsi Krishna <vamsi...@gmail.com> 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 few other places. 
> 
> Found the following thread where it is mentioned that NAT code should be 
> rewritten.
> https://lists.fd.io/g/vpp-dev/topic/28792277#11683 
> <https://lists.fd.io/g/vpp-dev/topic/28792277#11683>
> 
> The main thread calls this api extensively. So, if a worker thread calls it 
> concurrently then it can result in undefined behavior. Is that right?
> What is the recommended api to use in nodes running on worker threads for 
> time keeping?

How did you come to the conclusion that it is not thread safe?
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#14020): https://lists.fd.io/g/vpp-dev/message/14020
Mute This Topic: https://lists.fd.io/mt/34196878/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to