acl-plugin: avoid crash in multithreaded setup adding/deleting ACLs with traffic... 41/7941/5
authorAndrew Yourtchenko <ayourtch@gmail.com>
Tue, 8 Aug 2017 18:10:12 +0000 (20:10 +0200)
committerAndrew Yourtchenko <ayourtch@gmail.com>
Thu, 10 Aug 2017 09:09:50 +0000 (11:09 +0200)
commite6423bef32ca2ffcfcd7a092eb4673badd53ea4c
treea9e62142c15ae9d7c5c575c4aa7271793ce2c5a3
parent754370f1b55d4102d21dd94676f2bda3170c7df0
acl-plugin: avoid crash in multithreaded setup adding/deleting ACLs with traffic (VPP-910/VPP-929)

The commit fixing the VPP-910 and separating the memory operations
into separate heaps has missed setting the MHEAP_FLAG_THREAD_SAFE,
which quite obviously caused the issues in the multithread setup.
Fix that.

Also, add the debug CLIs
"set acl-plugin heap {main|hash} {validate|trace} {1|0}"
to toggle the memory instrumentation, in case we ever need it
in the future.

Change-Id: I8bd4f7978613f5ea75a030cfb90674dac34ae7bf
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
src/plugins/acl/acl.c
src/plugins/acl/hash_lookup.c
src/plugins/acl/hash_lookup.h