Get it. It use spinlock (in vppinfra/bihash_template.c): while (__sync_lock_test_and_set (h->writer_lock, 1))
On Mon, Oct 16, 2017 at 11:39 AM, Yuliang Li <yuliang...@yale.edu> wrote: > Hi all, > > I am curious in the SNAT implementation. I see that SNAT's hash tables > <https://wiki.fd.io/view/VPP/NAT#Data_structures> are shared by all > worker threads. Does SNAT use lock to avoid multiple threads updating the > hash table concurrently? If not, how does it avoid race condition? > > Thanks, > -- > Yuliang Li > PhD student > Department of Computer Science > Yale University > -- Yuliang Li PhD student Department of Computer Science Yale University
_______________________________________________ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev